Skip to content
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
@j-f1

Description

@j-f1

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions