API reference › @evolu/common › Type › length
const length: <Exact>(exact: Exact) => BrandFactory<
`Length${Exact}`,
{
length: number;
},
LengthError<Exact>
>;
Defined in: packages/common/src/Type.ts:1396
Exact length.
Use numeric literal, not expression. See BrandFactory.
Example
// string & Brand<"Length1">
const Length1String = length(1)(String);