提交 a73867d8 编写于 作者: J Johannes Rieken

replace 'declare var...' with 'declare const...', related #87644

上级 1f3ff416
......@@ -6,7 +6,7 @@
import * as strings from 'vs/base/common/strings';
import * as streams from 'vs/base/common/stream';
declare var Buffer: any;
declare const Buffer: any;
const hasBuffer = (typeof Buffer !== 'undefined');
const hasTextEncoder = (typeof TextEncoder !== 'undefined');
......
......@@ -187,7 +187,7 @@ const BufferPresets = {
Object: createOneByteBuffer(DataType.Object),
};
declare var Buffer: any;
declare const Buffer: any;
const hasBuffer = (typeof Buffer !== 'undefined');
function serialize(writer: IWriter, data: any): void {
......
......@@ -79,7 +79,7 @@ interface IETextRange {
setEndPoint(how: string, SourceRange: IETextRange): void;
}
declare var IETextRange: {
declare const IETextRange: {
prototype: IETextRange;
new(): IETextRange;
};
......
......@@ -5,7 +5,7 @@
import * as strings from 'vs/base/common/strings';
declare var TextDecoder: any; // TODO@TypeScript
declare const TextDecoder: any; // TODO@TypeScript
interface TextDecoder {
decode(view: Uint16Array): string;
}
......
......@@ -322,7 +322,7 @@ export interface IForeignModuleFactory {
(ctx: IWorkerContext, createData: any): any;
}
declare var require: any;
declare const require: any;
/**
* @internal
......
......@@ -16,7 +16,7 @@ const _enableTracing = false;
// PROXY
// Ghetto-declare of the global Proxy object. This isn't the proper way
// but allows us to run this code in the browser without IE11.
declare var Proxy: any;
declare const Proxy: any;
const _canUseProxy = typeof Proxy === 'function';
class CyclicDependencyError extends Error {
......
......@@ -49,7 +49,7 @@ namespace Timer {
}
}
declare var __dirname: string;
// declare var __dirname: string;
// Checkout sources to run against:
// git clone --separate-git-dir=testGit --no-checkout --single-branch https://chromium.googlesource.com/chromium/src testWorkspace
......
......@@ -36,7 +36,7 @@ import { ITextResourcePropertiesService } from 'vs/editor/common/services/textRe
import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings';
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
declare var __dirname: string;
// declare var __dirname: string;
// Checkout sources to run against:
// git clone --separate-git-dir=testGit --no-checkout --single-branch https://chromium.googlesource.com/chromium/src testWorkspace
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册