Skip to content

Commit 0640deb

Browse files
noUnusedParameters: add note about underscore prefix exception (#3178)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
1 parent 9daddd7 commit 0640deb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/tsconfig-reference/copy/en/options/noUnusedParameters.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ const createDefaultKeyboard = (modelID: number) => {
1313
return { type: "keyboard", modelID: defaultModelID };
1414
};
1515
```
16+
17+
Parameters declaration with names starting with an underscore (`_`) are exempt from the unused parameter checking. e.g.:
18+
19+
```ts twoslash
20+
// @noUnusedParameters
21+
const createDefaultKeyboard = (_modelID: number) => {
22+
return { type: "keyboard" };
23+
};
24+
```

0 commit comments

Comments
 (0)