mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Add type annotations
This commit is contained in:
@@ -4,11 +4,11 @@ function addClasses(element: HTMLElement, classes: Array<string>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getLastPath = function (str) {
|
function getLastPath(str: string): string {
|
||||||
return str.split('\\').pop().split('/').pop();
|
return str.split('\\').pop().split('/').pop();
|
||||||
};
|
}
|
||||||
|
|
||||||
function htmlDecode(input) {
|
function htmlDecode(input: string): string {
|
||||||
const doc = new DOMParser().parseFromString(ltrim(input), 'text/html');
|
const doc = new DOMParser().parseFromString(ltrim(input), 'text/html');
|
||||||
return doc.documentElement.textContent;
|
return doc.documentElement.textContent;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user