Skip to content

Commit d6d2122

Browse files
committed
Enable type checking in more js build files
1 parent f71bd27 commit d6d2122

7 files changed

Lines changed: 10 additions & 9 deletions

File tree

build/builtin/browser-main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5+
//@ts-check
56

67
const fs = require('fs');
78
const path = require('path');

build/builtin/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5+
// @ts-check
56

67
const { app, BrowserWindow, ipcMain, dialog } = require('electron');
78
const url = require('url');

build/npm/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
5+
//@ts-check
66
const cp = require('child_process');
77
const path = require('path');
88
const fs = require('fs');

build/npm/preinstall.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
5+
//@ts-check
66
let err = false;
77

88
const nodeVersion = /^(\d+)\.(\d+)\.(\d+)/.exec(process.versions.node);
@@ -88,12 +88,11 @@ function hasSupportedVisualStudioVersion() {
8888

8989
function installHeaders() {
9090
const yarn = 'yarn.cmd';
91-
const opts = {
91+
const yarnResult = cp.spawnSync(yarn, ['install'], {
9292
env: process.env,
9393
cwd: path.join(__dirname, 'gyp'),
9494
stdio: 'inherit'
95-
};
96-
const yarnResult = cp.spawnSync(yarn, ['install'], opts);
95+
});
9796
if (yarnResult.error || yarnResult.status !== 0) {
9897
console.error(`Installing node-gyp failed`);
9998
err = true;

build/npm/update-all-grammars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
5+
//@ts-check
66
const cp = require('child_process');
77
const fs = require('fs');
88
const path = require('path');

build/npm/update-distro.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
5+
//@ts-check
66
const cp = require('child_process');
77
const path = require('path');
88
const fs = require('fs');
@@ -15,4 +15,4 @@ const packageJsonPath = path.join(vscodePath, 'package.json');
1515
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
1616

1717
packageJson.distro = commit;
18-
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
18+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));

build/npm/update-localization-extension.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
5+
//@ts-check
66
'use strict';
77

88
let i18n = require("../lib/i18n");

0 commit comments

Comments
 (0)