Integration with typescript compiler's typing discovery and location plan #3

Open
weswigham opened this Issue Nov 5, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@weswigham

This issue is to support/mirror discussion on #5537 but from the typings side.

While we've not yet nailed down a plan on what out endgame is in the compiler, one thing I know I'd certainly love to see typings do really well is discovery for a package's type information. We want to see users go from npm install bluebird --save to actually having the third-party types for that package (of the correct version!) available for them to depend on and use in editor and compilation experiences as seamlessly as possible.

@blakeembrey mentioned a resource for typings to use to automate discovery of typings, and potentially browse-able by humans. This would be excellent - potentially being able to locate the corresponding types for a series of package.json entries is a big step towards making finding existing types as seamless as possible. We'd love to know how your design and implementation with this proceed.

Pinging @mhegazy @ahejlsberg @vladima @DanielRosenwasser for their thoughts.

@weswigham weswigham referenced this issue in Microsoft/TypeScript Nov 5, 2015

Closed

Package typing inclusion and discovery #5537

@jasonswearingen

This comment has been minimized.

Show comment
Hide comment
@jasonswearingen

jasonswearingen Nov 6, 2015

sorry for the novice post, but what is this typings project? a cursory web search gleams nothing relevant.

sorry for the novice post, but what is this typings project? a cursory web search gleams nothing relevant.

@blakeembrey

This comment has been minimized.

Show comment
Hide comment
@blakeembrey

blakeembrey Nov 6, 2015

Member

@jasonswearingen A blog post and introduction will be coming in a few weeks, promise! Basically, it's an attempt to make typings just work. There's a CLI tool available at https://github.com/typings/cli which is working pretty smoothly (some minor issues, especially around UX), but a tighter integration with the compiler is planned to avoid duplication of information.

Member

blakeembrey commented Nov 6, 2015

@jasonswearingen A blog post and introduction will be coming in a few weeks, promise! Basically, it's an attempt to make typings just work. There's a CLI tool available at https://github.com/typings/cli which is working pretty smoothly (some minor issues, especially around UX), but a tighter integration with the compiler is planned to avoid duplication of information.

@blakeembrey

This comment has been minimized.

Show comment
Hide comment
@blakeembrey

blakeembrey Nov 8, 2015

Member

@weswigham I just completed a working implementation with https://github.com/typings/registry and https://github.com/typings/cli. The registry is a little sparse now, but works pretty fantastic.

Member

blakeembrey commented Nov 8, 2015

@weswigham I just completed a working implementation with https://github.com/typings/registry and https://github.com/typings/cli. The registry is a little sparse now, but works pretty fantastic.

@blakeembrey

This comment has been minimized.

Show comment
Hide comment
@blakeembrey

blakeembrey Nov 12, 2015

Member

@weswigham Is there a way to reuse something like Microsoft/TypeScript#4913 and generate an output that could be used for the package.json typings reference? That way, it's almost all the same benefits and the end user doesn't need to know the author is using typings. If possible too, maybe having a special syntax to denote that this is a resolved lookup using a specific supported resolution in TypeScript - E.g. @filename: ~node_modules/a/index.d.ts (note the tilde). That would be used by the TypeScript symbol to merge duplicate symbols at compile time when the files are compatible.

Member

blakeembrey commented Nov 12, 2015

@weswigham Is there a way to reuse something like Microsoft/TypeScript#4913 and generate an output that could be used for the package.json typings reference? That way, it's almost all the same benefits and the end user doesn't need to know the author is using typings. If possible too, maybe having a special syntax to denote that this is a resolved lookup using a specific supported resolution in TypeScript - E.g. @filename: ~node_modules/a/index.d.ts (note the tilde). That would be used by the TypeScript symbol to merge duplicate symbols at compile time when the files are compatible.

@DanielRosenwasser DanielRosenwasser referenced this issue in Microsoft/TypeScript Nov 13, 2015

Closed

Design Meeting Notes for 11/13/2015 #5657

@blakeembrey blakeembrey referenced this issue in typings/typings Dec 15, 2015

Closed

Configure typings directory? #69

@blakeembrey

This comment has been minimized.

Show comment
Hide comment
@blakeembrey

blakeembrey Dec 15, 2015

Member

@weswigham Just an update, over the weekend I published the registry API available here: http://api.typings.org/search. To see versions, use http://api.typings.org/versions/dt/react. To narrow it down you can use http://api.typings.org/versions/dt/react/%3E=0.14. There'll be a front-end for this soon to introduce typings and TypeScript, but the API was more important personally since all the tooling needs to rely on this. I integrated it into the CLI yesterday (it'll search and prompt the user right now, can narrow down preferred behaviour later). If the TypeScript team wants to use this API for something, please ping me for anything needs to be added or changed.

Member

blakeembrey commented Dec 15, 2015

@weswigham Just an update, over the weekend I published the registry API available here: http://api.typings.org/search. To see versions, use http://api.typings.org/versions/dt/react. To narrow it down you can use http://api.typings.org/versions/dt/react/%3E=0.14. There'll be a front-end for this soon to introduce typings and TypeScript, but the API was more important personally since all the tooling needs to rely on this. I integrated it into the CLI yesterday (it'll search and prompt the user right now, can narrow down preferred behaviour later). If the TypeScript team wants to use this API for something, please ping me for anything needs to be added or changed.

@blakeembrey blakeembrey referenced this issue in typings/typings Dec 17, 2015

Open

Add quick start guide to top of README #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment