Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed typos
  • Loading branch information
Armando Aguirre Sepulveda committed Jul 27, 2024
commit c5ffae513c66bc6bb58da66cae026a34e389eed7
3 changes: 3 additions & 0 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27383,6 +27383,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}

function isFunctionObjectType(type: ObjectType): boolean {
if (getObjectFlags(type) & ObjectFlags.EvolvingArray) {
return false;
}
// We do a quick check for a "bind" property before performing the more expensive subtype
// check. This gives us a quicker out in the common case where an object type is not a function.
const resolved = resolveStructuredTypeMembers(type);
Expand Down
2 changes: 1 addition & 1 deletion src/harness/typeWriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class TypeWriterWalker {
}
else {
const typeFormatFlags = ts.TypeFormatFlags.NoTruncation | ts.TypeFormatFlags.AllowUniqueESSymbolType | ts.TypeFormatFlags.GenerateNamesForShadowedTypeParams;
let typeNode = this.checker.typeToTypeNode(type, node.parent, BigInt((typeFormatFlags & ts.TypeFormatFlags.NodeBuilderFlagsMask)) | ts.NodeBuilderFlagsIgnoreErrors)!;
let typeNode = this.checker.typeToTypeNode(type, node.parent, BigInt(typeFormatFlags & ts.TypeFormatFlags.NodeBuilderFlagsMask) | ts.NodeBuilderFlagsIgnoreErrors)!;
if (ts.isIdentifier(node) && ts.isTypeAliasDeclaration(node.parent) && node.parent.name === node && ts.isIdentifier(typeNode) && ts.idText(typeNode) === ts.idText(node)) {
// for a complex type alias `type T = ...`, showing "T : T" isn't very helpful for type tests. When the type produced is the same as
// the name of the type alias, recreate the type string without reusing the alias name
Expand Down