Skip to content

Commit

Permalink
Add test file to check Typescript types for the .js dist
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Aug 17, 2022
1 parent 77e6e96 commit e1df7e8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/typescript.ts
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
});
}

0 comments on commit e1df7e8

Please sign in to comment.