Function
fromBrand
(identifier: string, ctor: Brand.Constructor<A>)
Source from the content-addressed store, hash-verified
| 5239 | * @since 3.10.0 |
| 5240 | */ |
| 5241 | export function fromBrand<A extends Brand.Brand<any>>(identifier: string, ctor: Brand.Constructor<A>) { |
| 5242 | return <S extends Top & { readonly "Type": Brand.Brand.Unbranded<A> }>( |
| 5243 | self: S |
| 5244 | ): brand<S["Rebuild"], Brand.Brand.Keys<A>> => { |
| 5245 | return (ctor.checks ? self.check(...ctor.checks) : self).pipe(brand(identifier)) |
| 5246 | } |
| 5247 | } |
| 5248 | |
| 5249 | /** |
| 5250 | * Type-level representation returned by {@link middlewareDecoding}. |
Callers
nothing calls this directly
Tested by
no test coverage detected