UNPKG

@schorts/shared-kernel

Version:

A modular, type-safe foundation for building expressive, maintainable applications. This package provides core abstractions for domain modeling, HTTP integration, authentication, state management, and more — designed to be framework-agnostic and highly ex

17 lines (12 loc) 458 B
import { expectTypeOf } from "expect-type"; import { Message } from "../../src/messages"; type MessagePrimitives = { id: string; }; describe("Message", () => { it('should declare a "toPrimitives" method', () => { expectTypeOf<Message>().toHaveProperty('toPrimitives'); expectTypeOf<Message['toPrimitives']>().toBeFunction(); expectTypeOf<Message<MessagePrimitives>['toPrimitives']>().returns.toEqualTypeOf<MessagePrimitives>(); }); });