@fgv/ts-json 5.1.0-15 → 5.1.0-17

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.
@@ -174,7 +174,7 @@ export class JsonContextHelper {
174
174
  /**
175
175
  * Applies static `JsonContextHelper.mergeContext` to the
176
176
  * {@link IJsonContext | IJsonContext} associated with this helper.
177
- * @param add - Optional initializer containing {@link VariableValue | variable values} and/or
177
+ * @param merge - Optional initializer containing {@link VariableValue | variable values} and/or
178
178
  * {@link IJsonReferenceMap | reference maps} to be added to the {@link IJsonContext | context}.
179
179
  * @returns `Success` with a new {@link IJsonContext | IJsonContext} containing the variables and
180
180
  * references from the base context, merged with and overridden by any that were passed in, or
@@ -27,7 +27,7 @@ import { failWithDetail } from '@fgv/ts-utils';
27
27
  */
28
28
  export class JsonEditorRuleBase {
29
29
  /**
30
- * {@inheritdoc IJsonEditorRule.editProperty}
30
+ * {@inheritDoc IJsonEditorRule.editProperty}
31
31
  */
32
32
  /* c8 ignore start */
33
33
  editProperty(__key, __value, __state) {
@@ -35,13 +35,13 @@ export class JsonEditorRuleBase {
35
35
  }
36
36
  /* c8 ignore stop */
37
37
  /**
38
- * {@inheritdoc IJsonEditorRule.editValue}
38
+ * {@inheritDoc IJsonEditorRule.editValue}
39
39
  */
40
40
  editValue(__value, __state) {
41
41
  return failWithDetail('inapplicable', 'inapplicable');
42
42
  }
43
43
  /**
44
- * {@inheritdoc IJsonEditorRule.finalizeProperties}
44
+ * {@inheritDoc IJsonEditorRule.finalizeProperties}
45
45
  */
46
46
  finalizeProperties(__deferred, __state) {
47
47
  return failWithDetail('inapplicable', 'inapplicable');
@@ -83,7 +83,7 @@ export class ReferenceMapKeyPolicy {
83
83
  }
84
84
  /**
85
85
  * Validates a `Map\<string, T\>` using the validation rules for this policy.
86
- * @param items - The `Map\<string, T\>` to be validated.
86
+ * @param map - The `Map\<string, T\>` to be validated.
87
87
  * @param options - Optional {@link IReferenceMapKeyPolicyValidateOptions | options} to control
88
88
  * validation.
89
89
  * @returns `Success` with a new `Map\<string, T\>`, or `Failure` with an error message
@@ -284,10 +284,9 @@ export class SimpleJsonMap extends SimpleJsonMapBase {
284
284
  export class PrefixedJsonMap extends SimpleJsonMap {
285
285
  /**
286
286
  * Constructs a new {@link PrefixedJsonMap | PrefixedJsonMap} from the supplied values
287
- * @param prefix - A string prefix to be enforced for and added to key names as necessary
288
287
  * @param values - A string-keyed Map or Record of the `JsonValue` to be returned
289
288
  * @param context - Optional {@link IJsonContext | JSON Context} used to format returned values
290
- * @param editor - Optional {@link JsonEditor | JsonEditor} used to format returned values
289
+ * @param options - Optional {@link ISimpleJsonMapOptions | options} to configure the map
291
290
  * @public
292
291
  */
293
292
  constructor(values, context, options) {
@@ -95,7 +95,7 @@ export class ConditionalJsonEditorRule extends JsonEditorRuleBase {
95
95
  /**
96
96
  * Determines if a given property key is conditional. Derived classes can override this
97
97
  * method to use a different format for conditional properties.
98
- * @param value - The `JsonValue` of the property to be considered.
98
+ * @param key - The property key to be considered.
99
99
  * @param state - The {@link JsonEditorState | editor state} for the object being edited.
100
100
  * @returns `Success` with detail `'deferred'` and a
101
101
  * {@link EditorRules.IConditionalJsonKeyResult | IConditionalJsonKeyResult} describing the
@@ -99,7 +99,7 @@ export class MultiValueJsonEditorRule extends JsonEditorRuleBase {
99
99
  /**
100
100
  * Determines if a given property key is multi-value. Derived classes can override this
101
101
  * method to use a different format for multi-value properties.
102
- * @param value - The `JsonValue` of the property to be considered.
102
+ * @param token - The property key token to be considered.
103
103
  * @param state - The {@link JsonEditorState | editor state} for the object being edited.
104
104
  * @returns `Success` with detail `'deferred'` and an
105
105
  * {@link EditorRules.IMultiValuePropertyParts | IMultiValuePropertyParts}
package/dist/ts-json.d.ts CHANGED
@@ -168,7 +168,7 @@ declare class ConditionalJsonEditorRule extends JsonEditorRuleBase {
168
168
  /**
169
169
  * Determines if a given property key is conditional. Derived classes can override this
170
170
  * method to use a different format for conditional properties.
171
- * @param value - The `JsonValue` of the property to be considered.
171
+ * @param key - The property key to be considered.
172
172
  * @param state - The {@link JsonEditorState | editor state} for the object being edited.
173
173
  * @returns `Success` with detail `'deferred'` and a
174
174
  * {@link EditorRules.IConditionalJsonKeyResult | IConditionalJsonKeyResult} describing the
@@ -1108,7 +1108,7 @@ export declare class JsonContextHelper {
1108
1108
  /**
1109
1109
  * Applies static `JsonContextHelper.mergeContext` to the
1110
1110
  * {@link IJsonContext | IJsonContext} associated with this helper.
1111
- * @param add - Optional initializer containing {@link VariableValue | variable values} and/or
1111
+ * @param merge - Optional initializer containing {@link VariableValue | variable values} and/or
1112
1112
  * {@link IJsonReferenceMap | reference maps} to be added to the {@link IJsonContext | context}.
1113
1113
  * @returns `Success` with a new {@link IJsonContext | IJsonContext} containing the variables and
1114
1114
  * references from the base context, merged with and overridden by any that were passed in, or
@@ -1447,15 +1447,15 @@ export declare class JsonEditorConverter extends Conversion.BaseConverter<JsonVa
1447
1447
  */
1448
1448
  export declare class JsonEditorRuleBase implements IJsonEditorRule {
1449
1449
  /**
1450
- * {@inheritdoc IJsonEditorRule.editProperty}
1450
+ * {@inheritDoc IJsonEditorRule.editProperty}
1451
1451
  */
1452
1452
  editProperty(__key: string, __value: JsonValue, __state: JsonEditorState): DetailedResult<JsonObject, JsonPropertyEditFailureReason>;
1453
1453
  /**
1454
- * {@inheritdoc IJsonEditorRule.editValue}
1454
+ * {@inheritDoc IJsonEditorRule.editValue}
1455
1455
  */
1456
1456
  editValue(__value: JsonValue, __state: JsonEditorState): DetailedResult<JsonValue, JsonEditFailureReason>;
1457
1457
  /**
1458
- * {@inheritdoc IJsonEditorRule.finalizeProperties}
1458
+ * {@inheritDoc IJsonEditorRule.finalizeProperties}
1459
1459
  */
1460
1460
  finalizeProperties(__deferred: JsonObject[], __state: JsonEditorState): DetailedResult<JsonObject[], JsonEditFailureReason>;
1461
1461
  }
@@ -1872,7 +1872,7 @@ declare class MultiValueJsonEditorRule extends JsonEditorRuleBase {
1872
1872
  /**
1873
1873
  * Determines if a given property key is multi-value. Derived classes can override this
1874
1874
  * method to use a different format for multi-value properties.
1875
- * @param value - The `JsonValue` of the property to be considered.
1875
+ * @param token - The property key token to be considered.
1876
1876
  * @param state - The {@link JsonEditorState | editor state} for the object being edited.
1877
1877
  * @returns `Success` with detail `'deferred'` and an
1878
1878
  * {@link EditorRules.IMultiValuePropertyParts | IMultiValuePropertyParts}
@@ -1891,10 +1891,9 @@ declare class MultiValueJsonEditorRule extends JsonEditorRuleBase {
1891
1891
  export declare class PrefixedJsonMap extends SimpleJsonMap {
1892
1892
  /**
1893
1893
  * Constructs a new {@link PrefixedJsonMap | PrefixedJsonMap} from the supplied values
1894
- * @param prefix - A string prefix to be enforced for and added to key names as necessary
1895
1894
  * @param values - A string-keyed Map or Record of the `JsonValue` to be returned
1896
1895
  * @param context - Optional {@link IJsonContext | JSON Context} used to format returned values
1897
- * @param editor - Optional {@link JsonEditor | JsonEditor} used to format returned values
1896
+ * @param options - Optional {@link ISimpleJsonMapOptions | options} to configure the map
1898
1897
  * @public
1899
1898
  */
1900
1899
  protected constructor(values?: MapOrRecord<JsonValue>, context?: IJsonContext, options?: ISimpleJsonMapOptions);
@@ -2046,7 +2045,7 @@ export declare class ReferenceMapKeyPolicy<T> {
2046
2045
  validateItems(items: [string, T][], options?: IReferenceMapKeyPolicyValidateOptions): Result<[string, T][]>;
2047
2046
  /**
2048
2047
  * Validates a `Map\<string, T\>` using the validation rules for this policy.
2049
- * @param items - The `Map\<string, T\>` to be validated.
2048
+ * @param map - The `Map\<string, T\>` to be validated.
2050
2049
  * @param options - Optional {@link IReferenceMapKeyPolicyValidateOptions | options} to control
2051
2050
  * validation.
2052
2051
  * @returns `Success` with a new `Map\<string, T\>`, or `Failure` with an error message
@@ -105,7 +105,7 @@ export declare class JsonContextHelper {
105
105
  /**
106
106
  * Applies static `JsonContextHelper.mergeContext` to the
107
107
  * {@link IJsonContext | IJsonContext} associated with this helper.
108
- * @param add - Optional initializer containing {@link VariableValue | variable values} and/or
108
+ * @param merge - Optional initializer containing {@link VariableValue | variable values} and/or
109
109
  * {@link IJsonReferenceMap | reference maps} to be added to the {@link IJsonContext | context}.
110
110
  * @returns `Success` with a new {@link IJsonContext | IJsonContext} containing the variables and
111
111
  * references from the base context, merged with and overridden by any that were passed in, or
@@ -177,7 +177,7 @@ class JsonContextHelper {
177
177
  /**
178
178
  * Applies static `JsonContextHelper.mergeContext` to the
179
179
  * {@link IJsonContext | IJsonContext} associated with this helper.
180
- * @param add - Optional initializer containing {@link VariableValue | variable values} and/or
180
+ * @param merge - Optional initializer containing {@link VariableValue | variable values} and/or
181
181
  * {@link IJsonReferenceMap | reference maps} to be added to the {@link IJsonContext | context}.
182
182
  * @returns `Success` with a new {@link IJsonContext | IJsonContext} containing the variables and
183
183
  * references from the base context, merged with and overridden by any that were passed in, or
@@ -49,15 +49,15 @@ export interface IJsonEditorRule {
49
49
  */
50
50
  export declare class JsonEditorRuleBase implements IJsonEditorRule {
51
51
  /**
52
- * {@inheritdoc IJsonEditorRule.editProperty}
52
+ * {@inheritDoc IJsonEditorRule.editProperty}
53
53
  */
54
54
  editProperty(__key: string, __value: JsonValue, __state: JsonEditorState): DetailedResult<JsonObject, JsonPropertyEditFailureReason>;
55
55
  /**
56
- * {@inheritdoc IJsonEditorRule.editValue}
56
+ * {@inheritDoc IJsonEditorRule.editValue}
57
57
  */
58
58
  editValue(__value: JsonValue, __state: JsonEditorState): DetailedResult<JsonValue, JsonEditFailureReason>;
59
59
  /**
60
- * {@inheritdoc IJsonEditorRule.finalizeProperties}
60
+ * {@inheritDoc IJsonEditorRule.finalizeProperties}
61
61
  */
62
62
  finalizeProperties(__deferred: JsonObject[], __state: JsonEditorState): DetailedResult<JsonObject[], JsonEditFailureReason>;
63
63
  }
@@ -30,7 +30,7 @@ const ts_utils_1 = require("@fgv/ts-utils");
30
30
  */
31
31
  class JsonEditorRuleBase {
32
32
  /**
33
- * {@inheritdoc IJsonEditorRule.editProperty}
33
+ * {@inheritDoc IJsonEditorRule.editProperty}
34
34
  */
35
35
  /* c8 ignore start */
36
36
  editProperty(__key, __value, __state) {
@@ -38,13 +38,13 @@ class JsonEditorRuleBase {
38
38
  }
39
39
  /* c8 ignore stop */
40
40
  /**
41
- * {@inheritdoc IJsonEditorRule.editValue}
41
+ * {@inheritDoc IJsonEditorRule.editValue}
42
42
  */
43
43
  editValue(__value, __state) {
44
44
  return (0, ts_utils_1.failWithDetail)('inapplicable', 'inapplicable');
45
45
  }
46
46
  /**
47
- * {@inheritdoc IJsonEditorRule.finalizeProperties}
47
+ * {@inheritDoc IJsonEditorRule.finalizeProperties}
48
48
  */
49
49
  finalizeProperties(__deferred, __state) {
50
50
  return (0, ts_utils_1.failWithDetail)('inapplicable', 'inapplicable');
@@ -67,7 +67,7 @@ export declare class ReferenceMapKeyPolicy<T> {
67
67
  validateItems(items: [string, T][], options?: IReferenceMapKeyPolicyValidateOptions): Result<[string, T][]>;
68
68
  /**
69
69
  * Validates a `Map\<string, T\>` using the validation rules for this policy.
70
- * @param items - The `Map\<string, T\>` to be validated.
70
+ * @param map - The `Map\<string, T\>` to be validated.
71
71
  * @param options - Optional {@link IReferenceMapKeyPolicyValidateOptions | options} to control
72
72
  * validation.
73
73
  * @returns `Success` with a new `Map\<string, T\>`, or `Failure` with an error message
@@ -262,10 +262,9 @@ export interface IKeyPrefixOptions {
262
262
  export declare class PrefixedJsonMap extends SimpleJsonMap {
263
263
  /**
264
264
  * Constructs a new {@link PrefixedJsonMap | PrefixedJsonMap} from the supplied values
265
- * @param prefix - A string prefix to be enforced for and added to key names as necessary
266
265
  * @param values - A string-keyed Map or Record of the `JsonValue` to be returned
267
266
  * @param context - Optional {@link IJsonContext | JSON Context} used to format returned values
268
- * @param editor - Optional {@link JsonEditor | JsonEditor} used to format returned values
267
+ * @param options - Optional {@link ISimpleJsonMapOptions | options} to configure the map
269
268
  * @public
270
269
  */
271
270
  protected constructor(values?: MapOrRecord<JsonValue>, context?: IJsonContext, options?: ISimpleJsonMapOptions);
@@ -86,7 +86,7 @@ class ReferenceMapKeyPolicy {
86
86
  }
87
87
  /**
88
88
  * Validates a `Map\<string, T\>` using the validation rules for this policy.
89
- * @param items - The `Map\<string, T\>` to be validated.
89
+ * @param map - The `Map\<string, T\>` to be validated.
90
90
  * @param options - Optional {@link IReferenceMapKeyPolicyValidateOptions | options} to control
91
91
  * validation.
92
92
  * @returns `Success` with a new `Map\<string, T\>`, or `Failure` with an error message
@@ -291,10 +291,9 @@ exports.SimpleJsonMap = SimpleJsonMap;
291
291
  class PrefixedJsonMap extends SimpleJsonMap {
292
292
  /**
293
293
  * Constructs a new {@link PrefixedJsonMap | PrefixedJsonMap} from the supplied values
294
- * @param prefix - A string prefix to be enforced for and added to key names as necessary
295
294
  * @param values - A string-keyed Map or Record of the `JsonValue` to be returned
296
295
  * @param context - Optional {@link IJsonContext | JSON Context} used to format returned values
297
- * @param editor - Optional {@link JsonEditor | JsonEditor} used to format returned values
296
+ * @param options - Optional {@link ISimpleJsonMapOptions | options} to configure the map
298
297
  * @public
299
298
  */
300
299
  constructor(values, context, options) {
@@ -84,7 +84,7 @@ export declare class ConditionalJsonEditorRule extends JsonEditorRuleBase {
84
84
  /**
85
85
  * Determines if a given property key is conditional. Derived classes can override this
86
86
  * method to use a different format for conditional properties.
87
- * @param value - The `JsonValue` of the property to be considered.
87
+ * @param key - The property key to be considered.
88
88
  * @param state - The {@link JsonEditorState | editor state} for the object being edited.
89
89
  * @returns `Success` with detail `'deferred'` and a
90
90
  * {@link EditorRules.IConditionalJsonKeyResult | IConditionalJsonKeyResult} describing the
@@ -98,7 +98,7 @@ class ConditionalJsonEditorRule extends jsonEditorRule_1.JsonEditorRuleBase {
98
98
  /**
99
99
  * Determines if a given property key is conditional. Derived classes can override this
100
100
  * method to use a different format for conditional properties.
101
- * @param value - The `JsonValue` of the property to be considered.
101
+ * @param key - The property key to be considered.
102
102
  * @param state - The {@link JsonEditorState | editor state} for the object being edited.
103
103
  * @returns `Success` with detail `'deferred'` and a
104
104
  * {@link EditorRules.IConditionalJsonKeyResult | IConditionalJsonKeyResult} describing the
@@ -81,7 +81,7 @@ export declare class MultiValueJsonEditorRule extends JsonEditorRuleBase {
81
81
  /**
82
82
  * Determines if a given property key is multi-value. Derived classes can override this
83
83
  * method to use a different format for multi-value properties.
84
- * @param value - The `JsonValue` of the property to be considered.
84
+ * @param token - The property key token to be considered.
85
85
  * @param state - The {@link JsonEditorState | editor state} for the object being edited.
86
86
  * @returns `Success` with detail `'deferred'` and an
87
87
  * {@link EditorRules.IMultiValuePropertyParts | IMultiValuePropertyParts}
@@ -102,7 +102,7 @@ class MultiValueJsonEditorRule extends jsonEditorRule_1.JsonEditorRuleBase {
102
102
  /**
103
103
  * Determines if a given property key is multi-value. Derived classes can override this
104
104
  * method to use a different format for multi-value properties.
105
- * @param value - The `JsonValue` of the property to be considered.
105
+ * @param token - The property key token to be considered.
106
106
  * @param state - The {@link JsonEditorState | editor state} for the object being edited.
107
107
  * @returns `Success` with detail `'deferred'` and an
108
108
  * {@link EditorRules.IMultiValuePropertyParts | IMultiValuePropertyParts}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fgv/ts-json",
3
- "version": "5.1.0-15",
3
+ "version": "5.1.0-17",
4
4
  "description": "Typescript utilities for working with JSON",
5
5
  "main": "lib/index.js",
6
6
  "types": "dist/ts-json.d.ts",
@@ -43,16 +43,16 @@
43
43
  "@rushstack/heft-jest-plugin": "1.2.6",
44
44
  "@microsoft/api-extractor": "^7.55.2",
45
45
  "typedoc": "~0.28.16",
46
- "@fgv/typedoc-compact-theme": "5.1.0-15",
47
- "@fgv/heft-dual-rig": "5.1.0-15",
48
- "@fgv/ts-utils": "5.1.0-15",
49
- "@fgv/ts-utils-jest": "5.1.0-15",
50
- "@fgv/ts-json-base": "5.1.0-15"
46
+ "@fgv/heft-dual-rig": "5.1.0-17",
47
+ "@fgv/typedoc-compact-theme": "5.1.0-17",
48
+ "@fgv/ts-utils": "5.1.0-17",
49
+ "@fgv/ts-json-base": "5.1.0-17",
50
+ "@fgv/ts-utils-jest": "5.1.0-17"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "mustache": "^4.2.0",
54
- "@fgv/ts-utils": "5.1.0-15",
55
- "@fgv/ts-json-base": "5.1.0-15"
54
+ "@fgv/ts-utils": "5.1.0-17",
55
+ "@fgv/ts-json-base": "5.1.0-17"
56
56
  },
57
57
  "exports": {
58
58
  ".": {