Update Typescript to 4.2.4

This commit is contained in:
Henrik Giesel 2021-04-22 18:33:42 +02:00
parent e5c5c91ec8
commit a7c3aec5dc
4 changed files with 6 additions and 11 deletions

View File

@ -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);

View File

@ -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": {

View File

@ -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<void> {
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);

View File

@ -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"