DefinitelyTyped/types/sparkly/sparkly-tests.ts
Dimitri Benin 42e60e5283 [sparkly] introduce typings (#18291)
* [sparkly] introduce typings

* [sparkly] restrict input type to allow all types from examples but not more than that
2017-07-22 02:22:57 -07:00

8 lines
249 B
TypeScript

import sparkly = require('sparkly');
let str: string;
str = sparkly([0, 3, 5, 8, 4, 3, 4, 10]);
str = sparkly([0, 3, 5, '', 4, 3, 4, 10]);
str = sparkly([1, 2, 3, 4, 5], {min: 0, max: 10});
str = sparkly([1, 2, 3, 4, 5, 6, 7, 8], {style: 'fire'});