-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Support jsx mode "string" #15217
Copy link
Copy link
Closed
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
Suggestion
Add a new mode for the tsx/jsx mode: "string" that, when used and given the input
outputs
OR (maybe an alt mode?)
Use case A
I'm currently doing a lot of unit tests (requiring line-number) that look like:
There are several reasons why the string literal use here is less than ideal:
Use case B
Other frameworks can make use of tsx formatting: for example, Aurelia has an inlineView decorator that allows passing markup to the view compiler:
with tsx - mode: string, this could be improved to
the improvement here being better support for indentation, formatting in editors and markup checking.