(
options: CollectionConfig<any, string | number, any, UtilsRecord> & {
schema?: StandardSchemaV1
},
)
| 252 | |
| 253 | // Implementation |
| 254 | export function createCollection( |
| 255 | options: CollectionConfig<any, string | number, any, UtilsRecord> & { |
| 256 | schema?: StandardSchemaV1 |
| 257 | }, |
| 258 | ): Collection<any, string | number, UtilsRecord, any, any> { |
| 259 | const collection = new CollectionImpl<any, string | number, any, any, any>( |
| 260 | options, |
| 261 | ) |
| 262 | |
| 263 | // Attach utils to collection |
| 264 | if (options.utils) { |
| 265 | collection.utils = options.utils |
| 266 | } else { |
| 267 | collection.utils = {} |
| 268 | } |
| 269 | |
| 270 | return collection |
| 271 | } |
| 272 | |
| 273 | export class CollectionImpl< |
| 274 | TOutput extends object = Record<string, unknown>, |
no outgoing calls
searching dependent graphs…