diff --git a/ts/html-filter/styling.ts b/ts/html-filter/styling.ts index 6896268a5..bd3cea666 100644 --- a/ts/html-filter/styling.ts +++ b/ts/html-filter/styling.ts @@ -41,7 +41,7 @@ const filterStyling = (predicate: (property: string, value: string) => boolean) element: HTMLElement ): void => { for (const property of [...element.style]) { - const value = element.style.getPropertyValue(name); + const value = element.style.getPropertyValue(property); if (!predicate(property, value)) { element.style.removeProperty(property); diff --git a/ts/package.json b/ts/package.json index 303e38fb4..8586772fa 100644 --- a/ts/package.json +++ b/ts/package.json @@ -46,7 +46,7 @@ "svelte2tsx": "^0.1.133", "tmp": "^0.2.1", "tslib": "^2.0.3", - "typescript": "^3.9.7", + "typescript": "^4.2.4", "uglify-js": "^3.13.1" }, "scripts": { diff --git a/ts/svelte/svelte.ts b/ts/svelte/svelte.ts index 1a59ecb5e..41431aa46 100644 --- a/ts/svelte/svelte.ts +++ b/ts/svelte/svelte.ts @@ -100,7 +100,7 @@ function compile(tsPath: string, tsLibs: string[]) { return createdFiles[parsedCommandLine.fileNames[0].replace(".ts", ".d.ts")]; } -function writeFile(file, data) { +function writeFile(file, data): Promise { return new Promise((resolve, reject) => { fs.writeFile(file, data, (err) => { if (err) { @@ -129,7 +129,7 @@ async function writeDts(tsPath, dtsPath, tsLibs) { await writeFile(dtsPath, dtsSource); } -function writeTs(svelteSource, sveltePath, tsPath) { +function writeTs(svelteSource, sveltePath, tsPath): void { let tsSource = svelte2tsx(svelteSource, { filename: sveltePath, strictMode: true, @@ -187,7 +187,7 @@ async function compileSvelte(args) { const svelteSource = (await readFile(sveltePath)) as string; const mockTsPath = sveltePath + ".ts"; - await writeTs(svelteSource, sveltePath, mockTsPath); + writeTs(svelteSource, sveltePath, mockTsPath); await writeDts(mockTsPath, dtsPath, tsLibs); await writeJs(svelteSource, sveltePath, mjsPath, cssPath, binDir, genDir); diff --git a/ts/yarn.lock b/ts/yarn.lock index 0f0b3569e..e1b574f9b 100644 --- a/ts/yarn.lock +++ b/ts/yarn.lock @@ -4348,16 +4348,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@*: +typescript@*, typescript@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== -typescript@^3.9.7: - version "3.9.9" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674" - integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"