Skip to content

Commit

Permalink
fix(types): expose messageParamsFactory typing (#1175)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaidd4 committed Aug 24, 2023
1 parent 4389076 commit ec27c51
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/validators/index.d.ts
Expand Up @@ -61,16 +61,18 @@ export function TranslationFunction(path: string, params: { model: string, prope

export function messagePathFactory(params: MessageProps): string;

export function messageParamsFactory(params: {
model: unknown,
property: string,
invalid: boolean,
pending: boolean,
propertyPath: string,
response: unknown,
validator: string,
[key: string]: any
}): string;
export interface MessageParams {
model: unknown;
property: string;
invalid: boolean;
pending: boolean;
propertyPath: string;
response: unknown;
validator: string;
[key: string]: any;
}

export function messageParamsFactory(params: MessageParams): MessageParams;

export interface MessageProps {
$model: string;
Expand Down

0 comments on commit ec27c51

Please sign in to comment.