@opra/common
Version:
Opra common package
19 lines (18 loc) • 1.22 kB
TypeScript
import { StrictOmit } from 'ts-gems';
import type { ApiField } from '../data-type/api-field.js';
export interface ApiFieldDecorator extends PropertyDecorator {
/**
* Overrides the default settings of an API field with specified options.
*
* @param {string | RegExp | (string | RegExp)[]} scopePattern - A pattern or array of patterns that defines the scope
* within which the override applies. Patterns can be strings or regular expressions.
* @param {StrictOmit<ApiField.Options, 'isArray' | 'isNestedEntity' | 'type' | 'scopePattern'>} options - Configuration options to override
* the default API field behavior, excluding the properties 'isArray', 'type', and 'scopePattern'.
* @return {ApiFieldDecorator} The decorated API field after applying the override configuration.
*/
Override(scopePattern: (string | RegExp) | (string | RegExp)[], options: StrictOmit<ApiField.Options, 'isArray' | 'isNestedEntity' | 'type' | 'scopePattern'>): ApiFieldDecorator;
}
export interface ApiFieldDecoratorFactory {
(options?: ApiField.Options): ApiFieldDecorator;
}
export declare function ApiFieldDecoratorFactory(options?: ApiField.Options): ApiFieldDecorator;