index.d.ts 580 B

123456789101112131415
  1. import { FormatMode, FormatName } from "./formats";
  2. import type { Plugin, Format } from "ajv";
  3. export { FormatMode, FormatName } from "./formats";
  4. export { LimitFormatError } from "./limit";
  5. export interface FormatOptions {
  6. mode?: FormatMode;
  7. formats?: FormatName[];
  8. keywords?: boolean;
  9. }
  10. export declare type FormatsPluginOptions = FormatName[] | FormatOptions;
  11. export interface FormatsPlugin extends Plugin<FormatsPluginOptions> {
  12. get: (format: FormatName, mode?: FormatMode) => Format;
  13. }
  14. declare const formatsPlugin: FormatsPlugin;
  15. export default formatsPlugin;