Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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.

Interface keys can falsely violate no-use-before-define #435

Copy link
Copy link
Closed
@ncknuna

Description

@ncknuna
Issue body actions

What version of TypeScript are you using?
2.6.2

What version of typescript-eslint-parser are you using?
11.0.0

What code were you trying to parse?

interface Foo {
    bar: string
}

const bar = 'blah'

What did you expect to happen?
The code to be considered valid from the perspective of no-use-before-define, or the README to call out that this is an unsupported case.

What happened?
The key bar in the interface on line 2 was flagged as being used before defined. If I removed the later const bar... assignment, the lint error went away.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.