Closed
Description
This was discovered in the docker tests run for office-ui-fabric:
The function in question is here:
https://github.com/microsoft/TypeScript/blob/424b805d6166c5095be97d8328ebaf1968ec1028/src/compiler/checker.ts#L14088-L14105
function isJSLiteralType(type: Type): boolean {
if (noImplicitAny) {
return false; // Flag is meaningless under `noImplicitAny` mode
}
if (getObjectFlags(type) & ObjectFlags.JSLiteral) {
return true;
}
if (type.flags & TypeFlags.Union) {
return every((type as UnionType).types, isJSLiteralType);
}
if (type.flags & TypeFlags.Intersection) {
return some((type as IntersectionType).types, isJSLiteralType);
}
if (type.flags & TypeFlags.Instantiable) {
return isJSLiteralType(getResolvedBaseConstraint(type));
}
return false;
}
The getResolvedBaseConstraint
function can return type
in some cases, creating a circularity.
I will be adding a fix as part of #42431.
Metadata
Metadata
Assignees
Labels
No labels