convex-helpers
Advanced tools
Comparing version 0.1.16 to 0.1.17
@@ -33,2 +33,4 @@ import { PropertyValidators, Validator } from "convex/values"; | ||
export declare const number: Validator<number, false, never>; | ||
/** JavaScript number, represented as a float64 in the database. */ | ||
export declare const float64: Validator<number, false, never>; | ||
/** boolean value. For typing it only as true, use `l(true)` */ | ||
@@ -38,2 +40,4 @@ export declare const boolean: Validator<boolean, false, never>; | ||
export declare const bigint: Validator<bigint, false, never>; | ||
/** bigint, though stored as an int64 in the database. */ | ||
export declare const int64: Validator<bigint, false, never>; | ||
/** Any Convex value */ | ||
@@ -45,8 +49,14 @@ export declare const any: Validator<any, false, string>; | ||
export declare const id: <TableName extends string>(tableName: TableName) => Validator<import("convex/values").GenericId<TableName>, false, never>; | ||
/** Object validator. `obj({ a: v.any() })` is `v.object({ a: v.any() })` */ | ||
export declare const obj: <T_2 extends PropertyValidators>(schema: T_2) => import("convex/dist/cjs-types/values/validator").ObjectValidator<T_2>; | ||
/** Object validator. `object({ a: v.any() })` is `v.object({ a: v.any() })` */ | ||
export declare const object: <T_2 extends PropertyValidators>(schema: T_2) => import("convex/dist/cjs-types/values/validator").ObjectValidator<T_2>; | ||
/** Array validator. `array(v.any())` is `v.array(v.any())` */ | ||
export declare const array: <T_1>(values: Validator<T_1, false, any>) => Validator<T_1[], false, never>; | ||
/** Literal value: a specific string, number, bigint or boolean value */ | ||
/** ArrayBuffer validator. */ | ||
export declare const arrayBuffer: () => Validator<ArrayBuffer, false, never>; | ||
/** ArrayBuffer validator. */ | ||
export declare const bytes: () => Validator<ArrayBuffer, false, never>; | ||
/** Literal value (specific const value). `l(123)` is `v.literal(123)` */ | ||
export declare const l: <T extends string | number | bigint | boolean>(literal: T) => Validator<T, false, never>; | ||
/** Literal value (specific const value). `literal(123)` is `v.literal(123)` */ | ||
export declare const literal: <T extends string | number | bigint | boolean>(literal: T) => Validator<T, false, never>; | ||
/** The value can be undefined / not specified */ | ||
@@ -53,0 +63,0 @@ export declare const optional: <T_4 extends Validator<any, false, any>>(inner: T_4) => Validator<T_4["type"] | undefined, true, T_4["fieldPaths"]>; |
@@ -38,2 +38,4 @@ import { v } from "convex/values"; | ||
export const number = v.float64(); | ||
/** JavaScript number, represented as a float64 in the database. */ | ||
export const float64 = v.float64(); | ||
/** boolean value. For typing it only as true, use `l(true)` */ | ||
@@ -43,2 +45,4 @@ export const boolean = v.boolean(); | ||
export const bigint = v.int64(); | ||
/** bigint, though stored as an int64 in the database. */ | ||
export const int64 = v.int64(); | ||
/** Any Convex value */ | ||
@@ -50,8 +54,14 @@ export const any = v.any(); | ||
export const id = v.id; | ||
/** Object validator. `obj({ a: v.any() })` is `v.object({ a: v.any() })` */ | ||
export const obj = v.object; | ||
/** Object validator. `object({ a: v.any() })` is `v.object({ a: v.any() })` */ | ||
export const object = v.object; | ||
/** Array validator. `array(v.any())` is `v.array(v.any())` */ | ||
export const array = v.array; | ||
/** Literal value: a specific string, number, bigint or boolean value */ | ||
/** ArrayBuffer validator. */ | ||
export const arrayBuffer = v.bytes; | ||
/** ArrayBuffer validator. */ | ||
export const bytes = v.bytes; | ||
/** Literal value (specific const value). `l(123)` is `v.literal(123)` */ | ||
export const l = v.literal; | ||
/** Literal value (specific const value). `literal(123)` is `v.literal(123)` */ | ||
export const literal = v.literal; | ||
/** The value can be undefined / not specified */ | ||
@@ -58,0 +68,0 @@ export const optional = v.optional; |
{ | ||
"name": "convex-helpers", | ||
"version": "0.1.16", | ||
"version": "0.1.17", | ||
"description": "A collection of useful code to complement the official convex package.", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -60,2 +60,4 @@ import { PropertyValidators, Validator, v } from "convex/values"; | ||
export const number = v.float64(); | ||
/** JavaScript number, represented as a float64 in the database. */ | ||
export const float64 = v.float64(); | ||
/** boolean value. For typing it only as true, use `l(true)` */ | ||
@@ -65,2 +67,4 @@ export const boolean = v.boolean(); | ||
export const bigint = v.int64(); | ||
/** bigint, though stored as an int64 in the database. */ | ||
export const int64 = v.int64(); | ||
/** Any Convex value */ | ||
@@ -72,8 +76,14 @@ export const any = v.any(); | ||
export const id = v.id; | ||
/** Object validator. `obj({ a: v.any() })` is `v.object({ a: v.any() })` */ | ||
export const obj = v.object; | ||
/** Object validator. `object({ a: v.any() })` is `v.object({ a: v.any() })` */ | ||
export const object = v.object; | ||
/** Array validator. `array(v.any())` is `v.array(v.any())` */ | ||
export const array = v.array; | ||
/** Literal value: a specific string, number, bigint or boolean value */ | ||
/** ArrayBuffer validator. */ | ||
export const arrayBuffer = v.bytes; | ||
/** ArrayBuffer validator. */ | ||
export const bytes = v.bytes; | ||
/** Literal value (specific const value). `l(123)` is `v.literal(123)` */ | ||
export const l = v.literal; | ||
/** Literal value (specific const value). `literal(123)` is `v.literal(123)` */ | ||
export const literal = v.literal; | ||
/** The value can be undefined / not specified */ | ||
@@ -80,0 +90,0 @@ export const optional = v.optional; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
305014
5948