[Suggestion] HTML string type for IDEs #4856
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Out of Scope
This idea sits outside of the TypeScript language design constraints
Suggestion
An idea for TypeScript
Too Complex
An issue which adding support for may be too complex for the value it adds
Motivation
ES6 Template strings make it much easier to put blocks of HTML code inline with JavaScript. This can be leveraged in frameworks like Angular. One disadvantage to this though, is that IDEs don't know that the string block should be formatted as HTML so there is no syntax highlighting.
Proposal
I propose a simple HTMLString type that is simply an alias for string but can signal to text editors that the string should be styled as HTML and can use HTML completion. This should be implemented in lib.d.ts to standardize the use of the type.
Strengths:
Weaknesses:
The text was updated successfully, but these errors were encountered: