Skip to content

Support new TypeScript syntax - get/set in non-class scopes #13071

@RyanCavanaugh

Description

@RyanCavanaugh

Feature Request

TypeScript 4.3 intends to ship support for different get/set read/write types; this feature requires that we allow new syntax in interfaces and object type literals.

  • I would like to work on this feature!

Is your feature request related to a problem?

These are legal in typescript@next but not yet supported by Babel

interface X {
  get foo(): string;
  set foo(v: string | number);
}
type Y = {
  get bar(): string;
  set bar(v: string | number);
}

Describe the solution you'd like

These just need to get discarded like other TS constructs, natrually.

Documentation, Adoption, Migration Strategy

Full details and further discussion available at at microsoft/TypeScript#43420

Metadata

Metadata

Assignees

Labels

area: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions