mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Propagate wildcard types in template literal type construction (#40875)
* Propagate wildcard types in template literal type construction * Add regression test * Accept new baselines
This commit is contained in:
@@ -13565,6 +13565,9 @@ namespace ts {
|
||||
mapType(types[unionIndex], t => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) :
|
||||
errorType;
|
||||
}
|
||||
if (contains(types, wildcardType)) {
|
||||
return wildcardType;
|
||||
}
|
||||
const newTypes: Type[] = [];
|
||||
const newTexts: string[] = [];
|
||||
let text = texts[0];
|
||||
|
||||
Reference in New Issue
Block a user