From b9920b20cd770de5ff803f12d31fb0797b07bb70 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 28 Nov 2026 01:21:09 +0100 Subject: [PATCH] thing-contract (TS): list slots name ImmutableArray, as C# --- packages/thing-contract/src/codecs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/thing-contract/src/codecs.ts b/packages/thing-contract/src/codecs.ts index eb55dfc..c8dfc1c 100644 --- a/packages/thing-contract/src/codecs.ts +++ b/packages/thing-contract/src/codecs.ts @@ -25,13 +25,13 @@ const named = (name: string): string => `GameCult.Thing.Contract.${name}`; const blob = present(bytes); -// The C# member type of a list slot is IReadOnlyList; cultcache-ts names only List (a stopgap, until -// thing2:follow_up:cultcache-ts-readonly-list-name lands). A list slot is required. +// The C# member type of a list slot is ImmutableArray, a whole-value holder; cultcache-ts names only List +// (a stopgap, until thing2:follow_up:cultcache-ts-readonly-list-name lands). A list slot is required. const readOnlyList = (item: Codec): Codec => { const inner = sequence(item); const readOnly: Codec = { get typeName() { - return item.typeName === undefined ? undefined : `System.Collections.Generic.IReadOnlyList<${item.typeName}>`; + return item.typeName === undefined ? undefined : `System.Collections.Immutable.ImmutableArray<${item.typeName}>`; }, encode: (value) => inner.encode(value), decode: (raw) => inner.decode(raw),