- create
@types/
directory in your application - add
@types/my-module/index.d.ts
withdeclare module 'my-module'
Last active
June 26, 2019 22:42
-
-
Save miguelmota/99bfb118f1bbdc7dd309405c8417aaeb to your computer and use it in GitHub Desktop.
TypeScript add custom @types (declare module)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"typeRoots": [ | |
"./node_modules/@types", | |
"./@types" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment