@bessemer/cornerstone 0.5.18 → 0.5.20
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/dist/range.d.ts +3 -3
- package/dist/range.d.ts.map +1 -1
- package/dist/range.js +2 -2
- package/dist/range.js.map +1 -1
- package/package.json +1 -1
package/dist/range.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ZodType } from 'zod';
|
2
|
-
import { TaggedType } from '@bessemer/cornerstone/types';
|
3
|
-
export declare const boundsSchema: <T extends ZodType>(type: T) =>
|
1
|
+
import Zod, { ZodType } from 'zod';
|
2
|
+
import { type TaggedType } from '@bessemer/cornerstone/types';
|
3
|
+
export declare const boundsSchema: <T extends ZodType>(type: T) => Zod.ZodBranded<Zod.ZodTuple<[Zod.ZodNullable<T>, Zod.ZodNullable<T>], null>, "Bounds">;
|
4
4
|
export type Bounds<T> = TaggedType<[T | null, T | null], 'Bounds'>;
|
5
5
|
export declare const bounds: <T>(bounds: [lower: T | null, upper?: T | null]) => Bounds<T>;
|
6
6
|
//# sourceMappingURL=range.d.ts.map
|
package/dist/range.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../src/range.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../src/range.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAClC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,CAAC,2FAEtD,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAA;AAElE,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAG,MAAM,CAAC,CAAC,CAM/E,CAAA"}
|
package/dist/range.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
// src/range.ts
|
2
|
-
import
|
2
|
+
import Zod from "zod";
|
3
3
|
var boundsSchema = (type) => {
|
4
4
|
return Zod.tuple([type.nullable(), type.nullable()]).brand("Bounds");
|
5
5
|
};
|
6
6
|
var bounds = (bounds2) => {
|
7
|
-
if (
|
7
|
+
if (bounds2[1] === void 0) {
|
8
8
|
return [bounds2[0], null];
|
9
9
|
}
|
10
10
|
return bounds2;
|
package/dist/range.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/range.ts"],"sourcesContent":["import
|
1
|
+
{"version":3,"sources":["../src/range.ts"],"sourcesContent":["import Zod, { ZodType } from 'zod'\nimport { type TaggedType } from '@bessemer/cornerstone/types'\n\nexport const boundsSchema = <T extends ZodType>(type: T) => {\n return Zod.tuple([type.nullable(), type.nullable()]).brand('Bounds')\n}\n\nexport type Bounds<T> = TaggedType<[T | null, T | null], 'Bounds'>\n\nexport const bounds = <T>(bounds: [lower: T | null, upper?: T | null]): Bounds<T> => {\n if (bounds[1] === undefined) {\n return [bounds[0], null] as Bounds<T>\n }\n\n return bounds as Bounds<T>\n}\n"],"mappings":";AAAA,OAAO,SAAsB;AAGtB,IAAM,eAAe,CAAoB,SAAY;AAC1D,SAAO,IAAI,MAAM,CAAC,KAAK,SAAS,GAAG,KAAK,SAAS,CAAC,CAAC,EAAE,MAAM,QAAQ;AACrE;AAIO,IAAM,SAAS,CAAIA,YAA2D;AACnF,MAAIA,QAAO,CAAC,MAAM,QAAW;AAC3B,WAAO,CAACA,QAAO,CAAC,GAAG,IAAI;AAAA,EACzB;AAEA,SAAOA;AACT;","names":["bounds"]}
|