-
Notifications
You must be signed in to change notification settings - Fork 135
Add support for "typings" property in package.json #208
Comments
@rbuckton Thanks so much for this! What is the expected definition format for How does this work with "ambient modules" (is there a better name?) such the node definition itself? Basically modules that reference other modules but don't export anything themselves. Edit: Will this work with other package managers like Bower? |
@blakeembrey When loading from the |
Ok, thanks. Just trying to find the diff between what I've currently built/solved for the TSD future versions and what is coming up. Don't want to duplicate too much effort. Currently, my solution is to use a combination of a By the sounds of it, there is a need for this to still exist. Can you point me to the implementation in TypeScript so I can start resolving what is now unnecessary? |
This change is in the |
We just finished migrating angular to this, and will roll it out tomorrow. I believe users should not use tsd for angular2. tsd and DT are the side-channel to deliver typings for libraries that don't distribute their own, but we have better control over things like versioning semantics if we publish the typings in our primary distribution. My choice of right behavior for tsd is to
|
Thanks @alexeagle, I've already added support for the |
Yes, we would love to chat with you guys. Tsd remains really important for our users to be productive in Typescript. |
Yes, I actually work just off Market Street. Feel free to email if you want to move this discussion off here though 😄 |
I emailed you at the address shown on github. |
In TypeScript 1.6 we are including a new module resolution semantics for CommonJS modules, which can be explicitly controlled using the new
--moduleResolution
command line option. Now, when you use--module commonjs
or specify--moduleResolution node
, module resolution for module names follows a new resolution strategy, based on the module resolution semantics for NodeJS.When an absolute module name is resolved from the
node_modules/
folder, an attempt is made to locate and parse thepackage.json
file. TypeScript looks for a specific property,"typings"
on the root of the package object.This differs from how
tsd
currently handles type definitions embedded inpackage.json
, which instead looks for a"typescript"
property that contains an object with a"definitions"
property.Please consider adding support for the
"typings"
property, with the"typescript"
object as a backwards-compatible fallback.The text was updated successfully, but these errors were encountered: