From e1df7e8969d491c46afae4d2c88d72d744b46721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Gersen?= Date: Wed, 17 Aug 2022 20:17:51 +0200 Subject: [PATCH] Add test file to check Typescript types for the .js dist --- tests/typescript.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/typescript.ts diff --git a/tests/typescript.ts b/tests/typescript.ts new file mode 100644 index 00000000..eed092f0 --- /dev/null +++ b/tests/typescript.ts @@ -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 + }); +}