the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+52
@@ -0,0 +1,52 @@
|
||||
import type { DrawInteractions } from "../common";
|
||||
type Check<T> = (value: unknown) => value is T;
|
||||
/**
|
||||
* Checks whether a value is a finite, non-negative number.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is a number >= 0 and finite.
|
||||
*/
|
||||
export declare const isFiniteNonNegativeNumber: Check<number>;
|
||||
/**
|
||||
* Checks whether a value is a boolean.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is either true or false.
|
||||
*/
|
||||
export declare const isBoolean: Check<boolean>;
|
||||
/**
|
||||
* Checks whether a value is null.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is null.
|
||||
*/
|
||||
export declare const isNull: Check<null>;
|
||||
/**
|
||||
* Checks whether a value is a non-null object.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is an object and not null.
|
||||
*/
|
||||
export declare const isNonNullObject: Check<Record<string, unknown>>;
|
||||
/**
|
||||
* Checks whether a value is a function.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is a callable function.
|
||||
*/
|
||||
export declare const isFunction: Check<Function>;
|
||||
/**
|
||||
* Checks whether a value is a string with at least one character.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is a non-empty string.
|
||||
*/
|
||||
export declare const isNonEmptyString: Check<string>;
|
||||
/**
|
||||
* Checks whether a value is a supported draw interaction string.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is one of the DrawInteractions literals.
|
||||
*/
|
||||
export declare const isDrawInteraction: Check<DrawInteractions>;
|
||||
export {};
|
||||
Reference in new issue
Block a user