import type { AsCell, Cell, IKeyable } from "../index.ts"; type Reaction = { type: Cell; count: Cell; lastUpdated: Cell; }; type CommentThread = { author: Cell; text: Cell; reactions: Cell>>; replies: Cell>>; }; type Profile = { id: Cell; info: Cell<{ displayName: Cell; biography: Cell; location: Cell<{ city: Cell; region: Cell; coordinates: Cell<{ lat: Cell; lng: Cell }>; }>; }>; preferences: Cell<{ notifications: Cell>>; shortcuts: Cell>>; }>; }; type Post = { id: Cell; content: Cell; tags: Cell>>; comments: Cell>>; analytics: Cell<{ impressions: Cell; conversions: Cell; breakdown: Cell>>; }>; }; type RegistryEntry = { version: Cell; notes: Cell; author: Cell; metadata: Cell>>; }; type ComplexValue = { profile: Profile; posts: Cell>>; analytics: Cell<{ totals: Cell<{ views: Cell; visitors: Cell; watchTime: Cell; }>; trends: Cell; delta: Cell }>>>; segments: Cell< Record; score: Cell }>> >; }>; registry: Cell<{ active: Cell>>; archived: Cell>>; settings: Cell<{ flags: Cell>>; categories: Cell>>; }>; }>; timeline: Cell< Array< Cell<{ at: Cell; state: Cell<{ profile: Profile; headline: Cell; metrics: Cell<{ score: Cell; level: Cell }>; }>; }> > >; }; type ComplexKeyable = IKeyable, AsCell>; type KeyAccess = ComplexKeyable["key"] extends (key: K) => infer R ? R : never; type Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"; type StressLiteral = | keyof ComplexValue | `alias_${keyof ComplexValue & string}` | `shadow_${Digit}${Digit}` | `custom_${Digit}${Digit}`; type StressKeyMatrix = { [K in StressLiteral]: { direct: KeyAccess; widened: KeyAccess; propertyKey: KeyAccess; doubleAlias: KeyAccess; cross: { [P in StressLiteral]: KeyAccess< K | P | "profile" | "analytics" | "registry" | `${P & string}_extra` >; }; }; }; type StressKeyUnion = StressKeyMatrix[keyof StressKeyMatrix]["cross"][keyof StressKeyMatrix]; type StressKeySummary = { entries: StressKeyUnion; literal: KeyAccess<"profile" | "posts" | "analytics" | "registry">; unionized: KeyAccess; fallback: KeyAccess; nested: KeyAccess<`${keyof ComplexValue & string}_${Digit}${Digit}`>; }; type StressKeyGrid = { [K in StressLiteral]: [ KeyAccess, KeyAccess, KeyAccess, KeyAccess, KeyAccess, ]; }; type StressKeyExpansion = [ StressKeyMatrix, StressKeyUnion, StressKeySummary, StressKeyGrid[keyof StressKeyGrid], ];