mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-25 20:24:04 +00:00
Use No Implicit Any In TS Extension (#16878)
Use noImplicitAny in the TS Extension (the TS team suggests enabling this option for most code).
This commit is contained in:
@@ -23,6 +23,8 @@ interface Configuration {
|
||||
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: boolean;
|
||||
placeOpenBraceOnNewLineForFunctions: boolean;
|
||||
placeOpenBraceOnNewLineForControlBlocks: boolean;
|
||||
|
||||
[key: string]: boolean;
|
||||
}
|
||||
|
||||
namespace Configuration {
|
||||
|
||||
@@ -69,7 +69,7 @@ export interface ITypescriptServiceClient {
|
||||
|
||||
onProjectLanguageServiceStateChanged: Event<Proto.ProjectLanguageServiceStateEventBody>;
|
||||
|
||||
logTelemetry(eventName: string, properties?: { [prop: string]: string });
|
||||
logTelemetry(eventName: string, properties?: { [prop: string]: string }): void;
|
||||
|
||||
experimentalAutoBuild: boolean;
|
||||
apiVersion: API;
|
||||
|
||||
@@ -14,7 +14,7 @@ var log = (function () {
|
||||
}
|
||||
var isFirst = true;
|
||||
var LOG_LOCATION = 'C:\\stdFork.log';
|
||||
return function log(str) {
|
||||
return function log(str: any) {
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
fs.writeFileSync(LOG_LOCATION, str + '\n');
|
||||
@@ -55,13 +55,13 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']);
|
||||
// handle process.stderr
|
||||
(<any>process).__defineGetter__('stderr', function () { return stdErrStream; });
|
||||
|
||||
var fsWriteSyncString = function (fd, str, position, encoding) {
|
||||
var fsWriteSyncString = function (fd: number, str: string, position: number, encoding?: string) {
|
||||
// fs.writeSync(fd, string[, position[, encoding]]);
|
||||
var buf = new Buffer(str, encoding || 'utf8');
|
||||
return fsWriteSyncBuffer(fd, buf, 0, buf.length);
|
||||
};
|
||||
|
||||
var fsWriteSyncBuffer = function (fd, buffer, off, len) {
|
||||
var fsWriteSyncBuffer = function (fd: number, buffer: Buffer, off: number, len: number) {
|
||||
off = Math.abs(off | 0);
|
||||
len = Math.abs(len | 0);
|
||||
|
||||
@@ -97,8 +97,8 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']);
|
||||
|
||||
// handle fs.writeSync(1, ...)
|
||||
var originalWriteSync = fs.writeSync;
|
||||
fs.writeSync = function (fd, data, position, encoding) {
|
||||
if (fd !== 1 || fd !== 2) {
|
||||
fs.writeSync = function (fd: number, data: any, position: number, encoding?: string) {
|
||||
if (fd !== 1 && fd !== 2) {
|
||||
return originalWriteSync.apply(fs, arguments);
|
||||
}
|
||||
// usage:
|
||||
@@ -125,7 +125,7 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']);
|
||||
(function () {
|
||||
|
||||
// Begin listening to stdin pipe
|
||||
var server = net.createServer(function (stream) {
|
||||
var server = net.createServer(function (stream: any) {
|
||||
// Stop accepting new connections, keep the existing one alive
|
||||
server.close();
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
"es2015.promise"
|
||||
],
|
||||
"outDir": "./out",
|
||||
"strictNullChecks": true
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
|
||||
Reference in New Issue
Block a user