diff --git a/tests/fixtures/typescript/basics/declare-namespace-with-exported-function.result.js b/tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.result.js similarity index 100% rename from tests/fixtures/typescript/basics/declare-namespace-with-exported-function.result.js rename to tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.result.js diff --git a/tests/fixtures/typescript/basics/declare-namespace-with-exported-function.src.ts b/tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts similarity index 100% rename from tests/fixtures/typescript/basics/declare-namespace-with-exported-function.src.ts rename to tests/fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts diff --git a/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.result.js b/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.result.js new file mode 100644 index 0000000..fbdad2d --- /dev/null +++ b/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.result.js @@ -0,0 +1,151 @@ +module.exports = { + "body": [ + { + "flags": 2, + "loc": { + "end": { + "column": 32, + "line": 1 + }, + "start": { + "column": 0, + "line": 1 + } + }, + "modifiers": [ + { + "flags": 0, + "loc": { + "end": { + "column": 7, + "line": 1 + }, + "start": { + "column": 0, + "line": 1 + } + }, + "range": [ + 0, + 7 + ], + "type": "TSDeclareKeyword" + } + ], + "name": { + "loc": { + "end": { + "column": 31, + "line": 1 + }, + "start": { + "column": 15, + "line": 1 + } + }, + "range": [ + 15, + 31 + ], + "raw": "\"hot-new-module\"", + "type": "Literal", + "value": "hot-new-module" + }, + "range": [ + 0, + 32 + ], + "type": "TSModuleDeclaration" + } + ], + "loc": { + "end": { + "column": 32, + "line": 1 + }, + "start": { + "column": 0, + "line": 1 + } + }, + "range": [ + 0, + 32 + ], + "sourceType": "script", + "tokens": [ + { + "loc": { + "end": { + "column": 7, + "line": 1 + }, + "start": { + "column": 0, + "line": 1 + } + }, + "range": [ + 0, + 7 + ], + "type": "Identifier", + "value": "declare" + }, + { + "loc": { + "end": { + "column": 14, + "line": 1 + }, + "start": { + "column": 8, + "line": 1 + } + }, + "range": [ + 8, + 14 + ], + "type": "Identifier", + "value": "module" + }, + { + "loc": { + "end": { + "column": 31, + "line": 1 + }, + "start": { + "column": 15, + "line": 1 + } + }, + "range": [ + 15, + 31 + ], + "type": "String", + "value": "\"hot-new-module\"" + }, + { + "loc": { + "end": { + "column": 32, + "line": 1 + }, + "start": { + "column": 31, + "line": 1 + } + }, + "range": [ + 31, + 32 + ], + "type": "Punctuator", + "value": ";" + } + ], + "type": "Program" +}; diff --git a/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts b/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts new file mode 100644 index 0000000..b8df95b --- /dev/null +++ b/tests/fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts @@ -0,0 +1 @@ +declare module "hot-new-module";