claus / react-dat-gui

React dat.GUI
MIT License
292 stars 56 forks source link

Added types definition for using with TypeScript #9

Closed gebeto closed 5 years ago

nicholas1513 commented 5 years ago

"DatPresets" should be added to the type declarations as well.

rohan-deshpande commented 5 years ago

@gebeto, @nicholas1513 Not a TypeScript user, so I'm just wondering - is there any benefit in having a TypeScript example or something in the docs guiding people on how to get started with using the component with TypeScript?

gebeto commented 5 years ago

@rohan-deshpande in the docs, types of parameters are discribed using TypeScript similar syntax, it just describe a types of parameters, so yep, it is easier to understand what type of parameter can be in each type of component

gebeto commented 5 years ago

any updates?

rohan-deshpande commented 5 years ago

On vacation at the moment will have to take a final look when I get back in a week or so.

rohan-deshpande commented 5 years ago

@gebeto a few comments here and there, I might put in a prettier conf file soon, but in the mean time if you don't mind making sure line spaces etc., are tidy that'd be awesome! Sorry for being so pedantic ;)

gebeto commented 5 years ago

All is ok) I've done:

rohan-deshpande commented 5 years ago

@gebeto wicked! Looks good to me, merging.