add basic typescript typings
This PR adds basic typescript typings based on the existing jsdoc comments.
The types are not perfect as they are auto generated, but on the other hand it does not need to be maintained manually, and something is better than nothing. The automatic generation of types from Javascript was introduced in https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/
- Add configuration for Typescript compiler
- 2 JSDoc comments fixed
- package.json changed to include the types
#18
any thoughts?
@jonschlinkert ?
Would love to see this get merged.
Yeah, lets see, been a while...
@jonschlinkert would this be better to live here or on DefinitelyTyped?
I just added picomatch types to DefinitelyTyped. This can be closed.
from my point of view, it would be nicer to always have the types as part of the package, and always have it matching without additional manual effort
but thanks @Patcher56, I'll probably go ahead and use those types to convert my project to using picomatch
Yeah, I am the same opinion. But as we didn't get an answer this is the only option to add types to picomatch.
The best solution in my opinion would be to convert picomatch to typescript. Then the types would be no problem at all.