Skip to content

Commit 8a9d375

Browse files
committed
Add strict to tsconfig.json
1 parent 865c8b8 commit 8a9d375

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export function interactive(node) {
2929
return false
3030
}
3131

32-
// @ts-ignore looks like an element.
3332
name = node.tagName
3433

3534
return (
@@ -38,7 +37,6 @@ export function interactive(node) {
3837
(name === 'video' && hasProperty(node, 'controls')) ||
3938
(name === 'object' && hasProperty(node, 'useMap')) ||
4039
(name === 'img' && hasProperty(node, 'useMap')) ||
41-
// @ts-ignore looks like an element.
4240
(name === 'input' && (node.properties || {}).type !== 'hidden') ||
4341
hasProperty(node, 'tabIndex') ||
4442
alwaysInteractive.has(name)

test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import test from 'tape'
22
import {interactive} from './index.js'
33

44
test('interactive', function (t) {
5-
// @ts-ignore runtime.
5+
// @ts-expect-error runtime.
66
t.equal(interactive(), false, 'should return `false` without node')
7+
// @ts-expect-error runtime.
78
t.equal(interactive(null), false, 'should return `false` with `null`')
89

910
t.equal(

tsconfig.json

Lines changed: 2 additions & 1 deletion
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)