Skip to content

Commit

Permalink
docs(eslint-plugin): [prefer-readonly-parameter-types] fix invalid ex…
Browse files Browse the repository at this point in the history
…ample (#1791)
  • Loading branch information
bradzacher committed Mar 23, 2020
1 parent 258fdd0 commit b1b8284
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -74,7 +74,8 @@ function object3(arg: { readonly prop: { readonly prop2: string } }) {}
interface CustomArrayType extends ReadonlyArray<string> {
readonly prop: string;
}
function custom1(arg: CustomArrayType) {}
function custom1(arg: Readonly<CustomArrayType>) {}
// interfaces that extend the array types are not considered arrays, and thus must be made readonly.

interface CustomFunction {
(): void;
Expand Down

0 comments on commit b1b8284

Please sign in to comment.