Skip to content

Commit e1df7e8

Browse files
committed
Add test file to check Typescript types for the .js dist
1 parent 77e6e96 commit e1df7e8

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/typescript.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Test file to check Typescript types for the .js dist
2+
import noUiSlider from 'dist/nouislider.js';
3+
4+
const element: HTMLElement|null = document.querySelector('#slider');
5+
6+
if (element) {
7+
8+
noUiSlider.create(element, {
9+
start: [20, 50],
10+
range: {
11+
min: 0,
12+
'50%': 30,
13+
max: 100
14+
}
15+
});
16+
17+
const range = {
18+
min: 0,
19+
'50%': 30,
20+
max: 100
21+
};
22+
23+
noUiSlider.create(element, {
24+
start: [20, 50],
25+
range: range
26+
});
27+
}

0 commit comments

Comments
 (0)