Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Repro
{"rules": {"@typescript-eslint/no-unnecessary-type-assertion":"error" }}functiontest(){letresolve:()=>voidnewPromise(resolve0=>{resolve=resolve0})returnresolve!}
Expected Result
No errors because it's a syntax error if I removed the!.
Actual Result
6:12 error This assertion is unnecessary since it does not change the type of the expression @typescript-eslint/no-unnecessary-type-assertionAdditional Info
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin | 1.7.0 |
@typescript-eslint/parser | 1.7.0 |
TypeScript | 3.4.3 |
ESLint | 5.16.0 |
node | 10.15.3 |
npm | 6.9.0 |