From 5a15eaebcad9fe95772d7391bb2cc5b1b2a8c0d2 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 30 Aug 2026 14:17:09 +0100 Subject: Mark fields as readonly in typescript-types --- examples/01-struct/output/typescript/src/point.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (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 5dc76ee..fccae01 100644 --- a/examples/01-struct/output/typescript/src/point.ts +++ b/examples/01-struct/output/typescript/src/point.ts @@ -4,9 +4,9 @@ * A straight line from one point to another. */ class Line { - public start: Point; + public readonly start: Point; - public end: Point; + public readonly end: Point; public constructor(start: Point, end: Point) { this.start = start; @@ -20,9 +20,9 @@ export {Line}; * A 2D point. */ class Point { - public x: number; + public readonly x: number; - public y: number; + public readonly y: number; public constructor(x: number, y: number) { this.x = x; -- cgit v1.2.3