-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed generated types for getters and setters (#4202)
- Loading branch information
1 parent
76776ef
commit 2f2ac1a
Showing
6 changed files
with
536 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export class Foo { | ||
free(): void; | ||
x: number; | ||
y?: number; | ||
z?: number; | ||
readonly lone_getter: number | undefined; | ||
set lone_setter(value: number | undefined); | ||
/** | ||
* You will only read numbers. | ||
*/ | ||
get weird(): number; | ||
/** | ||
* But you must write strings. | ||
* | ||
* Yes, this is totally fine in JS. | ||
*/ | ||
set weird(value: string | undefined); | ||
/** | ||
* There can be static getters and setters too, and they can even have the | ||
* same name as instance getters and setters. | ||
*/ | ||
static x?: boolean; | ||
} |
Oops, something went wrong.