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.

node.optional sometimes is on key, sometimes on ClassProperty #472

Closed
@duailibe

Description

@duailibe

What version of TypeScript are you using?

2.8.0-rc

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

14.0.0

What code were you trying to parse?

class X {
  foo?: string;
  "foo-bar"?: string;

What did you expect to happen?

Either the ClassProperty has optional: true or its key for both cases

What happened?

In the first case, optional: true is set on the key, and in the second case it's set on the ClassProperty

cc @JamesHenry

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions