moagrius / Color

abstract Color management class for JavaScript; discreet component manipulation; output formatting; conversions.
http://moagrius.github.io/Color/Color.html
MIT License
21 stars 9 forks source link

Ported to TypeScript #7

Closed iFreilicht closed 7 years ago

iFreilicht commented 7 years ago

This is a port of the Color library to Typescript.

While one can use the regular .js file, it lacks any type definitions. With Color.ts from this PR, the syntax for the end-user stays exactly the same as the .js version, but is enhanced by all the type-checking benefits that TypeScript offers.

Not 100% of the functions have proper definitions yet. These were explicitly marked with : any parameter type definitions, as I wanted to change as little as possible.

All strict compiler flags are supported.

moagrius commented 7 years ago

nice