diff --git a/src/DocsLookup.ts b/src/DocsLookup.ts index ccd02d7..4c68b98 100644 --- a/src/DocsLookup.ts +++ b/src/DocsLookup.ts @@ -265,12 +265,12 @@ class DocEntry extends Schema.Class("DocEntry")({ // prettier const prettify = (code: string) => - Effect.promise(() => + Effect.tryPromise(() => Prettier.format(code, { parser: "typescript", semi: false, }), - ) + ).pipe(Effect.orElseSucceed(() => code)) // errors