File tree 6 files changed +43
-26
lines changed
6 files changed +43
-26
lines changed Original file line number Diff line number Diff line change
1
+ import * as namespace from './namespace'
1
2
import { Class } from './class'
2
3
import { Enum } from './enum'
3
4
import { newFunction } from './function'
@@ -8,7 +9,8 @@ export function useEverything(): string {
8
9
new Class ( 'a' ) . classProperty +
9
10
renamedInterface ( ) . methodSignature ( 'a' ) +
10
11
Enum [ Enum . A ] +
11
- newFunction ( )
12
+ newFunction ( ) +
13
+ namespace . a . value
12
14
)
13
15
}
14
16
Original file line number Diff line number Diff line change 1
- declare namespace a {
1
+ export declare namespace a {
2
2
function hello ( ) : string
3
3
interface Interface {
4
4
hello : string
5
5
}
6
6
var i : Interface
7
+ export const value = 1
7
8
}
Original file line number Diff line number Diff line change 1
- import { Class } from './class '
1
+ import * as namespace from './namespace '
2
2
// definition syntax 1.0.0 src/`import.ts`/
3
3
//documentation ```ts\nmodule "import.ts"\n```
4
+ // ^^^^^^^^^ reference syntax 1.0.0 src/`namespace.ts`/
5
+ // ^^^^^^^^^^^^^ reference syntax 1.0.0 src/`namespace.ts`/
6
+ import { Class } from './class'
4
7
// ^^^^^ reference syntax 1.0.0 src/`class.ts`/Class#
5
8
// ^^^^^^^^^ reference syntax 1.0.0 src/`class.ts`/
6
9
import { Enum } from './enum'
28
31
// ^^^^ reference syntax 1.0.0 src/`enum.ts`/Enum#
29
32
// ^^^^ reference syntax 1.0.0 src/`enum.ts`/Enum#
30
33
// ^ reference syntax 1.0.0 src/`enum.ts`/Enum#A.
31
- newFunction ( )
34
+ newFunction ( ) +
32
35
// ^^^^^^^^^^^ reference syntax 1.0.0 src/`function.ts`/newFunction().
36
+ namespace . a . value
37
+ // ^^^^^^^^^ reference syntax 1.0.0 src/`namespace.ts`/
38
+ // ^ reference syntax 1.0.0 src/`namespace.ts`/a/
39
+ // ^^^^^ reference syntax 1.0.0 src/`namespace.ts`/a/value.
33
40
)
34
41
}
35
42
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ export declare namespace a {
2
+ // definition syntax 1.0.0 src/`namespace.ts`/
3
+ //documentation ```ts\nmodule "namespace.ts"\n```
4
+ // ^ definition syntax 1.0.0 src/`namespace.ts`/a/
5
+ // documentation ```ts\na: typeof a\n```
6
+ function hello ( ) : string
7
+ // ^^^^^ definition syntax 1.0.0 src/`namespace.ts`/a/hello().
8
+ // documentation ```ts\nfunction hello(): string\n```
9
+ interface Interface {
10
+ // ^^^^^^^^^ definition syntax 1.0.0 src/`namespace.ts`/a/Interface#
11
+ // documentation ```ts\ninterface Interface\n```
12
+ hello : string
13
+ // ^^^^^ definition syntax 1.0.0 src/`namespace.ts`/a/Interface#hello.
14
+ // documentation ```ts\n(property) hello: string\n```
15
+ }
16
+ var i : Interface
17
+ // ^ definition syntax 1.0.0 src/`namespace.ts`/a/i.
18
+ // documentation ```ts\nvar i: Interface\n```
19
+ // ^^^^^^^^^ reference syntax 1.0.0 src/`namespace.ts`/a/Interface#
20
+ export const value = 1
21
+ // ^^^^^ definition syntax 1.0.0 src/`namespace.ts`/a/value.
22
+ // documentation ```ts\nvar value: 1\n```
23
+ }
24
+
Original file line number Diff line number Diff line change @@ -389,7 +389,11 @@ export class FileIndexer {
389
389
return this . cached ( node , this . scipSymbol ( node . parent ) )
390
390
}
391
391
392
- if ( ts . isImportSpecifier ( node ) || ts . isImportClause ( node ) ) {
392
+ if (
393
+ ts . isImportSpecifier ( node ) ||
394
+ ts . isImportClause ( node ) ||
395
+ ts . isNamespaceImport ( node )
396
+ ) {
393
397
const tpe = this . checker . getTypeAtLocation ( node )
394
398
for ( const declaration of tpe . symbol ?. declarations || [ ] ) {
395
399
return this . scipSymbol ( declaration )
You can’t perform that action at this time.
0 commit comments