Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add type info to DefinitelyTyped repo #331

Open
simondel opened this issue Feb 17, 2017 · 3 comments
Open

add type info to DefinitelyTyped repo #331

simondel opened this issue Feb 17, 2017 · 3 comments

Comments

@simondel
Copy link

simondel commented Feb 17, 2017

Hi! Would it be possible for you to add type for shift-parser and shift-codegen to the DefintelyTyped repo?

I'm one of the developers of the mutation testing framework Stryker and I'm thinking about using shift-parser and shift-codegen instead of esprima and escodegen because of your ES6 support.

Changing our parser/codegenerator is very risky because it lies at the core of what we do: mutating code. Having type information would be very helpful to us. The DefintelyTyped repo on GitHub contains type information for modules which are not written using TypeScript. The typings of esprima may be a useful example. They can be found here.

Some places where we would use the parser, codegenerator and syntax: parserUtils.ts, mutators and MutatorOrchestrator.ts

@michaelficarra michaelficarra changed the title Add type info add type info to DefinitelyTyped repo Mar 28, 2017
@octogonz
Copy link

octogonz commented Feb 1, 2019

+1 Ideally shift would provide first class support for TypeScript and include .d.ts files in the shift-parser package. This would avoid the need for a separate @types/shift-parser package (which otherwise would have to be maintained by a separate group and perhaps lag behind the official API updates).

@octogonz
Copy link

octogonz commented Feb 1, 2019

@michaelficarra are you still using shift? Besides the lack of typings, the code itself doesn't declare the datatypes for any of the API functions, and I can't find any formal API docs. Also the NPM package doesn't seem to be very widely used. esprima seems way more popular.

@michaelficarra
Copy link
Member

@octogonz Yes, we use the Shift tools extensively at @shapesecurity. We don't provide TypeScript types because we don't use TypeScript. You are free to define an external type declaration file, and we may even accept a PR that adds one to this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants