typescript-eslint/typescript-eslint#528
- Run
npm install
oryarn
- Run
npm run typecheck
oryarn typecheck
-> no errors - Run
npm run lint
oryarn lint
D:\Projects\typescript-eslint-no-unnecessary-type-assertion-generic-function\index.ts
2:12 error This assertion is unnecessary since it does not change the type of the expression @typescript-eslint/no-unnecessary-type-assertion
✖ 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
- Run
npm run fix
oryarn fix
- Run
npm run typecheck
oryarn typecheck
index.ts:2:19 - error TS2339: Property 'value' does not exist on type 'Element'.
2 const a = (foo()).value;
~~~~~
Found 1 error.