Merge branch 'main' into tsgo-port

This commit is contained in:
Jake Bailey
2026-03-02 18:57:24 -08:00
11 changed files with 991 additions and 2 deletions

View File

@@ -24603,9 +24603,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (relation === identityRelation) {
return signaturesIdenticalTo(source, target, kind);
}
if (target === anyFunctionType || source === anyFunctionType) {
// With respect to signatures, the anyFunctionType wildcard is a subtype of every other function type.
if (source === anyFunctionType) {
return Ternary.True;
}
if (target === anyFunctionType) {
return Ternary.False;
}
const sourceIsJSConstructor = source.symbol && isJSConstructor(source.symbol.valueDeclaration);
const targetIsJSConstructor = target.symbol && isJSConstructor(target.symbol.valueDeclaration);
@@ -33925,7 +33929,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
childrenPropSymbol.valueDeclaration.symbol = childrenPropSymbol;
const childPropMap = createSymbolTable();
childPropMap.set(jsxChildrenPropertyName, childrenPropSymbol);
spread = getSpreadType(spread, createAnonymousType(attributesSymbol, childPropMap, emptyArray, emptyArray, emptyArray), attributesSymbol, objectFlags, /*readonly*/ false);
spread = getSpreadType(spread, createAnonymousType(attributesSymbol, childPropMap, emptyArray, emptyArray, emptyArray), attributesSymbol, objectFlags | getPropagatingFlagsOfTypes(childrenTypes), /*readonly*/ false);
}
}