names.js 1.4 KB

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const codegen_1 = require("./codegen");
  4. const names = {
  5. // validation function arguments
  6. data: new codegen_1.Name("data"), // data passed to validation function
  7. // args passed from referencing schema
  8. valCxt: new codegen_1.Name("valCxt"), // validation/data context - should not be used directly, it is destructured to the names below
  9. instancePath: new codegen_1.Name("instancePath"),
  10. parentData: new codegen_1.Name("parentData"),
  11. parentDataProperty: new codegen_1.Name("parentDataProperty"),
  12. rootData: new codegen_1.Name("rootData"), // root data - same as the data passed to the first/top validation function
  13. dynamicAnchors: new codegen_1.Name("dynamicAnchors"), // used to support recursiveRef and dynamicRef
  14. // function scoped variables
  15. vErrors: new codegen_1.Name("vErrors"), // null or array of validation errors
  16. errors: new codegen_1.Name("errors"), // counter of validation errors
  17. this: new codegen_1.Name("this"),
  18. // "globals"
  19. self: new codegen_1.Name("self"),
  20. scope: new codegen_1.Name("scope"),
  21. // JTD serialize/parse name for JSON string and position
  22. json: new codegen_1.Name("json"),
  23. jsonPos: new codegen_1.Name("jsonPos"),
  24. jsonLen: new codegen_1.Name("jsonLen"),
  25. jsonPart: new codegen_1.Name("jsonPart"),
  26. };
  27. exports.default = names;
  28. //# sourceMappingURL=names.js.map