(json: string)
| 949 | const raise: EffectFactory<Raise> = effect("raise", { resumable: false }); |
| 950 | |
| 951 | const parseJSON = <T>(json: string): Effected<SyntaxError | Raise, T> => |
| 952 | effected(function* () { |
| 953 | try { |
| 954 | return JSON.parse(json); |
| 955 | } catch (e) { |
| 956 | if (e instanceof SyntaxError) return yield* syntaxError(e.message); |
| 957 | return yield* raise(e); |
| 958 | } |
| 959 | }); |
| 960 | |
| 961 | interface Settings { |
| 962 | something: string; |
no test coverage detected