Skip to content

Commit 736983c

Browse files
authored
Clarify the declare hazard (#35)
Let's avoid folk thinking that we're introducing a hazard. Signed-off-by: Rob Palmer <[email protected]>
1 parent 4eeb96b commit 736983c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/unsupported_syntax.md

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ See https://github.com/microsoft/TypeScript/issues/51825 for more information.
9292

9393
### The `declare ...` hazard
9494

95+
_Note: This section describes a potential hazard in the TypeScript language that exists with or without `ts-blank-space`.
96+
It is described here only because adopting type-stripping may lead to developers reaching for `declare` as part of migration._
97+
9598
As with `declare const ...`, while `ts-blank-space` will erase syntax such as `declare enum ...` and `declare namespace ...` without error it should be used with understanding and mild caution.
9699
`declare` in TypeScript is an _assertion_ by the author that a value will exist at runtime.
97100

0 commit comments

Comments
 (0)