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),