© 2026 Hedgehog Software, LLC
Schema.decodeUnknown(opts.schema)
Type 'undefined' is not assignable to type 'Schema<A, I, never>'
function get<A, I>(url: string, opts?: ApiClientOptions<A, I>) { return pipe( Effect.tryPromise({ try: (signal) => $fetch<A>(url, { ...options, baseURL, ...opts, method: "GET", signal }), catch: _handleError, }), Effect.flatMap((result) => Effect.if(Predicate.isNotUndefined(opts?.schema), { onTrue: () => Schema.decodeUnknown(opts.schema)(result), onFalse: () => Effect.succeed(result), }), ), ); }