Merge pull request #229 from woxtu/type-annotation

Add missing type annotations
This commit is contained in:
Philipp Rudiger
2022-05-05 19:54:50 +02:00
committed by GitHub

View File

@@ -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();
};
}
function htmlDecode(input) {
function htmlDecode(input: string): string {
const doc = new DOMParser().parseFromString(ltrim(input), 'text/html');
return doc.documentElement.textContent;
}