Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd475e2

Browse files
committed
Update typescript fixtures to be compatible with typescript 6
In TS 6, strict mode is enabled by default, and the `node10` module resolution is deprecated.
1 parent 2943236 commit dd475e2

6 files changed

Lines changed: 90 additions & 61 deletions

File tree

fixtures/js/render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function render() {
22
const html: string = "<h1>Welcome to Your TypeScript App</h1>";
3-
document.getElementById('app').innerHTML = html;
3+
document.getElementById('app')!.innerHTML = html;
44
}
55

66
export default render;

fixtures/js/render2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function render() {
2-
document.getElementById('app').innerHTML = "<h1>Welcome to Your TypeScript App</h1>";
2+
document.getElementById('app')!.innerHTML = "<h1>Welcome to Your TypeScript App</h1>";
33
}
44

55
export default render;

fixtures/js/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"compilerOptions": {
3+
"target": "es6",
4+
"module": "es2015",
5+
"moduleResolution": "bundler",
36
"allowSyntheticDefaultImports": true
47
}
58
}

fixtures/vuejs2-typescript/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"target": "es6",
44
"strict": true,
55
"module": "es2015",
6-
"moduleResolution": "node",
6+
"moduleResolution": "bundler",
77
"allowSyntheticDefaultImports": true
88
},
99
"include": [
1010
"./**/*.ts"
1111
]
12-
}
12+
}

fixtures/vuejs3-typescript/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"target": "es6",
44
"strict": true,
55
"module": "es2015",
6-
"moduleResolution": "node",
6+
"moduleResolution": "bundler",
77
"allowSyntheticDefaultImports": true
88
},
99
"include": [
1010
"./**/*.ts"
1111
]
12-
}
12+
}

0 commit comments

Comments
 (0)