diff options
author | Maximilien Mellen <maxmellen0@gmail.com> | 2020-02-19 21:36:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 15:36:18 -0500 |
commit | 90125566bbaed8b5c6e55ca8dbc432e3433fb73c (patch) | |
tree | bf798a408b26264641260395ce8cfc9d4bb37637 /cli/js/mixins/dom_iterable_test.ts | |
parent | 852823fa505d75d61e70e1330bbf366aa248e650 (diff) |
Enable TS strict mode by default (#3899)
Fixes #3324
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/js/mixins/dom_iterable_test.ts')
-rw-r--r-- | cli/js/mixins/dom_iterable_test.ts | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/cli/js/mixins/dom_iterable_test.ts b/cli/js/mixins/dom_iterable_test.ts index 466375d64..5dc45dc20 100644 --- a/cli/js/mixins/dom_iterable_test.ts +++ b/cli/js/mixins/dom_iterable_test.ts @@ -20,11 +20,8 @@ function setup() { Base, // This is using an internal API we don't want published as types, so having // to cast to any to "trick" TypeScript - // eslint-disable-next-line @typescript-eslint/no-explicit-any - DomIterable: (Deno[Deno.symbols.internal] as any).DomIterableMixin( - Base, - dataSymbol - ) + // @ts-ignore TypeScript (as of 3.7) does not support indexing namespaces by symbol + DomIterable: Deno[Deno.symbols.internal].DomIterableMixin(Base, dataSymbol) }; } @@ -52,7 +49,12 @@ test(function testDomIterable(): void { result = []; const scope = {}; - function callback(value, key, parent): void { + function callback( + this: typeof scope, + value: number, + key: string, + parent: typeof domIterable + ): void { assertEquals(parent, domIterable); assert(key != null); assert(value != null); @@ -72,7 +74,7 @@ test(function testDomIterableScope(): void { // eslint-disable-next-line @typescript-eslint/no-explicit-any function checkScope(thisArg: any, expected: any): void { - function callback(): void { + function callback(this: typeof thisArg): void { assertEquals(this, expected); } domIterable.forEach(callback, thisArg); |