Compare commits
4 commits
main
...
lego/hb_99
Author | SHA1 | Date | |
---|---|---|---|
|
c12af62e43 | ||
|
3b502f4ec1 | ||
|
8cac241f9e | ||
|
b3178d4618 |
|
@ -757,6 +757,7 @@ namespace ts.server {
|
|||
name: item.name,
|
||||
kind: item.kind,
|
||||
kindModifiers: item.kindModifiers,
|
||||
containerName: item.containerName,
|
||||
span: this.decodeSpan(item.span, item.file),
|
||||
selectionSpan: this.decodeSpan(item.selectionSpan, item.file)
|
||||
};
|
||||
|
@ -778,7 +779,7 @@ namespace ts.server {
|
|||
|
||||
provideCallHierarchyIncomingCalls(fileName: string, position: number) {
|
||||
const args = this.createFileLocationRequestArgs(fileName, position);
|
||||
const request = this.processRequest<protocol.ProvideCallHierarchyIncomingCallsRequest>(CommandNames.PrepareCallHierarchy, args);
|
||||
const request = this.processRequest<protocol.ProvideCallHierarchyIncomingCallsRequest>(CommandNames.ProvideCallHierarchyIncomingCalls, args);
|
||||
const response = this.processResponse<protocol.ProvideCallHierarchyIncomingCallsResponse>(request);
|
||||
return response.body.map(item => this.convertCallHierarchyIncomingCall(item));
|
||||
}
|
||||
|
@ -792,7 +793,7 @@ namespace ts.server {
|
|||
|
||||
provideCallHierarchyOutgoingCalls(fileName: string, position: number) {
|
||||
const args = this.createFileLocationRequestArgs(fileName, position);
|
||||
const request = this.processRequest<protocol.ProvideCallHierarchyOutgoingCallsRequest>(CommandNames.PrepareCallHierarchy, args);
|
||||
const request = this.processRequest<protocol.ProvideCallHierarchyOutgoingCallsRequest>(CommandNames.ProvideCallHierarchyOutgoingCalls, args);
|
||||
const response = this.processResponse<protocol.ProvideCallHierarchyOutgoingCallsResponse>(request);
|
||||
return response.body.map(item => this.convertCallHierarchyOutgoingCall(fileName, item));
|
||||
}
|
||||
|
|
|
@ -6927,15 +6927,6 @@
|
|||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Module_0_has_no_exported_member_1_Did_you_mean_2_2724" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Module '{0}' has no exported member '{1}'. Did you mean '{2}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Per il modulo '{0}' non esiste alcun membro esportato '{1}'. Si intendeva '{2}'?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?]]></Val>
|
||||
|
@ -12564,6 +12555,15 @@
|
|||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";_0_has_no_exported_member_named_1_Did_you_mean_2_2724" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['{0}' has no exported member named '{1}'. Did you mean '{2}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[In '{0}' non è presente alcun membro esportato denominato '{1}'. Si intendeva '{2}'?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage.]]></Val>
|
||||
|
@ -12672,6 +12672,15 @@
|
|||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";_0_is_not_allowed_as_a_variable_declaration_name_1389" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['{0}' is not allowed as a variable declaration name.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['{0}' non è consentito come nome di una dichiarazione di variabile.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['{0}' is referenced directly or indirectly in its own base expression.]]></Val>
|
||||
|
|
|
@ -2408,6 +2408,7 @@ namespace ts.server {
|
|||
kind: item.kind,
|
||||
kindModifiers: item.kindModifiers,
|
||||
file: item.file,
|
||||
containerName: item.containerName,
|
||||
span: toProtocolTextSpan(item.span, scriptInfo),
|
||||
selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo)
|
||||
};
|
||||
|
|
|
@ -0,0 +1,165 @@
|
|||
╭ name: f
|
||||
├ kind: function
|
||||
├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts
|
||||
├ span:
|
||||
│ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:1:1-1:16
|
||||
│ │ 1: function f() {}
|
||||
│ │ ^^^^^^^^^^^^^^^
|
||||
│ ╰
|
||||
├ selectionSpan:
|
||||
│ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:1:10-1:11
|
||||
│ │ 1: function f() {}
|
||||
│ │ ^
|
||||
│ ╰
|
||||
├ incoming:
|
||||
│ ╭ from:
|
||||
│ │ ╭ name: sameName
|
||||
│ │ ├ kind: method
|
||||
│ │ ├ containerName: A
|
||||
│ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts
|
||||
│ │ ├ span:
|
||||
│ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:4:3-6:4
|
||||
│ │ │ │ 4: static sameName() {
|
||||
│ │ │ │ ^^^^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ 5: f();
|
||||
│ │ │ │ ^^^^^^^^
|
||||
│ │ │ │ 6: }
|
||||
│ │ │ │ ^^^
|
||||
│ │ │ ╰
|
||||
│ │ ├ selectionSpan:
|
||||
│ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:4:10-4:18
|
||||
│ │ │ │ 4: static sameName() {
|
||||
│ │ │ │ ^^^^^^^^
|
||||
│ │ │ ╰
|
||||
│ │ ├ incoming:
|
||||
│ │ │ ╭ from:
|
||||
│ │ │ │ ╭ name: sameName
|
||||
│ │ │ │ ├ kind: method
|
||||
│ │ │ │ ├ containerName: B
|
||||
│ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts
|
||||
│ │ │ │ ├ span:
|
||||
│ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:10:3-12:4
|
||||
│ │ │ │ │ │ 10: sameName() {
|
||||
│ │ │ │ │ │ ^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ 11: A.sameName();
|
||||
│ │ │ │ │ │ ^^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ 12: }
|
||||
│ │ │ │ │ │ ^^^
|
||||
│ │ │ │ │ ╰
|
||||
│ │ │ │ ├ selectionSpan:
|
||||
│ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:10:3-10:11
|
||||
│ │ │ │ │ │ 10: sameName() {
|
||||
│ │ │ │ │ │ ^^^^^^^^
|
||||
│ │ │ │ │ ╰
|
||||
│ │ │ │ ├ incoming:
|
||||
│ │ │ │ │ ╭ from:
|
||||
│ │ │ │ │ │ ╭ name: sameName
|
||||
│ │ │ │ │ │ ├ kind: getter
|
||||
│ │ │ │ │ │ ├ containerName: Obj
|
||||
│ │ │ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts
|
||||
│ │ │ │ │ │ ├ span:
|
||||
│ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:16:3-18:4
|
||||
│ │ │ │ │ │ │ │ 16: get sameName() {
|
||||
│ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ 17: return new B().sameName;
|
||||
│ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ 18: }
|
||||
│ │ │ │ │ │ │ │ ^^^
|
||||
│ │ │ │ │ │ │ ╰
|
||||
│ │ │ │ │ │ ├ selectionSpan:
|
||||
│ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:16:7-16:15
|
||||
│ │ │ │ │ │ │ │ 16: get sameName() {
|
||||
│ │ │ │ │ │ │ │ ^^^^^^^^
|
||||
│ │ │ │ │ │ │ ╰
|
||||
│ │ │ │ │ │ ├ incoming:
|
||||
│ │ │ │ │ │ │ ╭ from:
|
||||
│ │ │ │ │ │ │ │ ╭ name: sameName
|
||||
│ │ │ │ │ │ │ │ ├ kind: function
|
||||
│ │ │ │ │ │ │ │ ├ containerName: Foo
|
||||
│ │ │ │ │ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts
|
||||
│ │ │ │ │ │ │ │ ├ span:
|
||||
│ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:22:3-24:4
|
||||
│ │ │ │ │ │ │ │ │ │ 22: function sameName() {
|
||||
│ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ │ │ 23: return Obj.sameName;
|
||||
│ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ │ │ 24: }
|
||||
│ │ │ │ │ │ │ │ │ │ ^^^
|
||||
│ │ │ │ │ │ │ │ │ ╰
|
||||
│ │ │ │ │ │ │ │ ├ selectionSpan:
|
||||
│ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:22:12-22:20
|
||||
│ │ │ │ │ │ │ │ │ │ 22: function sameName() {
|
||||
│ │ │ │ │ │ │ │ │ │ ^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ │ ╰
|
||||
│ │ │ │ │ │ │ │ ├ incoming:
|
||||
│ │ │ │ │ │ │ │ │ ╭ from:
|
||||
│ │ │ │ │ │ │ │ │ │ ╭ name: C
|
||||
│ │ │ │ │ │ │ │ │ │ ├ kind: class
|
||||
│ │ │ │ │ │ │ │ │ │ ├ containerName: Foo
|
||||
│ │ │ │ │ │ │ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts
|
||||
│ │ │ │ │ │ │ │ │ │ ├ span:
|
||||
│ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:26:3-30:4
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ 26: export class C {
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ 27: constructor() {
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ 28: sameName();
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ 29: }
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ^^^^^
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ 30: }
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ^^^
|
||||
│ │ │ │ │ │ │ │ │ │ │ ╰
|
||||
│ │ │ │ │ │ │ │ │ │ ├ selectionSpan:
|
||||
│ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:26:16-26:17
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ 26: export class C {
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ^
|
||||
│ │ │ │ │ │ │ │ │ │ │ ╰
|
||||
│ │ │ │ │ │ │ │ │ │ ├ incoming:
|
||||
│ │ │ │ │ │ │ │ │ │ │ ╭ from:
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ╭ name: sameName
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ├ kind: function
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ├ containerName: Bar
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ├ span:
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:34:20-34:37
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ │ 34: const sameName = () => new Foo.C();
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ ╰
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ├ selectionSpan:
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:34:9-34:17
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ │ 34: const sameName = () => new Foo.C();
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ ╰
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ╰ incoming: none
|
||||
│ │ │ │ │ │ │ │ │ │ │ ├ fromSpans:
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:34:34-34:35
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ 34: const sameName = () => new Foo.C();
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ ^
|
||||
│ │ │ │ │ │ │ │ │ │ ╰ ╰ ╰
|
||||
│ │ │ │ │ │ │ │ │ ├ fromSpans:
|
||||
│ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:28:7-28:15
|
||||
│ │ │ │ │ │ │ │ │ │ │ 28: sameName();
|
||||
│ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^
|
||||
│ │ │ │ │ │ │ │ ╰ ╰ ╰
|
||||
│ │ │ │ │ │ │ ├ fromSpans:
|
||||
│ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:23:16-23:24
|
||||
│ │ │ │ │ │ │ │ │ 23: return Obj.sameName;
|
||||
│ │ │ │ │ │ │ │ │ ^^^^^^^^
|
||||
│ │ │ │ │ │ ╰ ╰ ╰
|
||||
│ │ │ │ │ ├ fromSpans:
|
||||
│ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:17:20-17:28
|
||||
│ │ │ │ │ │ │ 17: return new B().sameName;
|
||||
│ │ │ │ │ │ │ ^^^^^^^^
|
||||
│ │ │ │ ╰ ╰ ╰
|
||||
│ │ │ ├ fromSpans:
|
||||
│ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:11:7-11:15
|
||||
│ │ │ │ │ 11: A.sameName();
|
||||
│ │ │ │ │ ^^^^^^^^
|
||||
│ │ ╰ ╰ ╰
|
||||
│ ├ fromSpans:
|
||||
│ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:5:5-5:6
|
||||
│ │ │ 5: f();
|
||||
│ │ │ ^
|
||||
│ ╰ ╰
|
||||
╰ outgoing: none
|
|
@ -0,0 +1,40 @@
|
|||
/// <reference path="../fourslash.ts" />
|
||||
|
||||
////function /**/f() {}
|
||||
////
|
||||
////class A {
|
||||
//// static sameName() {
|
||||
//// f();
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////class B {
|
||||
//// sameName() {
|
||||
//// A.sameName();
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////const Obj = {
|
||||
//// get sameName() {
|
||||
//// return new B().sameName;
|
||||
//// }
|
||||
////};
|
||||
////
|
||||
////namespace Foo {
|
||||
//// function sameName() {
|
||||
//// return Obj.sameName;
|
||||
//// }
|
||||
////
|
||||
//// export class C {
|
||||
//// constructor() {
|
||||
//// sameName();
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////module Foo.Bar {
|
||||
//// const sameName = () => new Foo.C();
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.baselineCallHierarchy();
|
Loading…
Reference in a new issue