Fix hygiene/compile issues (release/1.26) (#14261)

* Fix hygiene issues

* Fix strict compile

* fixes

* compile fix

* more fixes

* more compile fixes

* last one?!

* fix tests
This commit is contained in:
Charles Gagnon
2021-02-11 22:02:55 -08:00
committed by GitHub
parent 4b87a0869f
commit abea315abb
34 changed files with 83 additions and 81 deletions

View File

@@ -17,7 +17,7 @@ export class TestChildProcessPromise<T> implements cp.ChildProcessPromise {
this.reject = reject;
});
}
resolve!: (value?: T | PromiseLike<T>) => void;
resolve!: (value: T | PromiseLike<T>) => void;
reject!: (reason?: any) => void;
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2> {
return this._promise.then(onFulfilled, onRejected);

View File

@@ -93,13 +93,13 @@ describe('WizardPage', () => {
return enabled;
});
// Used to ensure that we wait until the enabled state is updated for our mocked components before continuing
let enabledDeferred = new Deferred();
let enabledDeferred = new Deferred<void>();
initializeWizardPage(testWizardPage);
await contentRegistered.promise;
await enabledDeferred.promise;
should(stubInputBox.enabled).be.false('Input box should be disabled by default');
enabledDeferred = new Deferred();
enabledDeferred = new Deferred<void>();
stubCheckbox.checked = true;
// Now wait for the enabled state to be updated again
await enabledDeferred.promise;

View File

@@ -8,6 +8,6 @@ export class Deferred<T> {
this.resolve = resolve;
this.reject = reject;
});;
resolve!: (value?: T | PromiseLike<T>) => void;
resolve!: (value: T | PromiseLike<T>) => void;
reject!: (reason?: any) => void;
}