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.

fork.d.ts 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { Def, Plugin } from "./types";
  2. export default function (defs: Def[]): {
  3. Type: {
  4. or(...types: any[]): import("./lib/types").Type<any>;
  5. from<T>(value: any, name?: string | undefined): import("./lib/types").Type<T>;
  6. def(typeName: string): import("./lib/types").Def<any>;
  7. hasDef(typeName: string): boolean;
  8. };
  9. builtInTypes: {
  10. string: import("./lib/types").Type<string>;
  11. function: import("./lib/types").Type<Function>;
  12. array: import("./lib/types").Type<any[]>;
  13. object: import("./lib/types").Type<{
  14. [key: string]: any;
  15. }>;
  16. RegExp: import("./lib/types").Type<RegExp>;
  17. Date: import("./lib/types").Type<Date>;
  18. number: import("./lib/types").Type<number>;
  19. boolean: import("./lib/types").Type<boolean>;
  20. null: import("./lib/types").Type<null>;
  21. undefined: import("./lib/types").Type<undefined>;
  22. };
  23. namedTypes: import("./gen/namedTypes").NamedTypes;
  24. builders: import("./gen/builders").builders;
  25. defineMethod: (name: any, func?: Function | undefined) => Function;
  26. getFieldNames: (object: any) => string[];
  27. getFieldValue: (object: any, fieldName: any) => any;
  28. eachField: (object: any, callback: (name: any, value: any) => any, context?: any) => void;
  29. someField: (object: any, callback: (name: any, value: any) => any, context?: any) => boolean;
  30. getSupertypeNames: (typeName: string) => string[];
  31. getBuilderName: (typeName: any) => any;
  32. astNodesAreEquivalent: {
  33. (a: any, b: any, problemPath?: any): boolean;
  34. assert(a: any, b: any): void;
  35. };
  36. finalize: () => void;
  37. Path: import("./lib/path").PathConstructor;
  38. NodePath: import("./lib/node-path").NodePathConstructor;
  39. PathVisitor: import("./lib/path-visitor").PathVisitorConstructor;
  40. use: <T>(plugin: Plugin<T>) => T;
  41. visit: <M = {}>(node: import("./lib/types").ASTNode, methods?: import("./main").Visitor<M> | undefined) => any;
  42. };