Skip to content

Do not display variables before they are initialized #168

@zardoy

Description

@zardoy

I found its useless to display variables before they are initialized. For example:

if (true) {
  | // a is displayed but shouldn't as it cant be used yet
}
const a = 5

However:

const b = () => {
    // here, a is okay to display, so check should not go outside of current function
}

const a = 5

Enabling it by default could surprise some users (it will be noticable completions change), also I'm not sure of any edge cases so lets make it optionable with setting (but with recommended flag)

Metadata

Metadata

Assignees

Labels

PrioritizedThis one is prioritized over other issues (actually p-2)suggestions-editRemove or modify suggestions in some places

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions