- Run
yarn tsc --watch - Change
fnon line 4 of classnames.d.ts to return anumberinstead of astring
Expected: Type error on line 4 of index.ts: Type 'number' is not assignable to type 'string'.
Actual: No type error in CLI, though error does show in VSCode
- Comment out the import statement of classnames.d.ts, turning it into a module declaration instead of a module augmentation
- Run
yarn tsc --watch. An error shows up on line 1 of index.ts, sayingModule '"classnames"' has no exported member 'Argument'(this is expected since the module declaration overrode all other exports fromclassnames) - Change
fnon line 4 of classnames.d.ts to return anumberinstead of astring
Result: Type error on line 4 of index.ts: Type 'number' is not assignable to type 'string'.