Open jemgold opened 6 years ago
Thanks for the PR!
I'm familiar with the concept of TS, but not its implementation. How might I go about testing this implementation you've created? I'd like to set something up on a CodePen or similar so I can verify completeness before merging.
Cheers!
LGTM
Note: there's nothing really to test here. What's implemented here are only type definitions. A test would be to implement unit tests in typescript & require tests also pass typechecking when being transpiled
@jongold Maybe instead of an interface for "Lab", you could use a type?
export type Lab = {
L: number;
A: number;
B: number;
}
Declaring an interface may conflict with interfaces of similar names in the file where it is used. And types give you code completion too.
https://www.typescriptlang.org/docs/handbook/advanced-types.html#interfaces-vs-type-aliases
@lsalazarm99 whoa, thanks! that clarifies a lot; always been confused about the difference between the two. I don't have time to make the change right now but feel free to PR!
Thanks for a great library! I had to add this file to get things moving in a TypeScript project; hope it's helpful if I share them :)