Skip to content

TypeScript Declare Keyword

ythy edited this page Nov 3, 2017 · 1 revision

If a file has the extension .d.ts then each root level definition must have the declare keyword prefixed to it. This helps make it clear to the author that there will be no code emitted by TypeScript.
The author needs to ensure that the declared item will exist at runtime.

Clone this wiki locally