From d438a6d259f79d1dd98d50ada01debbe24ca5a29 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Sun, 2 Jun 2019 01:13:36 +1000 Subject: Upgrade TypeScript to 3.5.1 (#2437) --- tools/ts_library_builder/build_library.ts | 10 ---------- tools/ts_library_builder/test.ts | 13 ++++++------- 2 files changed, 6 insertions(+), 17 deletions(-) (limited to 'tools') 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"); -- cgit v1.2.3