You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
580 B

3 months ago
  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;