Skip to content

Commit

Permalink
Fixes Typescript:
Browse files Browse the repository at this point in the history
 - Fixes the issue microsoft#1027 that while compiling, Timer is Not  assignable to parameter of type 'string', So Changes the NodeJs.Timer to NodeJs.Timeout
 - After that it's gives another compile error in library so in tscondig.json added flag to skipLibCheck
 - Now it's compiling successfully
  • Loading branch information
meermustan committed Jun 4, 2024
1 parent 3b88694 commit 02b6f48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion decorator-sample/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function activate(context: vscode.ExtensionContext) {

console.log('decorator sample is activated');

let timeout: NodeJS.Timer | undefined = undefined;
let timeout: NodeJS.Timeout | undefined = undefined;

// create a decorator type that we use to decorate small numbers
const smallNumberDecorationType = vscode.window.createTextEditorDecorationType({
Expand Down
4 changes: 3 additions & 1 deletion decorator-sample/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"outDir": "out",
"sourceMap": true,
"strict": true,
"rootDir": "src"
"rootDir": "src",
"skipLibCheck": true,
"types": ["node"]
},
"exclude": ["node_modules", ".vscode-test"]
}

0 comments on commit 02b6f48

Please sign in to comment.