diff --git a/packages/eslint-plugin/docs/rules/no-explicit-any.md b/packages/eslint-plugin/docs/rules/no-explicit-any.md index efec50113734..d3c5d7617425 100644 --- a/packages/eslint-plugin/docs/rules/no-explicit-any.md +++ b/packages/eslint-plugin/docs/rules/no-explicit-any.md @@ -98,7 +98,7 @@ function greet(param: Array): Array {} A boolean to specify if arrays from the rest operator are considered okay. `false` by default. -Examples of **incorrect** code for the `{ "ignoreRestArgs": false }` option: +The examples below are **incorrect** when `{ignoreRestArgs: false}`, but **correct** when `{ignoreRestArgs: true}`. ```ts /*eslint @typescript-eslint/no-explicit-any: ["error", { "ignoreRestArgs": false }]*/ @@ -127,35 +127,6 @@ interface Garply { } ``` -Examples of **correct** code for the `{ "ignoreRestArgs": true }` option: - -```ts -/*eslint @typescript-eslint/no-explicit-any: ["error", { "ignoreRestArgs": true }]*/ - -function foo1(...args: any[]): void {} -function foo2(...args: readonly any[]): void {} -function foo3(...args: Array): void {} -function foo4(...args: ReadonlyArray): void {} - -declare function bar(...args: any[]): void; - -const baz = (...args: any[]) => {}; -const qux = function (...args: any[]) {}; - -type Quux = (...args: any[]) => void; -type Quuz = new (...args: any[]) => void; - -interface Grault { - (...args: any[]): void; -} -interface Corge { - new (...args: any[]): void; -} -interface Garply { - f(...args: any[]): void; -} -``` - ## When Not To Use It If an unknown type or a library without typings is used pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy