Creates a collection object.
import { add, collection } from 'typesaurus' type User = { name: string } const users = collection<User>('users') //=> { __type__: 'collection', path: 'users' } add(users, { name: 'Sasha' })
The collection path
The collection object
Generated using TypeDoc
Creates a collection object.
import { add, collection } from 'typesaurus' type User = { name: string } const users = collection<User>('users') //=> { __type__: 'collection', path: 'users' } add(users, { name: 'Sasha' })