-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Document: How to get "Simplified Declaration File (.d.ts) Acquisition" form custom repositories? #12284
Comments
package.json does support specifying a github repository and a commit hash, but not a path inside the git repository :/ Also because the individual package.json are synthesized by the publish tool, it's not trivial to use |
Would this address your request DefinitelyTyped/DefinitelyTyped#12392 ? |
From the compiler perspective, the package in {
"compilerOptions": {
"typeRoots": [
"./definitions/",
"./node_modules/@types"
]
}
} this tells the compiler when resolving a the other piece, is if your declaration file is a module, then you can just add it to your {
"compilerOptions": {
"baseUrl": "./definitions"
}
} For an like More info can be found at: www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types and www.typescriptlang.org/docs/handbook/module-resolution.html |
This means, I have to add the type definitions temporarily to my project until they are officially published. So, this makes it more complicated to switch between my temporary type definitions and the official ones. And there is a danger that the types added in that way may not behave the same way the official types behave. |
then symlinks are your best options here. use |
I'm currently using:
in that file I'm specifying the list of:
The mechanism you are proposing is intended to to replace the above solution? Why? |
This is significantly more difficult to integrate into a team workflow than the typings solution where I could point to a file in a remote repository. |
you can still use typings if you want. you could use symlinks, you could include the file in your combination, or you could use path mapping. up to you. |
When I create a pull request to DefinitelyTyped, there is normally a period between submitting the pull request until the update is available via
npm install --save @typings/the-module
.During that time, I want to consume the resulting changes in my project. With typings it was easy to use my own definitions form my own repository. All I had to do was to add something a simple line to the
typings.json
file :What is the equivalent of that with the new npm based type definitions?
Is there any documentation that explains this workflow for #9184?
The text was updated successfully, but these errors were encountered: