error TS2717: Subsequent property declarations must have the same type. Property ‘
verbose‘ must be of type ‘
boolean‘, but here has type ‘
Broken Code ❌
Fixed Code ✔️
When declaring a property (in this case
verbose) twice, then the second declaration must follow the typings of the first declaration:
Usually the error TS2717 shows up when you have multiple versions of typings (i.e.
@types/react) for the same interfaces in your codebase. If you run into these kind of problems, you can inspect your typing resolutions using
yarn why (i.e.
yarn why @types/react) or
npm explain (i.e.
npm explain @types/react) to find out where you have conflicting typings.