Skip to content

Commit

Permalink
style: 80 cols
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Sep 28, 2024
1 parent 5ecec5e commit 52873d0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Type>) =>
| ((val: unknown) => number)
Expand Down

0 comments on commit 52873d0

Please sign in to comment.