Do not use the {}
type to represent an empty object as representing any non-nullish value
#64
Labels
{}
type to represent an empty object as representing any non-nullish value
#64
Describe the bug
@typescript-eslint bans
{}
as type because it does not represent an empty object as most developers would expect, but "any non-nullish value" instead. As a workaround, we disabled the linting rule@typescript-eslint/ban-types
to not report a violation for{}
types.Expected behavior
We do not use the
{}
type to represent an empty object and have re-enabled the linting rule@typescript-eslint/ban-types
.See the following links for more information:
{}
by default! typescript-eslint/typescript-eslint#2063 (comment)The text was updated successfully, but these errors were encountered: