diff options
Diffstat (limited to 'examples/01-struct')
| -rw-r--r-- | examples/01-struct/output/typescript/src/point.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/01-struct/output/typescript/src/point.ts b/examples/01-struct/output/typescript/src/point.ts index abdbe25..81f1b83 100644 --- a/examples/01-struct/output/typescript/src/point.ts +++ b/examples/01-struct/output/typescript/src/point.ts @@ -4,10 +4,26 @@ * A straight line from one point to another. */ class Line { + start: Point; + + end: Point; + + constructor(start: Point, end: Point) { + this.start = start; + this.end = end; + } } /** * A 2D point. */ class Point { + x: number; + + y: number; + + constructor(x: number, y: number) { + this.x = x; + this.y = y; + } } |
