( def: QueryDef, label: string, snapshots: Iterable<unknown> )
| 3936 | * @internal |
| 3937 | */ |
| 3938 | export const makeSnapshotMap = ( |
| 3939 | def: QueryDef, |
| 3940 | label: string, |
| 3941 | snapshots: Iterable<unknown> |
| 3942 | ): SnapshotMapImpl => { |
| 3943 | const entries = new Map<string, SnapshotImpl>() |
| 3944 | for (const snapshot of snapshots) { |
| 3945 | const data = snapshotData(snapshot)! |
| 3946 | entries.set(data.argsKey!, snapshot as SnapshotImpl) |
| 3947 | } |
| 3948 | return new SnapshotMapImpl({ def, label, entries }) |
| 3949 | } |
| 3950 | |
| 3951 | /** @internal */ |
| 3952 | export const snapshotMapData = (u: unknown): SnapshotMapData | undefined => |
no test coverage detected