Skip to content

Commit

Permalink
Adds description property to schema types (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpaul-stripe committed May 12, 2023
1 parent bc387e3 commit e8b6db6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export type Schema<C extends Config = Config, R = string> = {
inline?: boolean;
transform?(node: Node, config: C): MaybePromise<RenderableTreeNodes>;
validate?(node: Node, config: C): MaybePromise<ValidationError[]>;
description?: string;
};

export type SchemaAttribute = {
Expand All @@ -117,6 +118,7 @@ export type SchemaAttribute = {
matches?: SchemaMatches | ((config: Config) => SchemaMatches);
validate?(value: any, config: Config): ValidationError[];
errorLevel?: ValidationError['level'];
description?: string;
};

export type SchemaMatches = RegExp | string[] | null;
Expand Down

0 comments on commit e8b6db6

Please sign in to comment.