Type Alias: ImmutableSynced<T>

ImmutableSynced<T> = IsUntypedSyncedObject<T> extends true ? SyncedObject : T extends Date ? Date : T extends bigint | JsonPrimitive ? T : T extends (...arguments_) => unknown ? never : T extends readonly unknown[] ? { readonly [Key in keyof T]: ImmutableSynced<T[Key]> } : T extends object ? { readonly [Key in keyof T]: ImmutableSynced<T[Key]> } : never

The immutable snapshot form of a game-defined synced-object shape.

Objects and arrays are deeply readonly in TypeScript. Date values retain the standard Date type for its read methods, but the SDK makes their mutation methods throw at runtime.

Type Parameters

T

T