@fgv/ts-json-base 5.0.2 → 5.1.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/packlets/converters/converters.js +36 -14
  2. package/dist/packlets/file-tree/directoryItem.js +99 -4
  3. package/dist/packlets/file-tree/fileItem.js +47 -9
  4. package/dist/packlets/file-tree/fileTreeAccessors.js +59 -1
  5. package/dist/packlets/file-tree/filterSpec.js +74 -0
  6. package/dist/packlets/file-tree/fsTree.js +107 -12
  7. package/dist/packlets/file-tree/in-memory/inMemoryTree.js +279 -21
  8. package/dist/packlets/file-tree/in-memory/treeBuilder.js +31 -0
  9. package/dist/packlets/file-tree/index.browser.js +1 -0
  10. package/dist/packlets/file-tree/index.js +1 -0
  11. package/dist/packlets/json-file/file.js +1 -1
  12. package/dist/packlets/json-file/jsonFsHelper.js +1 -1
  13. package/dist/packlets/validators/validators.js +8 -8
  14. package/dist/ts-json-base.d.ts +439 -65
  15. package/dist/tsdoc-metadata.json +1 -1
  16. package/lib/packlets/converters/converters.d.ts +20 -13
  17. package/lib/packlets/converters/converters.js +36 -13
  18. package/lib/packlets/file-tree/directoryItem.d.ts +29 -6
  19. package/lib/packlets/file-tree/directoryItem.js +98 -3
  20. package/lib/packlets/file-tree/fileItem.d.ts +31 -14
  21. package/lib/packlets/file-tree/fileItem.js +46 -8
  22. package/lib/packlets/file-tree/fileTreeAccessors.d.ts +237 -3
  23. package/lib/packlets/file-tree/fileTreeAccessors.js +63 -0
  24. package/lib/packlets/file-tree/filterSpec.d.ts +10 -0
  25. package/lib/packlets/file-tree/filterSpec.js +77 -0
  26. package/lib/packlets/file-tree/fsTree.d.ts +37 -13
  27. package/lib/packlets/file-tree/fsTree.js +106 -11
  28. package/lib/packlets/file-tree/in-memory/inMemoryTree.d.ts +37 -13
  29. package/lib/packlets/file-tree/in-memory/inMemoryTree.js +278 -20
  30. package/lib/packlets/file-tree/in-memory/treeBuilder.d.ts +15 -0
  31. package/lib/packlets/file-tree/in-memory/treeBuilder.js +31 -0
  32. package/lib/packlets/file-tree/index.browser.d.ts +1 -0
  33. package/lib/packlets/file-tree/index.browser.js +1 -0
  34. package/lib/packlets/file-tree/index.d.ts +1 -0
  35. package/lib/packlets/file-tree/index.js +1 -0
  36. package/lib/packlets/json-file/file.d.ts +1 -1
  37. package/lib/packlets/json-file/file.js +1 -1
  38. package/lib/packlets/json-file/jsonFsHelper.d.ts +1 -1
  39. package/lib/packlets/json-file/jsonFsHelper.js +1 -1
  40. package/lib/packlets/validators/validators.d.ts +9 -9
  41. package/lib/packlets/validators/validators.js +8 -8
  42. package/package.json +29 -30
  43. package/dist/test/fixtures/file-tree/docs/api/reference.json +0 -1
@@ -120,26 +120,26 @@ export const jsonValue = new Validation.Base.GenericValidator({
120
120
  }
121
121
  });
122
122
  /**
123
- * A {@link Validation.Classes.StringValidator | StringValidator} which validates a string in place.
123
+ * A `StringValidator` which validates a string in place.
124
124
  * Accepts {@link Validators.IJsonValidatorContext | IJsonValidatorContext} but ignores it.
125
125
  * @public
126
126
  */
127
127
  export const string = new Validation.Classes.StringValidator();
128
128
  /**
129
- * A {@link Validation.Classes.NumberValidator | NumberValidator} which validates a number in place.
129
+ * A `NumberValidator` which validates a number in place.
130
130
  * Accepts {@link Validators.IJsonValidatorContext | IJsonValidatorContext} but ignores it.
131
131
  * @public
132
132
  */
133
133
  export const number = new Validation.Classes.NumberValidator();
134
134
  /**
135
- * A {@link Validation.Classes.BooleanValidator | BooleanValidator} which validates a boolean in place.
136
- * Accepts {@link Validators.IJsonValidatorContext | IJsonValidatorContext} but ignores it.
135
+ * A `BooleanValidator` which validates a boolean in place.
136
+ * Accepts `IJsonValidatorContext` but ignores it.
137
137
  * @public
138
138
  */
139
139
  export const boolean = new Validation.Classes.BooleanValidator();
140
140
  /**
141
141
  * Helper to create a validator for a literal value.
142
- * Accepts {@link Validators.IJsonValidatorContext | IJsonValidatorContext} but ignores it.
142
+ * Accepts `IJsonValidatorContext` but ignores it.
143
143
  * Mirrors the behavior of `@fgv/ts-utils`.
144
144
  * @public
145
145
  */
@@ -151,17 +151,17 @@ export function literal(value) {
151
151
  });
152
152
  }
153
153
  /**
154
- * Helper function to create a {@link Validator | Validator} which validates `unknown` to one of a set of
154
+ * Helper function to create a `Validator` which validates `unknown` to one of a set of
155
155
  * supplied enumerated values. Anything else fails.
156
156
  *
157
157
  * @remarks
158
- * This JSON variant accepts an {@link Validators.IJsonValidatorContext | IJsonValidatorContext} OR
158
+ * This JSON variant accepts an `IJsonValidatorContext` OR
159
159
  * a `ReadonlyArray<T>` as its validation context. If the context is an array, it is used to override the
160
160
  * allowed values for that validation; otherwise, the original `values` supplied at creation time are used.
161
161
  *
162
162
  * @param values - Array of allowed values.
163
163
  * @param message - Optional custom failure message.
164
- * @returns A new {@link Validator | Validator} returning `<T>`.
164
+ * @returns A new `Validator` returning `<T>`.
165
165
  * @public
166
166
  */
167
167
  export function enumeratedValue(values, message) {