What version of typescript-eslint-parser are you using?
21.0.0
What code were you trying to parse?
function test(file: Blob) {
const slice: typeof file.slice =
file.slice || (file as any).webkitSlice || (file as any).mozSlice
return slice
}
What did you expect to happen?
No error should be in eslint output
What happened?
41:28 error 'slice' was used before it was defined no-use-before-define
This worked fine with typescript-eslint-parser@20.0.0. file.slice is defined, as file is a Blob argument. I think the parser mistakes it with the const slice.
What version of TypeScript are you using? 3.1.3
What version of
typescript-eslint-parser
are you using? 21.0.0What code were you trying to parse?
What did you expect to happen? No error should be in
eslint
outputWhat happened?
This worked fine with
typescript-eslint-parser@20.0.0
.file.slice
is defined, asfile
is aBlob
argument. I think the parser mistakes it with theconst slice
.