[ID] --isolatedDeclarations
disallows const
initialized with a regex literal
#58383
Open
6 tasks done
Labels
Milestone
π Search Terms
β Viability Checklist
β Suggestion
I an unsure if it is a bug or a feature request...
An exported
const
without type annotation and initialized with a regex literal triggers the following errorerror TS9010: Variable must have an explicit type annotation with --isolatedDeclarations.
in isolated declaration mode.If I understand correctly, isolated declaration should allow unannotated
const
initialized with any literal?π Motivating Example
See an example on the playground.
π» Use Cases
This could avoid a trivial type annotation.
The text was updated successfully, but these errors were encountered: