TSBuffer Schema provides TypeScript type definitions and schema declarations for TSBuffer, a TypeScript runtime type checking and binary serialization library (v2.2.0, stable, monthly releases). It includes schema types like TSBufferSchema and TSBufferProto for defining binary-encoded message structures, plus number type aliases (int, uint) for optimized encoding. Differentiates from protobuf by tight TypeScript integration, runtime type validation, and no code generation step — schemas are written as TypeScript types.
npm install tsbuffer-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows importing schema types, defining a schema, using Overwrite override type, and creating a TSBufferProto object in TypeScript.
Ensure field IDs are sequential integers starting from 0 for each object type in the proto.
Only use these aliases within TSBufferSchema definitions; they have no meaning in plain TypeScript type system.
Consider using TypeScript's `Omit` and intersection types: `type AdminUser = Omit<BaseUser, 'role'> & { role: 'admin' | 'user' }`.Change to `import { TSBufferSchema } from 'tsbuffer-schema'`.Run `npm install tsbuffer-schema` and ensure tsconfig.json includes node module resolution.
Define a type alias using TSBufferSchema<YourInterface> and use that type for type-checking, not the raw object literal.
No dependency data recorded yet.