Skip to content

Commit 7609f82

Browse files
committed
Add strict to tsconfig.json
1 parent 72cbf43 commit 7609f82

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ test('unist-util-find-all-before', (t) => {
162162

163163
/**
164164
* @param {unknown} _
165-
* @param {number} n
165+
* @param {number|null|undefined} n
166166
*/
167167
function test(_, n) {
168-
return n > 3
168+
return typeof n === 'number' && n > 3
169169
}
170170

171171
t.end()

Diff for: tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"declaration": true,
1111
"emitDeclarationOnly": true,
1212
"allowSyntheticDefaultImports": true,
13-
"skipLibCheck": true
13+
"skipLibCheck": true,
14+
"strict": true
1415
}
1516
}

0 commit comments

Comments
 (0)