From 3044c7177471e34416fd38549a28342a02fe9928 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 26 Nov 2024 14:26:46 -0500 Subject: [PATCH] chore: failing test for re-exported namespace member --- tests/specs/namespace_reexport_member.txt | 215 ++++++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 tests/specs/namespace_reexport_member.txt diff --git a/tests/specs/namespace_reexport_member.txt b/tests/specs/namespace_reexport_member.txt new file mode 100644 index 00000000..f34af312 --- /dev/null +++ b/tests/specs/namespace_reexport_member.txt @@ -0,0 +1,215 @@ +# mod.ts +import { Completions } from './resources.ts'; + +/** Doc */ +export class MyApi { + /** Doc */ + completions: Completions = {}; +} + +MyApi.Completions = Completions; + +/** Doc */ +export declare namespace MyApi { + export { + Completions as Completions, + }; +} + +export default MyApi; + +# resources.ts +/** Doc */ +export class Completions {} + +# output.txt +Defined in file:///mod.ts:4:1 + +class MyApi + Doc + + completions: Completions + Doc + +Defined in file:///mod.ts:4:1 + +class default + Doc + + completions: Completions + Doc + +Defined in file:///mod.ts:12:1 + +namespace MyApi + Doc + + +Defined in file:///mod.ts:12:1 + +namespace default + Doc + + +Defined in file:///mod.ts:1:1 + + + +# output.json +[ + { + "name": "MyApi", + "isDefault": false, + "location": { + "filename": "file:///mod.ts", + "line": 4, + "col": 0, + "byteIndex": 58 + }, + "declarationKind": "export", + "jsDoc": { + "doc": "Doc" + }, + "kind": "class", + "classDef": { + "isAbstract": false, + "constructors": [], + "properties": [ + { + "jsDoc": { + "doc": "Doc" + }, + "tsType": { + "repr": "Completions", + "kind": "typeRef", + "typeRef": { + "typeParams": null, + "typeName": "Completions" + } + }, + "readonly": false, + "accessibility": null, + "optional": false, + "isAbstract": false, + "isStatic": false, + "name": "completions", + "location": { + "filename": "file:///mod.ts", + "line": 6, + "col": 2, + "byteIndex": 95 + } + } + ], + "indexSignatures": [], + "methods": [], + "extends": null, + "implements": [], + "typeParams": [], + "superTypeParams": [] + } + }, + { + "name": "MyApi", + "isDefault": false, + "location": { + "filename": "file:///mod.ts", + "line": 12, + "col": 0, + "byteIndex": 175 + }, + "declarationKind": "export", + "jsDoc": { + "doc": "Doc" + }, + "kind": "namespace", + "namespaceDef": { + "elements": [] + } + }, + { + "name": "default", + "isDefault": true, + "location": { + "filename": "file:///mod.ts", + "line": 4, + "col": 0, + "byteIndex": 58 + }, + "declarationKind": "export", + "jsDoc": { + "doc": "Doc" + }, + "kind": "class", + "classDef": { + "isAbstract": false, + "constructors": [], + "properties": [ + { + "jsDoc": { + "doc": "Doc" + }, + "tsType": { + "repr": "Completions", + "kind": "typeRef", + "typeRef": { + "typeParams": null, + "typeName": "Completions" + } + }, + "readonly": false, + "accessibility": null, + "optional": false, + "isAbstract": false, + "isStatic": false, + "name": "completions", + "location": { + "filename": "file:///mod.ts", + "line": 6, + "col": 2, + "byteIndex": 95 + } + } + ], + "indexSignatures": [], + "methods": [], + "extends": null, + "implements": [], + "typeParams": [], + "superTypeParams": [] + } + }, + { + "name": "default", + "isDefault": true, + "location": { + "filename": "file:///mod.ts", + "line": 12, + "col": 0, + "byteIndex": 175 + }, + "declarationKind": "export", + "jsDoc": { + "doc": "Doc" + }, + "kind": "namespace", + "namespaceDef": { + "elements": [] + } + }, + { + "name": "Completions", + "location": { + "filename": "file:///mod.ts", + "line": 1, + "col": 0, + "byteIndex": 0 + }, + "declarationKind": "private", + "kind": "import", + "importDef": { + "src": "file:///resources.ts", + "imported": "Completions" + } + } +]