| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import {Service} from '@e22m4u/js-service';
- import {ProjectDataOptions} from './project-data.js';
- import {ProjectionSchemaDefinition} from './definitions/index.js';
- import {
- ProjectionSchema,
- ProjectionSchemaName,
- ProjectionSchemaFactory,
- } from './projection-schema.js';
- /**
- * Data projector.
- */
- export class DataProjector extends Service {
- /**
- * Define schema.
- *
- * @param schemaDef
- */
- defineSchema(schemaDef: ProjectionSchemaDefinition): this;
- /**
- * Has schema.
- *
- * @param schemaName
- */
- hasSchema(schemaName: ProjectionSchemaName): boolean;
- /**
- * Project.
- *
- * @param schemaOrFactory
- * @param data
- * @param options
- */
- project<T>(
- schemaOrFactory:
- | ProjectionSchema
- | ProjectionSchemaFactory
- | ProjectionSchemaName,
- data: T,
- options?: Omit<ProjectDataOptions, 'resolver'>,
- ): T;
- }
|