@sprucelabs/schema 31.1.0 → 31.1.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.
- package/build/esm/fields/SelectField.types.d.ts +2 -2
- package/build/esm/tests/selectAssert.deprecated.d.ts +1 -1
- package/build/esm/tests/selectAssert.utility.d.ts +1 -1
- package/build/fields/SelectField.types.d.ts +2 -2
- package/build/tests/selectAssert.deprecated.d.ts +1 -1
- package/build/tests/selectAssert.utility.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FieldDefinition } from './field.static.types';
|
|
2
|
+
export type SelectValue = string | number;
|
|
2
3
|
export interface SelectChoice {
|
|
3
4
|
/** Machine readable way to identify this choice */
|
|
4
|
-
value:
|
|
5
|
-
/** Human readable label for when selecting a choice */
|
|
5
|
+
value: SelectValue;
|
|
6
6
|
label: string;
|
|
7
7
|
}
|
|
8
8
|
export interface SelectFieldOptions {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* @deprecated selectAssertUtil -> selectAssert
|
|
3
3
|
*/
|
|
4
4
|
declare const selectAssertUtil: {
|
|
5
|
-
assertSelectChoicesMatch<Choice extends import("..").SelectChoice, Values extends Choice["value"]
|
|
5
|
+
assertSelectChoicesMatch<Choice extends import("..").SelectChoice, Values extends Choice["value"] = Choice["value"]>(choices: Choice[], expected: Values[]): void;
|
|
6
6
|
};
|
|
7
7
|
export default selectAssertUtil;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectChoice } from '../fields/SelectField.types';
|
|
2
2
|
declare const selectAssert: {
|
|
3
|
-
assertSelectChoicesMatch<Choice extends SelectChoice, Values extends Choice["value"]
|
|
3
|
+
assertSelectChoicesMatch<Choice extends SelectChoice, Values extends Choice["value"] = Choice["value"]>(choices: Choice[], expected: Values[]): void;
|
|
4
4
|
};
|
|
5
5
|
export default selectAssert;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FieldDefinition } from './field.static.types';
|
|
2
|
+
export type SelectValue = string | number;
|
|
2
3
|
export interface SelectChoice {
|
|
3
4
|
/** Machine readable way to identify this choice */
|
|
4
|
-
value:
|
|
5
|
-
/** Human readable label for when selecting a choice */
|
|
5
|
+
value: SelectValue;
|
|
6
6
|
label: string;
|
|
7
7
|
}
|
|
8
8
|
export interface SelectFieldOptions {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* @deprecated selectAssertUtil -> selectAssert
|
|
3
3
|
*/
|
|
4
4
|
declare const selectAssertUtil: {
|
|
5
|
-
assertSelectChoicesMatch<Choice extends import("..").SelectChoice, Values extends Choice["value"]
|
|
5
|
+
assertSelectChoicesMatch<Choice extends import("..").SelectChoice, Values extends Choice["value"] = Choice["value"]>(choices: Choice[], expected: Values[]): void;
|
|
6
6
|
};
|
|
7
7
|
export default selectAssertUtil;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectChoice } from '../fields/SelectField.types';
|
|
2
2
|
declare const selectAssert: {
|
|
3
|
-
assertSelectChoicesMatch<Choice extends SelectChoice, Values extends Choice["value"]
|
|
3
|
+
assertSelectChoicesMatch<Choice extends SelectChoice, Values extends Choice["value"] = Choice["value"]>(choices: Choice[], expected: Values[]): void;
|
|
4
4
|
};
|
|
5
5
|
export default selectAssert;
|