{"library":"ts-brand","type":"library","category":null,"description":"ts-brand is a TypeScript library that enables nominal typing through 'type branding,' a technique that intersects a base type with an object type containing a non-existent property. This allows developers to create distinct types (e.g., `PostId`, `UserId`) from a common primitive (like `number`), preventing accidental assignment bugs at compile time even though they share the same runtime representation. The library is currently at version 0.2.0, indicating it's an early-stage but active project. It ships with TypeScript types inherently, as its functionality is entirely type-system based. A key differentiator is its emphasis on ensuring brand uniqueness, offering methods like using recursive interface types as branding to prevent accidental conflation of brands across different definitions, which is a common pitfall in simpler branding implementations. The project's release cadence appears to be driven by contributions, without a fixed schedule.","language":"javascript","status":"active","version":"0.2.0","tags":["javascript","typescript","opaque","branding","type"],"last_verified":"Wed May 27","install":[{"cmd":"npm install ts-brand","imports":["import { Brand } from 'ts-brand';"]},{"cmd":"yarn add ts-brand","imports":[]},{"cmd":"pnpm add ts-brand","imports":[]}],"homepage":null,"github":"https://github.com/kourge/ts-brand","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ts-brand","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/ts-brand/compatibility"}}