Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix test/basellines #59663

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -1,50 +1,88 @@
// === goToDefinition ===
// === /tests/cases/fourslash/definitions.ts ===
// export class Base {
// [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|]
// }
//
// <|export class [|{| defId: 0 |}Derived|] extends Base {
// readonly email = this.cArg.getByLabel('Email')
// readonly password = this.cArg.getByLabel('Password')
// }|>

// === /tests/cases/fourslash/main.ts ===
// <|import { [|Derived|] } from './base'|>
// const derived = new /*GOTO DEF*/Derived(cArg)
// import { Derived } from './definitions'
// const derived = new /*GOTO DEF*/[|Derived|](cArg)

// === Details ===
[
{
"kind": "alias",
"defId": 0,
"kind": "class",
"name": "Derived",
"containerName": "",
"isLocal": true,
"containerName": "\"/tests/cases/fourslash/definitions\"",
"isLocal": false,
"isAmbient": false,
"unverified": false,
"failedAliasResolution": true
"unverified": false
},
{
"defId": 1,
"kind": "constructor",
"name": "__constructor",
"containerName": "Base",
"isLocal": false,
"isAmbient": false,
"unverified": false
}
]



// === goToDefinition ===
// === /tests/cases/fourslash/defInSameFile.ts ===
// import { Base } from './base'
// <|class [|SameFile|] extends Base {
// import { Base } from './definitions'
// <|class [|{| defId: 0 |}SameFile|] extends Base {
// readonly name: string = 'SameFile'
// }|>
// const SameFile = new /*GOTO DEF*/SameFile(cArg)
// const wrapper = new Base(cArg)

// === /tests/cases/fourslash/definitions.ts ===
// export class Base {
// [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|]
// }
//
// export class Derived extends Base {
// --- (line: 6) skipped ---

// === Details ===
[
{
"defId": 0,
"kind": "class",
"name": "SameFile",
"containerName": "",
"isLocal": true,
"isAmbient": false,
"unverified": false,
"failedAliasResolution": false
},
{
"defId": 1,
"kind": "constructor",
"name": "__constructor",
"containerName": "Base",
"isLocal": false,
"isAmbient": false,
"unverified": false,
"failedAliasResolution": false
}
]



// === goToDefinition ===
// === /tests/cases/fourslash/hasConstructor.ts ===
// import { Base } from './base'
// import { Base } from './definitions'
// <|class [|{| defId: 0 |}HasConstructor|] extends Base {
// [|{| defId: 1 |}constructor() {}|]
// readonly name: string = '';
Expand Down Expand Up @@ -78,23 +116,42 @@


// === goToDefinition ===
// === /tests/cases/fourslash/definitions.ts ===
// <|export class [|{| defId: 0 |}Base|] {
// [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|]
// }|>
//
// export class Derived extends Base {
// readonly email = this.cArg.getByLabel('Email')
// readonly password = this.cArg.getByLabel('Password')
// }

// === /tests/cases/fourslash/defInSameFile.ts ===
// <|import { [|Base|] } from './base'|>
// import { Base } from './definitions'
// class SameFile extends Base {
// readonly name: string = 'SameFile'
// }
// const SameFile = new SameFile(cArg)
// const wrapper = new /*GOTO DEF*/Base(cArg)
// const wrapper = new /*GOTO DEF*/[|Base|](cArg)

// === Details ===
[
{
"kind": "alias",
"defId": 0,
"kind": "class",
"name": "Base",
"containerName": "",
"isLocal": true,
"containerName": "\"/tests/cases/fourslash/definitions\"",
"isLocal": false,
"isAmbient": false,
"unverified": false,
"failedAliasResolution": true
"unverified": false
},
{
"defId": 1,
"kind": "constructor",
"name": "__constructor",
"containerName": "Base",
"isLocal": false,
"isAmbient": false,
"unverified": false
}
]
6 changes: 3 additions & 3 deletions tests/cases/fourslash/goToDefinitionClassConstructors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
//// }

// @filename: main.ts
//// import { Derived } from './base'
//// import { Derived } from './definitions'
//// const derived = new [|/*Derived*/Derived|](cArg)

// @filename: defInSameFile.ts
//// import { Base } from './base'
//// import { Base } from './definitions'
//// class SameFile extends Base {
//// readonly name: string = 'SameFile'
//// }
//// const SameFile = new [|/*SameFile*/SameFile|](cArg)
//// const wrapper = new [|/*Base*/Base|](cArg)

// @filename: hasConstructor.ts
//// import { Base } from './base'
//// import { Base } from './definitions'
//// class HasConstructor extends Base {
//// constructor() {}
//// readonly name: string = '';
Expand Down
Loading