-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Description
From what I understand, T | unknown and T | any resolve to just unknown and any respectively, so I don't think they're particularly useful.
Fail
type MaybeNumber = number | unknown;
function isNumber(value: number | any): value is number {
return typeof value === 'number';
}Pass
type MaybeNumber = unknown;
function isNumber(value: any): value is number {
return typeof value === 'number';
}Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
