Closed
Description
π Search Terms
completions formatting class member snippets constructor
π Version & Regression Information
- This is a crash
β― Playground Link
N/A
π» Code
/// <reference path="fourslash.ts" />
// @strict: true
// @filename: KlassConstructor.ts
//// type GenericConstructor<T> = new (...args: any[]) => T;
//// export type KlassConstructor<Cls extends GenericConstructor<any>> =
//// GenericConstructor<InstanceType<Cls>> & { [k in keyof Cls]: Cls[k] };
// @filename: ElementNode.ts
//// import { KlassConstructor } from "./KlassConstructor";
////
//// export type NodeKey = string;
////
//// export class ElementNode {
//// ["constructor"]!: KlassConstructor<typeof ElementNode>;
//// constructor(key?: NodeKey) {}
//// }
// @filename: CollapsibleContainerNode.ts
//// import { ElementNode, NodeKey } from "./ElementNode";
////
//// export class CollapsibleContainerNode extends ElementNode {
//// __open: boolean;
////
//// constructor(open: boolean, key?: NodeKey) {
//// super(key);
//// this.__open = open;
//// }
//// /*1*/
//// }
format.setFormatOptions({
insertSpaceAfterConstructor: false,
});
verify.completions({
marker: "1",
preferences: {
includeCompletionsWithClassMemberSnippets: true,
includeCompletionsWithInsertText: true,
},
// TODO: tweak this line after fixing the issue
includes: ["constructor"]
});
π Actual behavior
it crashes
π Expected behavior
it shouldn't crash
Additional information about the issue
repro based on #58191 (comment)