Skip to content

Crash in compareSignaturesRelated from @types/jest-in-case #30171

Description

From the nightly DT run.

  1. Clone DT, go to types/jest-in-case, run tsc:
✔ jest-in-case [master|✔]$ tsl
/home/nathansa/ts/built/local/tsc.js:88011
throw e;
^
TypeError: Cannot read property 'length' of undefined
at Object.unescapeLeadingUnderscores (/home/nathansa/ts/built/local/tsc.js:12932:19)
at compareSignaturesRelated (/home/nathansa/ts/built/local/tsc.js:41802:103)
at signatureRelatedTo (/home/nathansa/ts/built/local/tsc.js:43198:24)
at signaturesRelatedTo (/home/nathansa/ts/built/local/tsc.js:43169:30)
at structuredTypeRelatedTo (/home/nathansa/ts/built/local/tsc.js:42875:39)
at recursiveTypeRelatedTo (/home/nathansa/ts/built/local/tsc.js:42624:64)
at isRelatedTo (/home/nathansa/ts/built/local/tsc.js:42247:38)
at checkTypeRelatedTo (/home/nathansa/ts/built/local/tsc.js:42029:26)
at checkTypeRelatedToAndOptionallyElaborate (/home/nathansa/ts/built/local/tsc.js:41354:24)
at checkApplicableSignature (/home/nathansa/ts/built/local/tsc.js:49718:26)
// @Filename: index.d.tsdeclareconstglobal: NodeJS.Global;interfaceConfig{name?: string;only?: boolean;skip?: boolean;[key: string]: any;}typeTester<Opts>=(opts: Opts,done: jest.DoneCallback)=>any;typeTestCases<Opts>=ReadonlyArray<Opts>|{[name: string]: Opts};declarefunctioncases<OptsextendsConfig>(title: string,tester: Tester<Opts>,testCases: TestCases<Opts>): void;export=cases;
// @Filename: jest-in-case-tests.ts// (this is only the piece of the tests required to cause the crash)importcases= require("jest-in-case");test('array',()=>{consttester=jest.fn(opts=>{expect(add(opts.augend,opts.addend)).toBe(opts.total);});cases(title,tester,testCases);});

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueHigh Priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions