You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is especially important because the backticks mode of the quotes rule from ESLint breaks programs (cf yarnpkg/berry#70 for an example). While it could be seen as an ESLint bug, I think it should be possible for TS to use raw template string interchangeably with regular strings as long as they don't contain variables.
Actual behavior:
It throws an error (type "foo" is not assignable to type 'Foo').
I think fixing this should have been part of #21476, but it focused on the case of "a" + "b" rather than the simpler case of a literal without variables.
Any objections if I take a try on this issue during this week?
Do I understand correctly that only NoSubstitutionTemplateLiteral should be added to the list of allowed literals?
Should it support concatenations like `backtic` + `backtic` and `backtic` + 'single' ?
No objection from my side! In my use case the simple literal would be enough, but I guess that given the initial context of #21476 concatenations would be useful too.
Activity
RyanCavanaugh commentedon Apr 16, 2019
Would take a PR for it - should be fairly easy
arcanis commentedon Apr 16, 2019
I'll take a look end at the end of May unless someone beats me to it 🙂
IllusionMH commentedon Apr 16, 2019
Any objections if I take a try on this issue during this week?
Do I understand correctly that only
NoSubstitutionTemplateLiteralshould be added to the list of allowed literals?Should it support concatenations like
`backtic` + `backtic`and`backtic` + 'single'?arcanis commentedon Apr 16, 2019
No objection from my side! In my use case the simple literal would be enough, but I guess that given the initial context of #21476 concatenations would be useful too.
RyanCavanaugh commentedon Apr 16, 2019
NoSubstitutionTemplateLiteralshould be as good asStringLiteralanywhere here IMO