diff --git a/pyscriptjs/src/utils.ts b/pyscriptjs/src/utils.ts index 4f23e332..71262595 100644 --- a/pyscriptjs/src/utils.ts +++ b/pyscriptjs/src/utils.ts @@ -4,11 +4,11 @@ function addClasses(element: HTMLElement, classes: Array) { } } -const getLastPath = function (str) { +function getLastPath(str: string): string { return str.split('\\').pop().split('/').pop(); -}; +} -function htmlDecode(input) { +function htmlDecode(input: string): string { const doc = new DOMParser().parseFromString(ltrim(input), 'text/html'); return doc.documentElement.textContent; }