diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-06-02 14:24:44 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 00:24:44 -0400 |
commit | 3fe6bc1b82a10bed1d907b749b1cc200659df612 (patch) | |
tree | 02e14128039d015a7256494a50476f61785e6f33 /cli/tests/unit/url_search_params_test.ts | |
parent | 8b1b4766a1e747437a2b88fcadc26162a1bec640 (diff) |
fix: Better use of @ts-expect-error (#6038)
Diffstat (limited to 'cli/tests/unit/url_search_params_test.ts')
-rw-r--r-- | cli/tests/unit/url_search_params_test.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cli/tests/unit/url_search_params_test.ts b/cli/tests/unit/url_search_params_test.ts index ce55a7520..227deeda7 100644 --- a/cli/tests/unit/url_search_params_test.ts +++ b/cli/tests/unit/url_search_params_test.ts @@ -177,8 +177,8 @@ unitTest(function urlSearchParamsAppendArgumentsCheck(): void { const searchParams = new URLSearchParams(); let hasThrown = 0; try { - // @ts-expect-error - searchParams[method](); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (searchParams as any)[method](); hasThrown = 1; } catch (err) { if (err instanceof TypeError) { @@ -194,8 +194,8 @@ unitTest(function urlSearchParamsAppendArgumentsCheck(): void { const searchParams = new URLSearchParams(); let hasThrown = 0; try { - // @ts-expect-error - searchParams[method]("foo"); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (searchParams as any)[method]("foo"); hasThrown = 1; } catch (err) { if (err instanceof TypeError) { @@ -235,8 +235,10 @@ unitTest(function urlSearchParamsCustomSymbolIterator(): void { unitTest( function urlSearchParamsCustomSymbolIteratorWithNonStringParams(): void { const params = {}; - // @ts-expect-error - params[Symbol.iterator] = function* (): IterableIterator<[number, number]> { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (params as any)[Symbol.iterator] = function* (): IterableIterator< + [number, number] + > { yield [1, 2]; }; const params1 = new URLSearchParams((params as unknown) as string[][]); |