diff options
Diffstat (limited to 'tools/ts_library_builder')
-rw-r--r-- | tools/ts_library_builder/build_library.ts | 10 | ||||
-rw-r--r-- | tools/ts_library_builder/test.ts | 13 |
2 files changed, 6 insertions, 17 deletions
diff --git a/tools/ts_library_builder/build_library.ts b/tools/ts_library_builder/build_library.ts index 22268f1dc..678a603ae 100644 --- a/tools/ts_library_builder/build_library.ts +++ b/tools/ts_library_builder/build_library.ts @@ -210,16 +210,6 @@ export function prepareFileForMerge({ true ); - // `globalThis` accesses the global scope and is defined here: - // https://github.com/tc39/proposal-global - addVariableDeclaration( - targetSourceFile, - "globalThis", - interfaceName, - true, - true - ); - // Add self reference to the global variable addInterfaceProperty(interfaceDeclaration, globalVarName, interfaceName); diff --git a/tools/ts_library_builder/test.ts b/tools/ts_library_builder/test.ts index 2b6abe714..d5f9de646 100644 --- a/tools/ts_library_builder/test.ts +++ b/tools/ts_library_builder/test.ts @@ -173,25 +173,24 @@ function buildLibraryMerge(): void { assert.equal(targetSourceFile.getInterfaces().length, 2); const variableDeclarations = targetSourceFile.getVariableDeclarations(); assert.equal(variableDeclarations[0].getType().getText(), `FooBar`); - assert.equal(variableDeclarations[1].getType().getText(), `FooBar`); - assert.equal(variableDeclarations[2].getType().getText(), `moduleC.Bar`); + assert.equal(variableDeclarations[1].getType().getText(), `moduleC.Bar`); assert.equal( - variableDeclarations[3].getType().getText(), + variableDeclarations[2].getType().getText(), `typeof moduleC.qat` ); assert.equal( - variableDeclarations[4].getType().getText(), + variableDeclarations[3].getType().getText(), `typeof moduleE.process` ); assert.equal( - variableDeclarations[5].getType().getText(), + variableDeclarations[4].getType().getText(), `typeof moduleD.reprocess` ); assert.equal( - variableDeclarations[6].getType().getText(), + variableDeclarations[5].getType().getText(), `typeof moduleC.Bar` ); - assert.equal(variableDeclarations.length, 7); + assert.equal(variableDeclarations.length, 6); const typeAliases = targetSourceFile.getTypeAliases(); assert.equal(typeAliases[0].getName(), "Bar"); assert.equal(typeAliases[0].getType().getText(), "moduleC.Bar"); |