Skip to content

Make AccessorDeclaration.body optional#20329

Merged
mhegazy merged 2 commits into
microsoft:masterfrom
ajafff:update-types4
Nov 29, 2017
Merged

Make AccessorDeclaration.body optional#20329
mhegazy merged 2 commits into
microsoft:masterfrom
ajafff:update-types4

Conversation

@ajafff
Copy link
Copy Markdown
Contributor

@ajafff ajafff commented Nov 29, 2017

GetAccessorDeclaration and SetAccessorDeclaration don't always have a body.
Consider abstract accessors:

class MyClass {
  abstract get prop(): string;
  abstract set prop(v: string): void;
}

This PR changes the type declaration of the body property to allow undefined.

@mhegazy mhegazy merged commit 0b9e498 into microsoft:master Nov 29, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants