shelving 1.63.0 → 1.63.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/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "state-management",
12
12
  "query-builder"
13
13
  ],
14
- "version": "1.63.0",
14
+ "version": "1.63.1",
15
15
  "repository": "https://github.com/dhoulb/shelving",
16
16
  "author": "Dave Houlbrooke <dave@shax.com>",
17
17
  "license": "0BSD",
@@ -6,7 +6,7 @@ export declare type Allowed<T extends string | number> = ReadonlyArray<T> | {
6
6
  /** Validate a value against a specific set of allowed values. */
7
7
  export declare function validateAllowed<T extends string | number>(value: unknown, allowed: Allowed<T>): T;
8
8
  /** Define a valid value from an allowed set of values. */
9
- declare abstract class AllowSchema<T extends string | number> extends Schema<T> {
9
+ export declare abstract class AllowSchema<T extends string | number> extends Schema<T> {
10
10
  readonly allow: Allowed<T>;
11
11
  readonly value: T | null;
12
12
  constructor({ allow, value, ...options }: ConstructorParameters<typeof Schema>[0] & {
@@ -23,7 +23,6 @@ export declare class AllowNumberSchema<T extends number> extends AllowSchema<T>
23
23
  validate(unsafeValue?: unknown): T;
24
24
  }
25
25
  /** Valid string from an allowed set of strings. */
26
- export declare const ALLOW_STRING: <T extends string>(allow: Allowed<T>) => AllowSchema<T>;
26
+ export declare const ALLOW_STRING: <T extends string>(allow: Allowed<T>) => AllowStringSchema<T>;
27
27
  /** Valid string from an allowed set of numbers. */
28
- export declare const ALLOW_NUMBER: <T extends number>(allow: Allowed<T>) => AllowSchema<T>;
29
- export {};
28
+ export declare const ALLOW_NUMBER: <T extends number>(allow: Allowed<T>) => AllowNumberSchema<T>;
@@ -17,7 +17,7 @@ export function validateAllowed(value, allowed) {
17
17
  throw new InvalidFeedback("Unknown value", { value });
18
18
  }
19
19
  /** Define a valid value from an allowed set of values. */
20
- class AllowSchema extends Schema {
20
+ export class AllowSchema extends Schema {
21
21
  constructor({ allow, value = null, ...options }) {
22
22
  super(options);
23
23
  this.allow = allow;