Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d91a5fc

Browse files
authored
fix(eslint-plugin): [ban-types] update message to suggest object instead of Record<string, unknown> (typescript-eslint#6079)
1 parent 8a91cbd commit d91a5fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/eslint-plugin/src/rules/ban-types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ const defaultTypes: Types = {
8686
Object: {
8787
message: [
8888
'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.',
89-
'- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
89+
'- If you want a type meaning "any object", you probably want `object` instead.',
9090
'- If you want a type meaning "any value", you probably want `unknown` instead.',
9191
].join('\n'),
9292
},
9393
'{}': {
9494
message: [
9595
'`{}` actually means "any non-nullish value".',
96-
'- If you want a type meaning "any object", you probably want `Record<string, unknown>` instead.',
96+
'- If you want a type meaning "any object", you probably want `object` instead.',
9797
'- If you want a type meaning "any value", you probably want `unknown` instead.',
9898
'- If you want a type meaning "empty object", you probably want `Record<string, never>` instead.',
9999
].join('\n'),

0 commit comments

Comments
 (0)