import { type Brand } from 'ts-type-forge'; import { string } from '../primitives/index.mjs'; import { type Type } from '../type.mjs'; import { brand } from './brand.mjs'; export const brandedString = ({ defaultValue, is = (_u): _u is Brand => true, typeName, }: Readonly<{ typeName: K; defaultValue: string; is?: (u: string) => u is Brand; }>): Type> => brand({ baseType: string(defaultValue), defaultValue, is, brandKeys: [typeName], typeName, }); /** * Same as brandedString * * @deprecated use `brandedString` */ export const simpleBrandedString = brandedString;