You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% tsc
decoder.ts:432:55 - error TS2339: Property 'error' does not exist on type 'Result<A, Partial<DecoderError>>'.
Property 'error' does not exist on type 'Ok<A>'.
432 return Result.err(prependAt(`[${i}]`, nth.error));
~~~~~
Found 1 error.
In this code block:
statictuple<A>(decoders: Decoder<A>[]){returnnewDecoder((json: unknown)=>{if(isJsonArray(json)){if(json.length!==decoders.length){returnResult.err({message: `expected a tuple of length ${decoders.length}, got one of length ${json.length}`});}constresult=[];for(leti: number=0;i<decoders.length;i++){constnth=decoders[i].decode(json[i]);if(nth.ok){result[i]=nth.result;}else{returnResult.err(prependAt(`[${i}]`,nth.error));}}returnResult.ok(result);}else{returnResult.err({message: expectedGot(`a tuple of length ${decoders.length}`,json)});}});}
The text was updated successfully, but these errors were encountered:
In this code block:
The text was updated successfully, but these errors were encountered: