Skip to content

Commit f7456eb

Browse files
committed
Switch to use standard @types/node types instead of our customized version
Using a custom version of the node typings is causing a lot of pain while trying to upgrade our build to use `@types` instead of the `d.ts` files we have to maintain. I believe we primarily maintain our own version for two reason: - Custom require function - setTimeout and other timer functions return NodeJs.timer instead of a number These can both be delt with, the first by using interface augmentation and the second by switching to use any types for timer. I believe that the pain of maintaining our own node `d.ts` outweighs the benefits here This change switches us to use the standard @types/node package for our node typings
1 parent 63e3162 commit f7456eb

43 files changed

Lines changed: 50 additions & 7286 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/lib/compilation.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ function createCompile(src, build, emitError) {
6565
var typesDts = [
6666
'node_modules/typescript/lib/*.d.ts',
6767
'node_modules/@types/**/*.d.ts',
68-
'!node_modules/@types/node/**/*',
6968
'!node_modules/@types/webpack/**/*',
7069
'!node_modules/@types/uglify-js/**/*',
7170
];

build/lib/compilation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ function createCompile(src: string, build: boolean, emitError?: boolean): (token
7575
const typesDts = [
7676
'node_modules/typescript/lib/*.d.ts',
7777
'node_modules/@types/**/*.d.ts',
78-
'!node_modules/@types/node/**/*',
7978
'!node_modules/@types/webpack/**/*',
8079
'!node_modules/@types/uglify-js/**/*',
8180
];

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@types/keytar": "^4.0.1",
6060
"@types/minimist": "^1.2.0",
6161
"@types/mocha": "2.2.39",
62+
"@types/node": "^8.9.1",
6263
"@types/semver": "^5.5.0",
6364
"@types/sinon": "^1.16.36",
6465
"@types/webpack": "^4.4.10",
@@ -148,4 +149,4 @@
148149
"windows-mutex": "^0.2.0",
149150
"windows-process-tree": "0.2.2"
150151
}
151-
}
152+
}

src/typings/electron.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Definitions by: The Electron Team <https://github.com/electron/electron>
44
// Definitions: https://github.com/electron/electron-typescript-definitions
55

6-
/// <reference path="./node.d.ts" />
6+
/// <reference types="node" />
77

88
type GlobalEvent = Event;
99

src/typings/iconv-lite.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
/// <reference path='./node.d.ts'/>
6+
/// <reference types='node'/>
77

88
declare module 'iconv-lite' {
99
export function decode(buffer: Buffer, encoding: string): string;

0 commit comments

Comments
 (0)