I forked DefinitelyTyped and made a workaround to one type definition. This workaround is on a branch in this fork.
This change shouldn't be merged back, since it's only a temporary workaround.
How do I install this customized type definition via npm or yarn?
Summary: The @types npm organization is for obtaining type definitions with npm . Using these type definitions is a feature is coming in TypeScript 2.0. This will replace the current projects/tools such as typings and tsd, though these will continue to be supported for some time.
Definitely Typed is a project that provides a central repository of TypeScript definitions for NPM packages which do not have types.
A type definition file is a file that ends in “. d. ts”. It is a lot like a header file in some other languages. It is a file in which you provide the type definitions for another file, the signatures without implementation.
If this is just temporary like you say (or maybe a very specific use case), it probably makes most sense to just copy the modified type definitions into the repository of your project. You can then reference these definitions just like you would with any custom typings (see my other answer for instructions).
This could be a time consuming process but doable (to the best of my knowledge).
Use the types-publisher project. The Manually Running section in the Readme covers the steps that needs to be executed.
The following steps specified in the Readme
should be sufficient to generate and publish the package to your npm account:
In the settings.json have the scopeName equal to npm username.
The package can be used as npm i @username/package-name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With