This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
no-redeclare throws errors on overloaded functions #402
Closed
Description
What version of TypeScript are you using?
2.5.3
What version of typescript-eslint-parser
are you using?
8.0.0
What code were you trying to parse?
export async function readFile(
filename: string,
options?: { flag?: string }
): Promise<Buffer>
export async function readFile(
filename: string,
options?: { encoding: BufferEncoding; flag?: string }
): Promise<string>
export async function readFile(
filename: string,
options?: { encoding?: string; flag?: string }
): Promise<Buffer | string> {
// ...
}
What did you expect to happen?
No errors — readFile
is only declared once.
What happened?
'readFile' is already defined.