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
This commit is contained in:
Matt Bierner
2018-10-03 14:18:27 -07:00
parent 63e3162bc9
commit f7456ebf90
43 changed files with 50 additions and 7286 deletions

View File

@@ -18,7 +18,7 @@ class DecorationRequestsQueue {
private _requests: { [id: number]: DecorationRequest } = Object.create(null);
private _resolver: { [id: number]: (data: DecorationData) => any } = Object.create(null);
private _timer: number;
private _timer: any;
constructor(
private _proxy: ExtHostDecorationsShape

View File

@@ -36,7 +36,7 @@ export class BoundModelReferenceCollection {
add(ref: IReference<ITextEditorModel>): void {
let length = ref.object.textEditorModel.getValueLength();
let handle: number;
let handle: any;
let entry: { length: number, dispose(): void };
const dispose = () => {
let idx = this._data.indexOf(entry);

View File

@@ -35,7 +35,7 @@ export class HeapService implements IHeapService {
private _activeSignals = new WeakMap<any, object>();
private _activeIds = new Set<number>();
private _consumeHandle: number;
private _consumeHandle: any;
constructor() {
//

View File

@@ -242,7 +242,7 @@ class ExtHostQuickInput implements QuickInput {
private _onDidChangeValueEmitter = new Emitter<string>();
private _onDidTriggerButtonEmitter = new Emitter<QuickInputButton>();
private _onDidHideEmitter = new Emitter<void>();
private _updateTimeout: number;
private _updateTimeout: any;
private _pendingUpdate: TransferQuickInput = { id: this._id };
private _disposed = false;

View File

@@ -208,7 +208,7 @@ class BatchedCollector<T> {
private totalNumberCompleted = 0;
private batch: T[] = [];
private batchSize = 0;
private timeoutHandle: number;
private timeoutHandle: any;
constructor(private maxBatchSize: number, private cb: (items: T[]) => void) {
}

View File

@@ -22,7 +22,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
private _color: string | ThemeColor;
private _command: string;
private _timeoutHandle: number;
private _timeoutHandle: any;
private _proxy: MainThreadStatusBarShape;
private _extensionId: string;
@@ -173,7 +173,7 @@ export class ExtHostStatusBar {
setStatusBarMessage(text: string, timeoutOrThenable?: number | Thenable<any>): Disposable {
let d = this._statusMessage.setMessage(text);
let handle: number;
let handle: any;
if (typeof timeoutOrThenable === 'number') {
handle = setTimeout(() => d.dispose(), timeoutOrThenable);