(text: string, source: string)
| 578 | } |
| 579 | |
| 580 | export function parseStateJson(text: string, source: string): State { |
| 581 | return parseJsonWithSchema({ |
| 582 | schema: StateSchema, |
| 583 | text, |
| 584 | source, |
| 585 | recoveryHint: `Fix the offending fields or delete ${source} to start fresh.`, |
| 586 | normalize: normalizeLegacyStateValue, |
| 587 | }); |
| 588 | } |
| 589 | |
| 590 | export function parseTreeStateJson(text: string, source: string): TreeState { |
| 591 | let value: unknown; |
no test coverage detected