From 1ab92f34420bba4fa83da4ea518c862cab105273 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 30 Aug 2026 09:50:40 +0100 Subject: Generate fields for structs in typescript-types --- examples/01-struct/output/typescript/src/point.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'examples/01-struct') 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; + } } -- cgit v1.2.3