(content: string)
| 1004 | const readFile = effect("readFile")<[path: string], string>; |
| 1005 | const parseError = error("parse"); |
| 1006 | const parseContent = (content: string) => |
| 1007 | effected(function* () { |
| 1008 | try { |
| 1009 | return JSON.parse(content); |
| 1010 | } catch (e) { |
| 1011 | return yield* parseError((e as any).message); |
| 1012 | } |
| 1013 | }); |
| 1014 | |
| 1015 | const processFile1 = (path: string) => |
| 1016 | effected(function* () { |