diff --git a/types/index.d.ts b/types/index.d.ts index 8aa282d3..3c1f5aba 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -97,10 +97,14 @@ interface EncoderOptions { /** * A projection function that is used when unwrapping unions. - * This function is called at schema parsing time on each union with its branches' types. - * If it returns a non-null (function) value, that function will be called each time a value's branch needs to be inferred and should return the branch's index. + * This function is called at schema parsing time on each union with its branches' + * types. + * If it returns a non-null (function) value, that function will be called each + * time a value's branch needs to be inferred and should return the branch's + * index. * The index muss be a number between 0 and length-1 of the passed types. - * In this case (a branch index) the union will use an unwrapped representation. Otherwise (undefined), the union will be wrapped. + * In this case (a branch index) the union will use an unwrapped representation. + * Otherwise (undefined), the union will be wrapped. */ type BranchProjection = (types: ReadonlyArray) => | ((val: unknown) => number)