cc-server-parent/packages/binding/src/interfaces.ts
2019-06-21 16:47:18 +08:00

24 lines
530 B
TypeScript

import { VAILD_TYPE } from './constants'
export class VaildError extends Error { }
export declare type VaildFunction = (param: object) => boolean;
export namespace interfaces {
export interface MethodMetadata {
[methodName: string]: ParameterMetadata[];
}
export interface ParameterMetadata {
index: number;
type: NewableFunction;
}
export interface PropertyMetadata {
type: VAILD_TYPE;
name: string;
message: string;
handle: VaildFunction;
}
}