no-context / moo

Optimised tokenizer/lexer generator! šŸ„ Uses /y for performance. Moo.
BSD 3-Clause "New" or "Revised" License
821 stars 65 forks source link

Add TypeScript type definitions #49

Closed deltaidea closed 7 years ago

deltaidea commented 7 years ago

Thanks for the lexer! Could you please provide types for TypeScript users?

I'm willing to make a PR later if someone would tell me about all the exported stuff. I'm just a beginner with Nearly and I only use moo.compile() so far.

tjvr commented 7 years ago

We're not going to provide TypeScript definitionsā€”I don't use TS myself!ā€”but you're welcome to publish type definitions as a separate package. :-)

With the exception of has, you should find the readme documents all the exports. :-)

deltaidea commented 7 years ago

Fair enough, I'll see if I can submit package @types/moo. Thanks!

MofX commented 6 years ago

Are you still against providing typings with moo? Using DefinitelyTyped is cumbersome... I can't use moo with typescript without replacing the typings myself, because the once submitted by deltaidea are outdated and I'm still waiting for my pull request to be merged. It would be a lot easier if the typings are just published together with moo. Even if they also get outdated, it is easier to update them here.

tjvr commented 6 years ago

Are you still against providing typings with moo?

Sorry, we still don't want to do this.