AddSubtract
Type Aliases
Add<A, B>
type Add<A, B>: Length<[...BuildTuple<A>, ...BuildTuple<B>]>;
Helper type to add two other types.
From: https://gist.github.com/ryandabler/8b4ff4f36aed47bc09acc03174638468
Type Parameters
Type Parameter |
---|
A extends number |
B extends number |
Defined in
Subtract<A, B>
type Subtract<A, B>: A extends A ? BuildTuple<A> extends [...(infer U), ...BuildTuple<B>] ? Length<U> : never : never;
Helper type to subtract two other types.
From: https://gist.github.com/ryandabler/8b4ff4f36aed47bc09acc03174638468
Type Parameters
Type Parameter |
---|
A extends number |
B extends number |