-
-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test file to check Typescript types for the .js dist
- Loading branch information
1 parent
77e6e96
commit e1df7e8
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Test file to check Typescript types for the .js dist | ||
import noUiSlider from 'dist/nouislider.js'; | ||
|
||
const element: HTMLElement|null = document.querySelector('#slider'); | ||
|
||
if (element) { | ||
|
||
noUiSlider.create(element, { | ||
start: [20, 50], | ||
range: { | ||
min: 0, | ||
'50%': 30, | ||
max: 100 | ||
} | ||
}); | ||
|
||
const range = { | ||
min: 0, | ||
'50%': 30, | ||
max: 100 | ||
}; | ||
|
||
noUiSlider.create(element, { | ||
start: [20, 50], | ||
range: range | ||
}); | ||
} |