@trapi/metadata
Version:
Generate REST-API metadata scheme from TypeScript Decorators.
35 lines • 1.1 kB
TypeScript
import type { Node } from 'typescript';
import { BaseError } from '../../error';
import type { BaseType } from '../../resolver';
type UnsupportedTypeContext = {
decoratorName: string;
propertyName: string;
type: BaseType;
node?: Node;
};
type UnsupportedMethodContext = {
decoratorName: string;
propertyName: string;
method: string;
node?: Node;
};
type PathMatchInvalidContext = {
decoratorName: string;
propertyName: string;
path: string;
node?: Node;
};
type ScopeRequiredContext = {
decoratorName: string;
node?: Node;
};
export declare class ParameterError extends BaseError {
static typeUnsupported(context: UnsupportedTypeContext): ParameterError;
static methodUnsupported(context: UnsupportedMethodContext): ParameterError;
static invalidPathMatch(context: PathMatchInvalidContext): ParameterError;
static scopeRequired(context: ScopeRequiredContext): ParameterError;
static invalidExampleSchema(): ParameterError;
static getCurrentLocation(node: Node): string;
}
export {};
//# sourceMappingURL=error.d.ts.map