@storm-stack/serialization
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -1,35 +0,37 @@ | ||
declare type Class = { | ||
new (...args: any[]): any; | ||
}; | ||
export { Class } | ||
export { Class as Class_alias_1 } | ||
declare const $NestedValue: unique symbol; | ||
export { $NestedValue } | ||
export { $NestedValue as $NestedValue_alias_1 } | ||
declare type ClassInstance = any; | ||
export { ClassInstance } | ||
export { ClassInstance as ClassInstance_alias_1 } | ||
declare interface Abstract<T> { | ||
prototype: T; | ||
} | ||
export { Abstract } | ||
export { Abstract as Abstract_alias_1 } | ||
declare type AnyCase<T extends IndexType> = string extends T ? string : T extends `${infer F1}${infer F2}${infer R}` ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}` : T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}` : typeof EMPTY_STRING; | ||
export { AnyCase } | ||
export { AnyCase as AnyCase_alias_1 } | ||
declare type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never; | ||
export { ArrayElement } | ||
export { ArrayElement as ArrayElement_alias_1 } | ||
declare type BrowserNativeObject = Date | FileList | File; | ||
export { BrowserNativeObject } | ||
export { BrowserNativeObject as BrowserNativeObject_alias_1 } | ||
/** | ||
* A class that can be serialized and deserialized | ||
* Convert the input string to camel case. | ||
* | ||
* @remarks | ||
* "thisIsAnExample" | ||
* | ||
* @param input - The input string. | ||
* @returns The camel-cased string. | ||
*/ | ||
declare interface ClassSerializable<TData, TJsonValue extends JsonValue = JsonValue> { | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @returns The data object to serialize | ||
*/ | ||
serialize: () => TJsonValue; | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
*/ | ||
deserialize: (json: TJsonValue) => void; | ||
} | ||
export { ClassSerializable } | ||
export { ClassSerializable as ClassSerializable_alias_1 } | ||
declare const camelCase: (input?: string) => string | undefined; | ||
export { camelCase } | ||
export { camelCase as camelCase_alias_1 } | ||
export { camelCase as camelCase_alias_2 } | ||
declare type ClassTypeAnnotation = ["class", string]; | ||
export { ClassTypeAnnotation } | ||
export { ClassTypeAnnotation as ClassTypeAnnotation_alias_1 } | ||
declare interface ClassTypeCheckable<T> extends ITyped { | ||
@@ -43,64 +45,675 @@ /** | ||
} | ||
export { ClassTypeCheckable } | ||
export { ClassTypeCheckable as ClassTypeCheckable_alias_1 } | ||
declare type CompositeTypeAnnotation = TypedArrayAnnotation | ClassTypeAnnotation | SymbolTypeAnnotation | CustomTypeAnnotation; | ||
export { CompositeTypeAnnotation } | ||
export { CompositeTypeAnnotation as CompositeTypeAnnotation_alias_1 } | ||
declare interface Clonable<T> { | ||
clone(): T; | ||
} | ||
export { Clonable } | ||
export { Clonable as Clonable_alias_1 } | ||
declare type CustomTypeAnnotation = ["custom", string]; | ||
export { CustomTypeAnnotation } | ||
export { CustomTypeAnnotation as CustomTypeAnnotation_alias_1 } | ||
declare type Collection = IArguments | Array<unknown> | Map<unknown, unknown> | Record<string | number | symbol, unknown> | Set<unknown>; | ||
export { Collection } | ||
export { Collection as Collection_alias_1 } | ||
/** | ||
* A class that can be serialized and deserialized | ||
* Convert the input string to constant case. | ||
* | ||
* @remarks | ||
* "THIS_IS_AN_EXAMPLE" | ||
* | ||
* @param input - The input string. | ||
* @returns The constant-cased string. | ||
*/ | ||
declare interface DataTransformer<TData, TJsonValue extends JsonValue = JsonValue> { | ||
declare const constantCase: (input?: string) => string | undefined; | ||
export { constantCase } | ||
export { constantCase as constantCase_alias_1 } | ||
export { constantCase as constantCase_alias_2 } | ||
/** | ||
* copy value with customizer function | ||
* | ||
* @private | ||
* @param value | ||
* @param type | ||
*/ | ||
declare function copy(value: unknown, valueType: string, customizer?: ((value: unknown, type: string) => unknown) | null): unknown; | ||
export { copy } | ||
export { copy as copy_alias_1 } | ||
export { copy as copy_alias_2 } | ||
declare const Crypto_2: Crypto | undefined; | ||
export { Crypto_2 as Crypto } | ||
export { Crypto_2 as Crypto_alias_1 } | ||
export { Crypto_2 as Crypto_alias_2 } | ||
/** | ||
* Deep copy an object/array/value | ||
* | ||
* @param value - The value to copy | ||
* @param options - The options | ||
*/ | ||
declare function deepCopy<T>(value: T, options?: { | ||
customizer?: (value: unknown, type: string) => unknown; | ||
}): T; | ||
export { deepCopy } | ||
export { deepCopy as deepCopy_alias_1 } | ||
export { deepCopy as deepCopy_alias_2 } | ||
/** | ||
* Deep merge two objects | ||
* | ||
* @param target - The target object | ||
* @param source - The source object | ||
* @param options - The options object | ||
* @returns The merged object | ||
*/ | ||
declare const deepMerge: { | ||
<X = any, Y = any, Z = X & Y>(target: X, source: Y, options?: any): Z; | ||
all(array: Array<any>, options?: any): any; | ||
}; | ||
export { deepMerge } | ||
export { deepMerge as deepMerge_alias_1 } | ||
export { deepMerge as deepMerge_alias_2 } | ||
declare type DeepPartial<T> = T extends BrowserNativeObject | NestedValue ? T : { | ||
[K in keyof T]?: DeepPartial<T[K]>; | ||
}; | ||
export { DeepPartial } | ||
export { DeepPartial as DeepPartial_alias_1 } | ||
declare const EMPTY_OBJECT: {}; | ||
export { EMPTY_OBJECT } | ||
export { EMPTY_OBJECT as EMPTY_OBJECT_alias_1 } | ||
declare const EMPTY_STRING: ""; | ||
export { EMPTY_STRING } | ||
export { EMPTY_STRING as EMPTY_STRING_alias_1 } | ||
declare type EmptyObject = { | ||
[K in string | number]: never; | ||
}; | ||
export { EmptyObject } | ||
export { EmptyObject as EmptyObject_alias_1 } | ||
/** | ||
* Create a type from an object type without certain keys. | ||
* | ||
* @remarks We recommend setting the `requireExactProps` option to `true`. | ||
* @remarks This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically. | ||
* @remarks This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)). | ||
* @category Object | ||
*/ | ||
declare type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = { | ||
requireExactProps: false; | ||
}> = { | ||
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; | ||
} & (Options["requireExactProps"] extends true ? Partial<Record<KeysType, never>> : {}); | ||
export { Except } | ||
export { Except as Except_alias_1 } | ||
declare type ExceptOptions = { | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
Disallow assigning non-specified properties. | ||
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`. | ||
@default false | ||
*/ | ||
serialize: SerializationFunct<TData, TJsonValue>; | ||
requireExactProps?: boolean; | ||
}; | ||
declare type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : KeyType extends ExcludeType ? never : KeyType; | ||
export { Filter } | ||
export { Filter as Filter_alias_1 } | ||
/** | ||
* Flatten an object. | ||
* | ||
* @param obj - The object to flatten. | ||
* @param prefix - The prefix to use. | ||
* @param keyStringFn - The function to use to convert the key to a string. | ||
* @returns The flattened object. | ||
*/ | ||
declare const flattenObject: (obj: any, prefix?: string, keyStringFn?: (input?: string) => string | undefined) => any; | ||
export { flattenObject } | ||
export { flattenObject as flattenObject_alias_1 } | ||
export { flattenObject as flattenObject_alias_2 } | ||
/** | ||
* Gets the `toStringTag` of `obj`. | ||
* | ||
* @param value The obj to query. | ||
* @returns Returns the `toStringTag`. | ||
*/ | ||
declare const getObjectTag: (value: unknown) => string; | ||
export { getObjectTag } | ||
export { getObjectTag as getObjectTag_alias_1 } | ||
export { getObjectTag as getObjectTag_alias_2 } | ||
/** | ||
* Get the WebCrypto object | ||
* | ||
* @remarks | ||
* This helper function is used to get the WebCrypto object. If the object is not available, an error will be thrown. | ||
* | ||
* @returns The WebCrypto object | ||
*/ | ||
declare const getWebCrypto: () => Crypto; | ||
export { getWebCrypto } | ||
export { getWebCrypto as getWebCrypto_alias_1 } | ||
export { getWebCrypto as getWebCrypto_alias_2 } | ||
declare interface IIdentity<T = string> { | ||
id: T; | ||
} | ||
export { IIdentity } | ||
export { IIdentity as IIdentity_alias_1 } | ||
/** | ||
* The declaration of a ***dictionary-type*** object | ||
*/ | ||
declare type Indexable = { | ||
[index: IndexType]: any; | ||
}; | ||
export { Indexable } | ||
export { Indexable as Indexable_alias_1 } | ||
/** | ||
* The valid types of the index for an `Indexable` type object | ||
*/ | ||
declare type IndexType = string | number | symbol; | ||
export { IndexType } | ||
export { IndexType as IndexType_alias_1 } | ||
/** | ||
* Check if the provided value's type is "array-like" | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is "array-like" | ||
*/ | ||
declare const isArrayLike: (value: any) => boolean; | ||
export { isArrayLike } | ||
export { isArrayLike as isArrayLike_alias_1 } | ||
export { isArrayLike as isArrayLike_alias_2 } | ||
/** | ||
* Check if the provided value's type is `AsyncIterable` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is `AsyncIterable` | ||
*/ | ||
declare const isAsyncIterable: (value: unknown) => value is AsyncIterable<unknown>; | ||
export { isAsyncIterable } | ||
export { isAsyncIterable as isAsyncIterable_alias_1 } | ||
export { isAsyncIterable as isAsyncIterable_alias_2 } | ||
/** | ||
* Checks if `value` is classified as a `bigint` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isDate(37n) | ||
* // => true | ||
* | ||
* isBigInt(37) | ||
* // => false | ||
* ``` | ||
* | ||
* @param value The obj to check. | ||
* @returns Returns `true` if `value` is a bigint object, else `false`. | ||
*/ | ||
declare const isBigInt: (value: unknown) => value is bigint; | ||
export { isBigInt } | ||
export { isBigInt as isBigInt_alias_1 } | ||
export { isBigInt as isBigInt_alias_2 } | ||
/** | ||
* Check if the provided value's type is `boolean` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `boolean` | ||
*/ | ||
declare const isBoolean: (value: unknown) => value is boolean; | ||
export { isBoolean } | ||
export { isBoolean as isBoolean_alias_1 } | ||
export { isBoolean as isBoolean_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Buffer` | ||
*/ | ||
declare const isBuffer: typeof Buffer.isBuffer; | ||
export { isBuffer } | ||
export { isBuffer as isBuffer_alias_1 } | ||
export { isBuffer as isBuffer_alias_2 } | ||
declare const isBufferExists: boolean; | ||
export { isBufferExists } | ||
export { isBufferExists as isBufferExists_alias_1 } | ||
export { isBufferExists as isBufferExists_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Collection` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Collection` | ||
*/ | ||
declare function isCollection(value: any): value is Collection; | ||
export { isCollection } | ||
export { isCollection as isCollection_alias_1 } | ||
export { isCollection as isCollection_alias_2 } | ||
/** | ||
* Checks if `value` is classified as a `Date` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isDate(new Date) | ||
* // => true | ||
* | ||
* isDate('Mon April 23 2012') | ||
* // => false | ||
* ``` | ||
* | ||
* @param value - The value to check. | ||
* @returns Returns `true` if `obj` is a date object, else `false`. | ||
*/ | ||
declare const isDate: (value: unknown) => value is Date; | ||
export { isDate } | ||
export { isDate as isDate_alias_1 } | ||
export { isDate as isDate_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` or `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` or `undefined` | ||
*/ | ||
declare const isEmpty: (value: unknown) => boolean; | ||
export { isEmpty } | ||
export { isEmpty as isEmpty_alias_1 } | ||
export { isEmpty as isEmpty_alias_2 } | ||
/** | ||
* Check if the provided value's type is `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `{}` | ||
*/ | ||
declare const isEmptyObject: (value: unknown) => value is {}; | ||
export { isEmptyObject } | ||
export { isEmptyObject as isEmptyObject_alias_1 } | ||
export { isEmptyObject as isEmptyObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` or `undefined` or `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` or `undefined` or `{}` | ||
*/ | ||
declare const isEmptyOrEmptyObject: (value: unknown) => boolean; | ||
export { isEmptyOrEmptyObject } | ||
export { isEmptyOrEmptyObject as isEmptyOrEmptyObject_alias_1 } | ||
export { isEmptyOrEmptyObject as isEmptyOrEmptyObject_alias_2 } | ||
/** | ||
* Determine if the type is string and is empty | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `""` | ||
*/ | ||
declare const isEmptyString: (value: unknown) => value is string; | ||
export { isEmptyString } | ||
export { isEmptyString as isEmptyString_alias_1 } | ||
export { isEmptyString as isEmptyString_alias_2 } | ||
/** | ||
* Returns a boolean for whether the two given types are equal. | ||
* | ||
* @remarks Use-cases: If you want to make a conditional branch based on the result of a comparison of two types. | ||
* @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650 | ||
* @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796 | ||
* @category Type Guard | ||
* @category Utilities | ||
*/ | ||
declare type IsEqual<A, B> = (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B ? 1 : 2 ? true : false; | ||
export { IsEqual } | ||
export { IsEqual as IsEqual_alias_1 } | ||
declare interface ISequenced { | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* The sequence number (version, or event counter, etc.) of the record | ||
*/ | ||
deserialize: DeserializeFunct<TData, TJsonValue>; | ||
sequence: number; | ||
} | ||
export { DataTransformer } | ||
export { DataTransformer as DataTransformer_alias_1 } | ||
export { ISequenced } | ||
export { ISequenced as ISequenced_alias_1 } | ||
/** | ||
* Deserialize the given value with superjson using the given metadata | ||
* Checks if `obj` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, | ||
* `SyntaxError`, `TypeError`, or `URIError` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isError(new Error) | ||
* // => true | ||
* | ||
* isError(Error) | ||
* // => false | ||
* ``` | ||
* | ||
* @param obj - The obj to check. | ||
* @returns Returns `true` if `obj` is an error object, else `false`. | ||
*/ | ||
declare function deserialize<TData = unknown>(payload: JsonParserResult): TData; | ||
export { deserialize } | ||
export { deserialize as deserialize_alias_1 } | ||
declare const isError: (obj: unknown) => obj is Error; | ||
export { isError } | ||
export { isError as isError_alias_1 } | ||
export { isError as isError_alias_2 } | ||
/** | ||
* A function that can deserialize a certain type of data | ||
* Check if the provided value's type is a float | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` and is a float | ||
*/ | ||
declare type DeserializeFunct<TData = any, TJsonValue extends JsonValue = JsonValue> = (json: TJsonValue) => TData; | ||
export { DeserializeFunct } | ||
export { DeserializeFunct as DeserializeFunct_alias_1 } | ||
declare const isFloat: (value: any) => value is number; | ||
export { isFloat } | ||
export { isFloat as isFloat_alias_1 } | ||
export { isFloat as isFloat_alias_2 } | ||
declare interface IJsonParser { | ||
parse: <TData = any>(strData: string) => TData; | ||
stringify: <TData = any>(data: TData) => string; | ||
serialize: (object: JsonValue) => JsonParserResult; | ||
deserialize: <TData = any>(payload: JsonParserResult) => TData; | ||
register: <TData = any, TJsonValue extends JsonValue = JsonValue>(name: string, serialize: (object: JsonValue) => TJsonValue, deserialize: (payload: TJsonValue) => TData, isApplicable: (data: any) => data is TData) => void; | ||
} | ||
export { IJsonParser } | ||
export { IJsonParser as IJsonParser_alias_1 } | ||
/** | ||
* Check if the provided value's type is `Function` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Function` | ||
*/ | ||
declare const isFunction: (value: unknown) => value is ((params?: unknown) => unknown) & Function; | ||
export { isFunction } | ||
export { isFunction as isFunction_alias_1 } | ||
export { isFunction as isFunction_alias_2 } | ||
declare type InnerNode<T> = [T, Record<string, Tree<T>>]; | ||
export { InnerNode } | ||
export { InnerNode as InnerNode_alias_1 } | ||
/** | ||
* Check if the provided value's type is an integer | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` and is an integer | ||
*/ | ||
declare const isInt: (value: any) => value is number; | ||
export { isInt } | ||
export { isInt as isInt_alias_1 } | ||
export { isInt as isInt_alias_2 } | ||
declare const isMergeableObject: (value: any) => boolean; | ||
export { isMergeableObject } | ||
export { isMergeableObject as isMergeableObject_alias_1 } | ||
export { isMergeableObject as isMergeableObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Object` and is not `null` or `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined` | ||
*/ | ||
export declare const isNonNullObject: (value: any) => value is object; | ||
/** | ||
* The inverse of the `isEmptyObject` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined` or `{}` | ||
*/ | ||
declare const isNotEmpty: (value: unknown) => value is {}; | ||
export { isNotEmpty } | ||
export { isNotEmpty as isNotEmpty_alias_1 } | ||
export { isNotEmpty as isNotEmpty_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` | ||
*/ | ||
declare const isNull: (value: unknown) => value is null; | ||
export { isNull } | ||
export { isNull as isNull_alias_1 } | ||
export { isNull as isNull_alias_2 } | ||
/** | ||
* Check if the provided value's type is `number` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` | ||
*/ | ||
declare const isNumber: (value: unknown) => value is number; | ||
export { isNumber } | ||
export { isNumber as isNumber_alias_1 } | ||
export { isNumber as isNumber_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Object` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Object` | ||
*/ | ||
declare const isObject: (value: unknown) => value is object; | ||
export { isObject } | ||
export { isObject as isObject_alias_1 } | ||
export { isObject as isObject_alias_2 } | ||
/** | ||
* Checks if `value` is object-like. A value is object-like if it's not `null` | ||
* and has a `typeof` result of "object". | ||
* | ||
* @example | ||
* ```typescript | ||
* isObjectLike({}) | ||
* // => true | ||
* | ||
* isObjectLike([1, 2, 3]) | ||
* // => true | ||
* | ||
* isObjectLike(Function) | ||
* // => false | ||
* | ||
* isObjectLike(null) | ||
* // => false | ||
* ``` | ||
* | ||
* @param value - The value to check. | ||
* @returns Returns `true` if `value` is object-like, else `false`. | ||
*/ | ||
declare const isObjectLike: (obj: unknown) => boolean; | ||
export { isObjectLike } | ||
export { isObjectLike as isObjectLike_alias_1 } | ||
export { isObjectLike as isObjectLike_alias_2 } | ||
/** | ||
* Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. | ||
* | ||
* @example | ||
* ```typescript | ||
* function Foo() { | ||
* this.a = 1 | ||
* } | ||
* | ||
* isPlainObject(new Foo) | ||
* // => false | ||
* | ||
* isPlainObject([1, 2, 3]) | ||
* // => false | ||
* | ||
* isPlainObject({ 'x': 0, 'y': 0 }) | ||
* // => true | ||
* | ||
* isPlainObject(Object.create(null)) | ||
* // => true | ||
* ``` | ||
* | ||
* @param obj The value to check. | ||
* @returns Returns `true` if `obj` is a plain object, else `false`. | ||
*/ | ||
declare const isPlainObject: (obj: unknown) => boolean; | ||
export { isPlainObject } | ||
export { isPlainObject as isPlainObject_alias_1 } | ||
export { isPlainObject as isPlainObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is a built-in primitive | ||
* | ||
* @remarks | ||
* The full list of primitive types includes: | ||
* * `number` | ||
* * `string` | ||
* * `boolean` | ||
* * `symbol` | ||
* * `bigint` | ||
* * `undefined` | ||
* * `null` | ||
* | ||
* @param obj - The value to type check | ||
* @returns An indicator specifying if the value provided is a built-in primitive | ||
*/ | ||
declare const isPrimitive: (value: unknown) => boolean; | ||
export { isPrimitive } | ||
export { isPrimitive as isPrimitive_alias_1 } | ||
export { isPrimitive as isPrimitive_alias_2 } | ||
/** | ||
* Check if the provided value's type is a promise | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type a promise | ||
*/ | ||
declare const isPromise: (value: unknown) => value is Promise<unknown>; | ||
export { isPromise } | ||
export { isPromise as isPromise_alias_1 } | ||
export { isPromise as isPromise_alias_2 } | ||
/** | ||
* Check if the provided value is a {@link https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 React Element}. | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type {@link https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 React Element} | ||
*/ | ||
declare const isReactElement: (value: any) => boolean; | ||
export { isReactElement } | ||
export { isReactElement as isReactElement_alias_1 } | ||
export { isReactElement as isReactElement_alias_2 } | ||
/** | ||
* Check if the provided value's type is a ref | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type ref | ||
*/ | ||
declare const isRef: <TRef = unknown>(value: unknown) => value is RefObject<TRef>; | ||
export { isRef } | ||
export { isRef as isRef_alias_1 } | ||
export { isRef as isRef_alias_2 } | ||
/** | ||
* The function checks if the code is running in | ||
* the browser (and not on the server). | ||
*/ | ||
declare const isRuntimeClient: () => boolean; | ||
export { isRuntimeClient } | ||
export { isRuntimeClient as isRuntimeClient_alias_1 } | ||
export { isRuntimeClient as isRuntimeClient_alias_2 } | ||
/** | ||
* The function checks if the code is running on | ||
* the server (and not in the browser). | ||
*/ | ||
declare const isRuntimeServer: () => boolean; | ||
export { isRuntimeServer } | ||
export { isRuntimeServer as isRuntimeServer_alias_1 } | ||
export { isRuntimeServer as isRuntimeServer_alias_2 } | ||
/** | ||
* Check if the provided value's type is SelectOption | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type SelectOption | ||
*/ | ||
declare const isSelectOption: (value: unknown) => value is SelectOption; | ||
export { isSelectOption } | ||
export { isSelectOption as isSelectOption_alias_1 } | ||
export { isSelectOption as isSelectOption_alias_2 } | ||
/** | ||
* The inverse of the `isEmpty` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined` | ||
*/ | ||
declare const isSet: (value: unknown) => value is {}; | ||
export { isSet } | ||
export { isSet as isSet_alias_1 } | ||
export { isSet as isSet_alias_2 } | ||
/** | ||
* Check if the provided value's type is NOT `null` nor `undefined` nor `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is NOT `null` nor `undefined` nor `{}` | ||
*/ | ||
declare const isSetObject: (value: unknown) => value is object; | ||
export { isSetObject } | ||
export { isSetObject as isSetObject_alias_1 } | ||
export { isSetObject as isSetObject_alias_2 } | ||
/** | ||
* Determine if the type is string and is not empty (length greater than zero) | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `string` and length greater than zero | ||
*/ | ||
declare const isSetString: (value: unknown) => value is string; | ||
export { isSetString } | ||
export { isSetString as isSetString_alias_1 } | ||
export { isSetString as isSetString_alias_2 } | ||
/** | ||
* Determine if the type is string | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `string` | ||
*/ | ||
declare const isString: (value: unknown) => value is string; | ||
export { isString } | ||
export { isString as isString_alias_1 } | ||
export { isString as isString_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Symbol` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Symbol` | ||
*/ | ||
declare const isSymbol: (value: unknown) => value is symbol; | ||
export { isSymbol } | ||
export { isSymbol as isSymbol_alias_1 } | ||
export { isSymbol as isSymbol_alias_2 } | ||
/** | ||
* Check if the provided value has a `__typename` property | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided has a `__typename` property | ||
*/ | ||
declare const isTyped: (value: unknown) => value is ITyped; | ||
export { isTyped } | ||
export { isTyped as isTyped_alias_1 } | ||
export { isTyped as isTyped_alias_2 } | ||
/** | ||
* Check if the provided value's type is `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `undefined` | ||
*/ | ||
declare const isUndefined: (value: unknown) => boolean; | ||
export { isUndefined } | ||
export { isUndefined as isUndefined_alias_1 } | ||
export { isUndefined as isUndefined_alias_2 } | ||
declare interface ITyped { | ||
@@ -112,205 +725,286 @@ /** | ||
} | ||
export { ITyped } | ||
export { ITyped as ITyped_alias_1 } | ||
declare interface JsonArray extends Array<JsonValue> { | ||
declare interface IVersioned { | ||
version: number; | ||
} | ||
export { JsonArray } | ||
export { JsonArray as JsonArray_alias_1 } | ||
export { IVersioned } | ||
export { IVersioned as IVersioned_alias_1 } | ||
declare interface JsonObject { | ||
[key: string]: JsonValue; | ||
} | ||
export { JsonObject } | ||
export { JsonObject as JsonObject_alias_1 } | ||
/** | ||
* Convert the input string to kebab case. | ||
* | ||
* @remarks | ||
* "this-is-an-example" | ||
* | ||
* @param input - The input string. | ||
* @returns The kebab-cased string. | ||
*/ | ||
declare const kebabCase: (input?: string) => string | undefined; | ||
export { kebabCase } | ||
export { kebabCase as kebabCase_alias_1 } | ||
export { kebabCase as kebabCase_alias_2 } | ||
declare interface JsonParserResult { | ||
json: JsonValue; | ||
meta?: { | ||
values?: Tree<TypeAnnotation> | Record<string, Tree<TypeAnnotation>> | undefined; | ||
referentialEqualities?: Record<string, string[]> | [string[]] | [string[], Record<string, string[]>]; | ||
}; | ||
} | ||
export { JsonParserResult } | ||
export { JsonParserResult as JsonParserResult_alias_1 } | ||
declare type LiteralUnion<T extends U, U extends Primitive> = T | (U & { | ||
_?: never; | ||
}); | ||
export { LiteralUnion } | ||
export { LiteralUnion as LiteralUnion_alias_1 } | ||
declare type JsonValue = PrimitiveJsonValue | JsonArray | JsonObject; | ||
export { JsonValue } | ||
export { JsonValue as JsonValue_alias_1 } | ||
/** | ||
* Lower case the first character of an input string. | ||
* | ||
* @remarks | ||
* "tHISISANEXAMPLE" | ||
* | ||
* @param input - The input string. | ||
* @returns The lower-cased string. | ||
*/ | ||
declare const lowerCaseFirst: (input?: string) => string | undefined; | ||
export { lowerCaseFirst } | ||
export { lowerCaseFirst as lowerCaseFirst_alias_1 } | ||
export { lowerCaseFirst as lowerCaseFirst_alias_2 } | ||
declare type Leaf<T> = [T]; | ||
export { Leaf } | ||
export { Leaf as Leaf_alias_1 } | ||
declare type MaybePromise<T> = T | Promise<T>; | ||
export { MaybePromise } | ||
export { MaybePromise as MaybePromise_alias_1 } | ||
declare type LeafTypeAnnotation = PrimitiveTypeAnnotation | "regexp" | "Date" | "Error" | "URL"; | ||
export { LeafTypeAnnotation } | ||
export { LeafTypeAnnotation as LeafTypeAnnotation_alias_1 } | ||
declare type NestedValue<TValue extends object = object> = { | ||
[$NestedValue]: never; | ||
} & TValue; | ||
export { NestedValue } | ||
export { NestedValue as NestedValue_alias_1 } | ||
declare type Newable<T> = new (...args: never[]) => T; | ||
export { Newable } | ||
export { Newable as Newable_alias_1 } | ||
declare const NEWLINE_STRING: "\r\n"; | ||
export { NEWLINE_STRING } | ||
export { NEWLINE_STRING as NEWLINE_STRING_alias_1 } | ||
declare type NonUndefined<T> = T extends undefined ? never : T; | ||
export { NonUndefined } | ||
export { NonUndefined as NonUndefined_alias_1 } | ||
/** | ||
* Parse the given value with superjson using the given metadata | ||
* A no op, or no-op, function for no operation | ||
* | ||
* @remarks Please see {@link https://dev.to/praneshpsg239/noop-in-javascript-478h this article} for more information. | ||
* | ||
* @param params - An optional parameter passed to the function. It can be anything (but is not used in any way) | ||
*/ | ||
declare function parse<TData = unknown>(strData: string): TData; | ||
export { parse } | ||
export { parse as parse_alias_1 } | ||
declare const noop: (params?: unknown) => void; | ||
export { noop } | ||
export { noop as noop_alias_1 } | ||
export { noop as noop_alias_2 } | ||
/** | ||
* Parse the given value with qs using the given metadata | ||
* Convert the input string to pascal case. | ||
* | ||
* @remarks | ||
* "ThisIsAnExample" | ||
* | ||
* @param input - The input string. | ||
* @returns The pascal-cased string. | ||
*/ | ||
declare function parseQueryParam<TData = unknown>(strData: string, options?: { | ||
comma?: boolean | undefined; | ||
delimiter?: string | RegExp | undefined; | ||
depth?: number | false | undefined; | ||
arrayLimit?: number | undefined; | ||
parseArrays?: boolean | undefined; | ||
allowDots?: boolean | undefined; | ||
plainObjects?: boolean | undefined; | ||
allowPrototypes?: boolean | undefined; | ||
parameterLimit?: number | undefined; | ||
strictNullHandling?: boolean | undefined; | ||
ignoreQueryPrefix?: boolean | undefined; | ||
charset?: "utf-8" | "iso-8859-1" | undefined; | ||
charsetSentinel?: boolean | undefined; | ||
interpretNumericEntities?: boolean | undefined; | ||
}): TData; | ||
export { parseQueryParam } | ||
export { parseQueryParam as parseQueryParam_alias_1 } | ||
declare const pascalCase: (input?: string) => string | undefined; | ||
export { pascalCase } | ||
export { pascalCase as pascalCase_alias_1 } | ||
export { pascalCase as pascalCase_alias_2 } | ||
declare type PrimitiveJsonValue = string | number | boolean | undefined | null; | ||
export { PrimitiveJsonValue } | ||
export { PrimitiveJsonValue as PrimitiveJsonValue_alias_1 } | ||
/** | ||
* Make all characters lowercase and add a period in between each word | ||
* | ||
* @remarks | ||
* "this.is.an.example" | ||
* | ||
* @param input - The input string. | ||
* @returns The period-split string. | ||
*/ | ||
declare const periodSplit: (input?: string) => string | undefined; | ||
export { periodSplit } | ||
export { periodSplit as periodSplit_alias_1 } | ||
export { periodSplit as periodSplit_alias_2 } | ||
declare type PrimitiveTypeAnnotation = "number" | "undefined" | "bigint"; | ||
export { PrimitiveTypeAnnotation } | ||
export { PrimitiveTypeAnnotation as PrimitiveTypeAnnotation_alias_1 } | ||
/** | ||
* Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive). | ||
* | ||
* @category Type | ||
*/ | ||
declare type Primitive = null | undefined | string | number | boolean | symbol | bigint; | ||
export { Primitive } | ||
export { Primitive as Primitive_alias_1 } | ||
declare function register<TData = any, TJsonObject extends JsonValue = JsonValue>(name: string, serialize: (data: TData) => TJsonObject, deserialize: (json: TJsonObject) => TData, isApplicable: (data: any) => data is TData): void; | ||
export { register } | ||
export { register as register_alias_1 } | ||
/** | ||
* Check if the provided object has the provided property | ||
* | ||
* @param object - The object to check | ||
* @param propertyKey - The property to check | ||
* @returns An indicator specifying if the object has the provided property | ||
*/ | ||
declare const propertyExists: (object: any, propertyKey: PropertyKey) => boolean; | ||
export { propertyExists } | ||
export { propertyExists as propertyExists_alias_1 } | ||
export { propertyExists as propertyExists_alias_2 } | ||
declare const Serializable: <TData = any>(options: { | ||
/** | ||
* Check if the provided object has the provided property and if it's safe to merge | ||
* | ||
* @param object - The object to check | ||
* @param propertyKey - The property to check | ||
* @returns An indicator specifying if the object has the provided property and if it's safe to merge | ||
*/ | ||
declare const propertyUnsafe: (object: any, propertyKey: PropertyKey) => boolean; | ||
export { propertyUnsafe } | ||
export { propertyUnsafe as propertyUnsafe_alias_1 } | ||
export { propertyUnsafe as propertyUnsafe_alias_2 } | ||
declare type ReducerFunction<TState, TAction> = (state: TState, action: TAction) => TState; | ||
export { ReducerFunction } | ||
export { ReducerFunction as ReducerFunction_alias_1 } | ||
declare interface RefObject<T> { | ||
current: T; | ||
} | ||
export { RefObject } | ||
export { RefObject as RefObject_alias_1 } | ||
/** | ||
* Extract all required keys from the given type. | ||
* | ||
* @remarks This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc... | ||
* @category Utilities | ||
*/ | ||
declare type RequiredKeysOf<BaseType extends object> = Exclude<{ | ||
[Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]> ? Key : never; | ||
}[keyof BaseType], undefined>; | ||
export { RequiredKeysOf } | ||
export { RequiredKeysOf as RequiredKeysOf_alias_1 } | ||
declare type Rollback = Record<string, (initialValue: any, currentValue: any) => any>; | ||
export { Rollback } | ||
export { Rollback as Rollback_alias_1 } | ||
declare interface SelectOption { | ||
/** | ||
* The type and/or name of the record | ||
* The string value to display in the field | ||
*/ | ||
name?: string | undefined; | ||
name: string; | ||
/** | ||
* Serialize the class to a JSON object or string | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
* The value stored behind the scenes when selected | ||
*/ | ||
serialize: SerializationFunct<TData>; | ||
value: string; | ||
/** | ||
* Deserialize the class from a JSON object or string | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* Is the option value valid for selection in the dropdown | ||
*/ | ||
deserialize: DeserializeFunct<TData>; | ||
}) => <TClass extends new (...args: any) => any = new (...args: any) => TData>(target: TClass) => { | ||
new (...args: any): { | ||
[x: string]: any; | ||
/** | ||
* The name of the class's type | ||
*/ | ||
__typename: string; | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @returns The data object to serialize | ||
*/ | ||
serialize: () => JsonValue; | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
*/ | ||
deserialize: (json: JsonValue) => void; | ||
/** | ||
* Run type check on the given value | ||
* @param value - The value to check | ||
* @returns True if the value is of the type of the class | ||
*/ | ||
isTypeOf(value: any): value is TData; | ||
}; | ||
} & TClass; | ||
export { Serializable } | ||
export { Serializable as Serializable_alias_1 } | ||
disabled: boolean; | ||
/** | ||
* Sets or retrieves whether the option in the list box is the default item. | ||
*/ | ||
selected: boolean; | ||
} | ||
export { SelectOption } | ||
export { SelectOption as SelectOption_alias_1 } | ||
declare type SerializableJsonValue = Symbol | Set<JsonValue> | Map<JsonValue, JsonValue> | undefined | bigint | Date | ClassInstance | RegExp; | ||
export { SerializableJsonValue } | ||
export { SerializableJsonValue as SerializableJsonValue_alias_1 } | ||
declare type SerializableType<T> = ClassSerializable<T> & ClassTypeCheckable<T> & ITyped & T; | ||
export { SerializableType } | ||
export { SerializableType as SerializableType_alias_1 } | ||
/** | ||
* A function that can serialize a certain type of data | ||
* Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type. | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
* @remarks Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required. | ||
* @category Object | ||
*/ | ||
declare type SerializationFunct<TData = any, TJsonValue extends JsonValue = JsonValue> = (data: TData) => TJsonValue; | ||
export { SerializationFunct } | ||
export { SerializationFunct as SerializationFunct_alias_1 } | ||
declare type SetRequired<BaseType, Keys extends keyof BaseType> = BaseType extends unknown ? Simplify<Except<BaseType, Keys> & Required<Pick<BaseType, Keys>>> : never; | ||
export { SetRequired } | ||
export { SetRequired as SetRequired_alias_1 } | ||
declare type SerializationMetadata<T> = DataTransformer<T> & ClassTypeCheckable<T>; | ||
export { SerializationMetadata } | ||
export { SerializationMetadata as SerializationMetadata_alias_1 } | ||
declare const sha256: (value: string) => Promise<string>; | ||
export { sha256 } | ||
export { sha256 as sha256_alias_1 } | ||
export { sha256 as sha256_alias_2 } | ||
/** | ||
* Serialize the given value with superjson | ||
* Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability. | ||
* | ||
* @remarks Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface. | ||
* @remarks If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`. | ||
* @link https://github.com/microsoft/TypeScript/issues/15300 | ||
* @category Object | ||
*/ | ||
declare function serialize(object: JsonValue): JsonParserResult; | ||
export { serialize } | ||
export { serialize as serialize_alias_1 } | ||
declare type Simplify<T> = { | ||
[KeyType in keyof T]: T[KeyType]; | ||
} & {}; | ||
export { Simplify } | ||
export { Simplify as Simplify_alias_1 } | ||
declare type SimpleTypeAnnotation = LeafTypeAnnotation | "map" | "set"; | ||
export { SimpleTypeAnnotation } | ||
export { SimpleTypeAnnotation as SimpleTypeAnnotation_alias_1 } | ||
/** | ||
* Stringify the given value with superjson | ||
* Convert the input string to snake case. | ||
* | ||
* @remarks | ||
* "this_is_an_example" | ||
* | ||
* @param input - The input string. | ||
* @param options - Options to control the behavior of the function. | ||
* @returns The snake-cased string. | ||
*/ | ||
declare function stringify(json: any): string; | ||
export { stringify } | ||
export { stringify as stringify_alias_1 } | ||
declare const snakeCase: (input?: string, options?: { | ||
splitOnNumber: boolean; | ||
}) => string | undefined; | ||
export { snakeCase } | ||
export { snakeCase as snakeCase_alias_1 } | ||
export { snakeCase as snakeCase_alias_2 } | ||
/** | ||
* Stringify the given value with qs | ||
* Convert the input string to title case. | ||
* | ||
* @remarks | ||
* "This Is An Example" | ||
* | ||
* @param input - The input string. | ||
* @returns The title cased string. | ||
*/ | ||
declare function stringifyQueryParam(json: JsonValue, options?: { | ||
delimiter?: string | undefined; | ||
strictNullHandling?: boolean | undefined; | ||
skipNulls?: boolean | undefined; | ||
encode?: boolean | undefined; | ||
filter?: Array<string | number> | ((prefix: string, value: any) => any) | undefined; | ||
arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined; | ||
indices?: boolean | undefined; | ||
sort?: ((a: any, b: any) => number) | undefined; | ||
serializeDate?: ((d: Date) => string) | undefined; | ||
format?: "RFC1738" | "RFC3986" | undefined; | ||
encodeValuesOnly?: boolean | undefined; | ||
addQueryPrefix?: boolean | undefined; | ||
charset?: "utf-8" | "iso-8859-1" | undefined; | ||
allowDots?: boolean | undefined; | ||
charsetSentinel?: boolean | undefined; | ||
}): string; | ||
export { stringifyQueryParam } | ||
export { stringifyQueryParam as stringifyQueryParam_alias_1 } | ||
declare const titleCase: (input?: string) => string | undefined; | ||
export { titleCase } | ||
export { titleCase as titleCase_alias_1 } | ||
export { titleCase as titleCase_alias_2 } | ||
declare type SymbolTypeAnnotation = ["symbol", string]; | ||
export { SymbolTypeAnnotation } | ||
export { SymbolTypeAnnotation as SymbolTypeAnnotation_alias_1 } | ||
declare const TYPE_ARGUMENTS = "Arguments"; | ||
export { TYPE_ARGUMENTS } | ||
export { TYPE_ARGUMENTS as TYPE_ARGUMENTS_alias_1 } | ||
declare type Tree<T> = InnerNode<T> | Leaf<T>; | ||
export { Tree } | ||
export { Tree as Tree_alias_1 } | ||
declare const TYPE_ARRAY = "Array"; | ||
export { TYPE_ARRAY } | ||
export { TYPE_ARRAY as TYPE_ARRAY_alias_1 } | ||
declare type TypeAnnotation = SimpleTypeAnnotation | CompositeTypeAnnotation; | ||
export { TypeAnnotation } | ||
export { TypeAnnotation as TypeAnnotation_alias_1 } | ||
declare const TYPE_MAP = "Map"; | ||
export { TYPE_MAP } | ||
export { TYPE_MAP as TYPE_MAP_alias_1 } | ||
declare type TypedArrayAnnotation = ["typed-array", string]; | ||
export { TypedArrayAnnotation } | ||
export { TypedArrayAnnotation as TypedArrayAnnotation_alias_1 } | ||
declare const TYPE_OBJECT = "Object"; | ||
export { TYPE_OBJECT } | ||
export { TYPE_OBJECT as TYPE_OBJECT_alias_1 } | ||
declare const TYPE_SET = "Set"; | ||
export { TYPE_SET } | ||
export { TYPE_SET as TYPE_SET_alias_1 } | ||
declare function typeDetect(obj: unknown): string; | ||
export { typeDetect } | ||
export { typeDetect as typeDetect_alias_1 } | ||
export { typeDetect as typeDetect_alias_2 } | ||
/** | ||
* Upper case the first character of an input string. | ||
* | ||
* @remarks | ||
* "Thisisanexample" | ||
* | ||
* @param input - The input string. | ||
* @returns The capitalized string. | ||
*/ | ||
declare const upperCaseFirst: (input?: string) => string | undefined; | ||
export { upperCaseFirst } | ||
export { upperCaseFirst as upperCaseFirst_alias_1 } | ||
export { upperCaseFirst as upperCaseFirst_alias_2 } | ||
export { } |
@@ -1,35 +0,37 @@ | ||
declare type Class = { | ||
new (...args: any[]): any; | ||
}; | ||
export { Class } | ||
export { Class as Class_alias_1 } | ||
declare const $NestedValue: unique symbol; | ||
export { $NestedValue } | ||
export { $NestedValue as $NestedValue_alias_1 } | ||
declare type ClassInstance = any; | ||
export { ClassInstance } | ||
export { ClassInstance as ClassInstance_alias_1 } | ||
declare interface Abstract<T> { | ||
prototype: T; | ||
} | ||
export { Abstract } | ||
export { Abstract as Abstract_alias_1 } | ||
declare type AnyCase<T extends IndexType> = string extends T ? string : T extends `${infer F1}${infer F2}${infer R}` ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}` : T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}` : typeof EMPTY_STRING; | ||
export { AnyCase } | ||
export { AnyCase as AnyCase_alias_1 } | ||
declare type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never; | ||
export { ArrayElement } | ||
export { ArrayElement as ArrayElement_alias_1 } | ||
declare type BrowserNativeObject = Date | FileList | File; | ||
export { BrowserNativeObject } | ||
export { BrowserNativeObject as BrowserNativeObject_alias_1 } | ||
/** | ||
* A class that can be serialized and deserialized | ||
* Convert the input string to camel case. | ||
* | ||
* @remarks | ||
* "thisIsAnExample" | ||
* | ||
* @param input - The input string. | ||
* @returns The camel-cased string. | ||
*/ | ||
declare interface ClassSerializable<TData, TJsonValue extends JsonValue = JsonValue> { | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @returns The data object to serialize | ||
*/ | ||
serialize: () => TJsonValue; | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
*/ | ||
deserialize: (json: TJsonValue) => void; | ||
} | ||
export { ClassSerializable } | ||
export { ClassSerializable as ClassSerializable_alias_1 } | ||
declare const camelCase: (input?: string) => string | undefined; | ||
export { camelCase } | ||
export { camelCase as camelCase_alias_1 } | ||
export { camelCase as camelCase_alias_2 } | ||
declare type ClassTypeAnnotation = ["class", string]; | ||
export { ClassTypeAnnotation } | ||
export { ClassTypeAnnotation as ClassTypeAnnotation_alias_1 } | ||
declare interface ClassTypeCheckable<T> extends ITyped { | ||
@@ -43,64 +45,675 @@ /** | ||
} | ||
export { ClassTypeCheckable } | ||
export { ClassTypeCheckable as ClassTypeCheckable_alias_1 } | ||
declare type CompositeTypeAnnotation = TypedArrayAnnotation | ClassTypeAnnotation | SymbolTypeAnnotation | CustomTypeAnnotation; | ||
export { CompositeTypeAnnotation } | ||
export { CompositeTypeAnnotation as CompositeTypeAnnotation_alias_1 } | ||
declare interface Clonable<T> { | ||
clone(): T; | ||
} | ||
export { Clonable } | ||
export { Clonable as Clonable_alias_1 } | ||
declare type CustomTypeAnnotation = ["custom", string]; | ||
export { CustomTypeAnnotation } | ||
export { CustomTypeAnnotation as CustomTypeAnnotation_alias_1 } | ||
declare type Collection = IArguments | Array<unknown> | Map<unknown, unknown> | Record<string | number | symbol, unknown> | Set<unknown>; | ||
export { Collection } | ||
export { Collection as Collection_alias_1 } | ||
/** | ||
* A class that can be serialized and deserialized | ||
* Convert the input string to constant case. | ||
* | ||
* @remarks | ||
* "THIS_IS_AN_EXAMPLE" | ||
* | ||
* @param input - The input string. | ||
* @returns The constant-cased string. | ||
*/ | ||
declare interface DataTransformer<TData, TJsonValue extends JsonValue = JsonValue> { | ||
declare const constantCase: (input?: string) => string | undefined; | ||
export { constantCase } | ||
export { constantCase as constantCase_alias_1 } | ||
export { constantCase as constantCase_alias_2 } | ||
/** | ||
* copy value with customizer function | ||
* | ||
* @private | ||
* @param value | ||
* @param type | ||
*/ | ||
declare function copy(value: unknown, valueType: string, customizer?: ((value: unknown, type: string) => unknown) | null): unknown; | ||
export { copy } | ||
export { copy as copy_alias_1 } | ||
export { copy as copy_alias_2 } | ||
declare const Crypto_2: Crypto | undefined; | ||
export { Crypto_2 as Crypto } | ||
export { Crypto_2 as Crypto_alias_1 } | ||
export { Crypto_2 as Crypto_alias_2 } | ||
/** | ||
* Deep copy an object/array/value | ||
* | ||
* @param value - The value to copy | ||
* @param options - The options | ||
*/ | ||
declare function deepCopy<T>(value: T, options?: { | ||
customizer?: (value: unknown, type: string) => unknown; | ||
}): T; | ||
export { deepCopy } | ||
export { deepCopy as deepCopy_alias_1 } | ||
export { deepCopy as deepCopy_alias_2 } | ||
/** | ||
* Deep merge two objects | ||
* | ||
* @param target - The target object | ||
* @param source - The source object | ||
* @param options - The options object | ||
* @returns The merged object | ||
*/ | ||
declare const deepMerge: { | ||
<X = any, Y = any, Z = X & Y>(target: X, source: Y, options?: any): Z; | ||
all(array: Array<any>, options?: any): any; | ||
}; | ||
export { deepMerge } | ||
export { deepMerge as deepMerge_alias_1 } | ||
export { deepMerge as deepMerge_alias_2 } | ||
declare type DeepPartial<T> = T extends BrowserNativeObject | NestedValue ? T : { | ||
[K in keyof T]?: DeepPartial<T[K]>; | ||
}; | ||
export { DeepPartial } | ||
export { DeepPartial as DeepPartial_alias_1 } | ||
declare const EMPTY_OBJECT: {}; | ||
export { EMPTY_OBJECT } | ||
export { EMPTY_OBJECT as EMPTY_OBJECT_alias_1 } | ||
declare const EMPTY_STRING: ""; | ||
export { EMPTY_STRING } | ||
export { EMPTY_STRING as EMPTY_STRING_alias_1 } | ||
declare type EmptyObject = { | ||
[K in string | number]: never; | ||
}; | ||
export { EmptyObject } | ||
export { EmptyObject as EmptyObject_alias_1 } | ||
/** | ||
* Create a type from an object type without certain keys. | ||
* | ||
* @remarks We recommend setting the `requireExactProps` option to `true`. | ||
* @remarks This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically. | ||
* @remarks This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)). | ||
* @category Object | ||
*/ | ||
declare type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = { | ||
requireExactProps: false; | ||
}> = { | ||
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; | ||
} & (Options["requireExactProps"] extends true ? Partial<Record<KeysType, never>> : {}); | ||
export { Except } | ||
export { Except as Except_alias_1 } | ||
declare type ExceptOptions = { | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
Disallow assigning non-specified properties. | ||
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`. | ||
@default false | ||
*/ | ||
serialize: SerializationFunct<TData, TJsonValue>; | ||
requireExactProps?: boolean; | ||
}; | ||
declare type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : KeyType extends ExcludeType ? never : KeyType; | ||
export { Filter } | ||
export { Filter as Filter_alias_1 } | ||
/** | ||
* Flatten an object. | ||
* | ||
* @param obj - The object to flatten. | ||
* @param prefix - The prefix to use. | ||
* @param keyStringFn - The function to use to convert the key to a string. | ||
* @returns The flattened object. | ||
*/ | ||
declare const flattenObject: (obj: any, prefix?: string, keyStringFn?: (input?: string) => string | undefined) => any; | ||
export { flattenObject } | ||
export { flattenObject as flattenObject_alias_1 } | ||
export { flattenObject as flattenObject_alias_2 } | ||
/** | ||
* Gets the `toStringTag` of `obj`. | ||
* | ||
* @param value The obj to query. | ||
* @returns Returns the `toStringTag`. | ||
*/ | ||
declare const getObjectTag: (value: unknown) => string; | ||
export { getObjectTag } | ||
export { getObjectTag as getObjectTag_alias_1 } | ||
export { getObjectTag as getObjectTag_alias_2 } | ||
/** | ||
* Get the WebCrypto object | ||
* | ||
* @remarks | ||
* This helper function is used to get the WebCrypto object. If the object is not available, an error will be thrown. | ||
* | ||
* @returns The WebCrypto object | ||
*/ | ||
declare const getWebCrypto: () => Crypto; | ||
export { getWebCrypto } | ||
export { getWebCrypto as getWebCrypto_alias_1 } | ||
export { getWebCrypto as getWebCrypto_alias_2 } | ||
declare interface IIdentity<T = string> { | ||
id: T; | ||
} | ||
export { IIdentity } | ||
export { IIdentity as IIdentity_alias_1 } | ||
/** | ||
* The declaration of a ***dictionary-type*** object | ||
*/ | ||
declare type Indexable = { | ||
[index: IndexType]: any; | ||
}; | ||
export { Indexable } | ||
export { Indexable as Indexable_alias_1 } | ||
/** | ||
* The valid types of the index for an `Indexable` type object | ||
*/ | ||
declare type IndexType = string | number | symbol; | ||
export { IndexType } | ||
export { IndexType as IndexType_alias_1 } | ||
/** | ||
* Check if the provided value's type is "array-like" | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is "array-like" | ||
*/ | ||
declare const isArrayLike: (value: any) => boolean; | ||
export { isArrayLike } | ||
export { isArrayLike as isArrayLike_alias_1 } | ||
export { isArrayLike as isArrayLike_alias_2 } | ||
/** | ||
* Check if the provided value's type is `AsyncIterable` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is `AsyncIterable` | ||
*/ | ||
declare const isAsyncIterable: (value: unknown) => value is AsyncIterable<unknown>; | ||
export { isAsyncIterable } | ||
export { isAsyncIterable as isAsyncIterable_alias_1 } | ||
export { isAsyncIterable as isAsyncIterable_alias_2 } | ||
/** | ||
* Checks if `value` is classified as a `bigint` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isDate(37n) | ||
* // => true | ||
* | ||
* isBigInt(37) | ||
* // => false | ||
* ``` | ||
* | ||
* @param value The obj to check. | ||
* @returns Returns `true` if `value` is a bigint object, else `false`. | ||
*/ | ||
declare const isBigInt: (value: unknown) => value is bigint; | ||
export { isBigInt } | ||
export { isBigInt as isBigInt_alias_1 } | ||
export { isBigInt as isBigInt_alias_2 } | ||
/** | ||
* Check if the provided value's type is `boolean` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `boolean` | ||
*/ | ||
declare const isBoolean: (value: unknown) => value is boolean; | ||
export { isBoolean } | ||
export { isBoolean as isBoolean_alias_1 } | ||
export { isBoolean as isBoolean_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Buffer` | ||
*/ | ||
declare const isBuffer: typeof Buffer.isBuffer; | ||
export { isBuffer } | ||
export { isBuffer as isBuffer_alias_1 } | ||
export { isBuffer as isBuffer_alias_2 } | ||
declare const isBufferExists: boolean; | ||
export { isBufferExists } | ||
export { isBufferExists as isBufferExists_alias_1 } | ||
export { isBufferExists as isBufferExists_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Collection` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Collection` | ||
*/ | ||
declare function isCollection(value: any): value is Collection; | ||
export { isCollection } | ||
export { isCollection as isCollection_alias_1 } | ||
export { isCollection as isCollection_alias_2 } | ||
/** | ||
* Checks if `value` is classified as a `Date` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isDate(new Date) | ||
* // => true | ||
* | ||
* isDate('Mon April 23 2012') | ||
* // => false | ||
* ``` | ||
* | ||
* @param value - The value to check. | ||
* @returns Returns `true` if `obj` is a date object, else `false`. | ||
*/ | ||
declare const isDate: (value: unknown) => value is Date; | ||
export { isDate } | ||
export { isDate as isDate_alias_1 } | ||
export { isDate as isDate_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` or `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` or `undefined` | ||
*/ | ||
declare const isEmpty: (value: unknown) => boolean; | ||
export { isEmpty } | ||
export { isEmpty as isEmpty_alias_1 } | ||
export { isEmpty as isEmpty_alias_2 } | ||
/** | ||
* Check if the provided value's type is `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `{}` | ||
*/ | ||
declare const isEmptyObject: (value: unknown) => value is {}; | ||
export { isEmptyObject } | ||
export { isEmptyObject as isEmptyObject_alias_1 } | ||
export { isEmptyObject as isEmptyObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` or `undefined` or `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` or `undefined` or `{}` | ||
*/ | ||
declare const isEmptyOrEmptyObject: (value: unknown) => boolean; | ||
export { isEmptyOrEmptyObject } | ||
export { isEmptyOrEmptyObject as isEmptyOrEmptyObject_alias_1 } | ||
export { isEmptyOrEmptyObject as isEmptyOrEmptyObject_alias_2 } | ||
/** | ||
* Determine if the type is string and is empty | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `""` | ||
*/ | ||
declare const isEmptyString: (value: unknown) => value is string; | ||
export { isEmptyString } | ||
export { isEmptyString as isEmptyString_alias_1 } | ||
export { isEmptyString as isEmptyString_alias_2 } | ||
/** | ||
* Returns a boolean for whether the two given types are equal. | ||
* | ||
* @remarks Use-cases: If you want to make a conditional branch based on the result of a comparison of two types. | ||
* @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650 | ||
* @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796 | ||
* @category Type Guard | ||
* @category Utilities | ||
*/ | ||
declare type IsEqual<A, B> = (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B ? 1 : 2 ? true : false; | ||
export { IsEqual } | ||
export { IsEqual as IsEqual_alias_1 } | ||
declare interface ISequenced { | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* The sequence number (version, or event counter, etc.) of the record | ||
*/ | ||
deserialize: DeserializeFunct<TData, TJsonValue>; | ||
sequence: number; | ||
} | ||
export { DataTransformer } | ||
export { DataTransformer as DataTransformer_alias_1 } | ||
export { ISequenced } | ||
export { ISequenced as ISequenced_alias_1 } | ||
/** | ||
* Deserialize the given value with superjson using the given metadata | ||
* Checks if `obj` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, | ||
* `SyntaxError`, `TypeError`, or `URIError` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isError(new Error) | ||
* // => true | ||
* | ||
* isError(Error) | ||
* // => false | ||
* ``` | ||
* | ||
* @param obj - The obj to check. | ||
* @returns Returns `true` if `obj` is an error object, else `false`. | ||
*/ | ||
declare function deserialize<TData = unknown>(payload: JsonParserResult): TData; | ||
export { deserialize } | ||
export { deserialize as deserialize_alias_1 } | ||
declare const isError: (obj: unknown) => obj is Error; | ||
export { isError } | ||
export { isError as isError_alias_1 } | ||
export { isError as isError_alias_2 } | ||
/** | ||
* A function that can deserialize a certain type of data | ||
* Check if the provided value's type is a float | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` and is a float | ||
*/ | ||
declare type DeserializeFunct<TData = any, TJsonValue extends JsonValue = JsonValue> = (json: TJsonValue) => TData; | ||
export { DeserializeFunct } | ||
export { DeserializeFunct as DeserializeFunct_alias_1 } | ||
declare const isFloat: (value: any) => value is number; | ||
export { isFloat } | ||
export { isFloat as isFloat_alias_1 } | ||
export { isFloat as isFloat_alias_2 } | ||
declare interface IJsonParser { | ||
parse: <TData = any>(strData: string) => TData; | ||
stringify: <TData = any>(data: TData) => string; | ||
serialize: (object: JsonValue) => JsonParserResult; | ||
deserialize: <TData = any>(payload: JsonParserResult) => TData; | ||
register: <TData = any, TJsonValue extends JsonValue = JsonValue>(name: string, serialize: (object: JsonValue) => TJsonValue, deserialize: (payload: TJsonValue) => TData, isApplicable: (data: any) => data is TData) => void; | ||
} | ||
export { IJsonParser } | ||
export { IJsonParser as IJsonParser_alias_1 } | ||
/** | ||
* Check if the provided value's type is `Function` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Function` | ||
*/ | ||
declare const isFunction: (value: unknown) => value is ((params?: unknown) => unknown) & Function; | ||
export { isFunction } | ||
export { isFunction as isFunction_alias_1 } | ||
export { isFunction as isFunction_alias_2 } | ||
declare type InnerNode<T> = [T, Record<string, Tree<T>>]; | ||
export { InnerNode } | ||
export { InnerNode as InnerNode_alias_1 } | ||
/** | ||
* Check if the provided value's type is an integer | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` and is an integer | ||
*/ | ||
declare const isInt: (value: any) => value is number; | ||
export { isInt } | ||
export { isInt as isInt_alias_1 } | ||
export { isInt as isInt_alias_2 } | ||
declare const isMergeableObject: (value: any) => boolean; | ||
export { isMergeableObject } | ||
export { isMergeableObject as isMergeableObject_alias_1 } | ||
export { isMergeableObject as isMergeableObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Object` and is not `null` or `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined` | ||
*/ | ||
export declare const isNonNullObject: (value: any) => value is object; | ||
/** | ||
* The inverse of the `isEmptyObject` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined` or `{}` | ||
*/ | ||
declare const isNotEmpty: (value: unknown) => value is {}; | ||
export { isNotEmpty } | ||
export { isNotEmpty as isNotEmpty_alias_1 } | ||
export { isNotEmpty as isNotEmpty_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` | ||
*/ | ||
declare const isNull: (value: unknown) => value is null; | ||
export { isNull } | ||
export { isNull as isNull_alias_1 } | ||
export { isNull as isNull_alias_2 } | ||
/** | ||
* Check if the provided value's type is `number` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` | ||
*/ | ||
declare const isNumber: (value: unknown) => value is number; | ||
export { isNumber } | ||
export { isNumber as isNumber_alias_1 } | ||
export { isNumber as isNumber_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Object` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Object` | ||
*/ | ||
declare const isObject: (value: unknown) => value is object; | ||
export { isObject } | ||
export { isObject as isObject_alias_1 } | ||
export { isObject as isObject_alias_2 } | ||
/** | ||
* Checks if `value` is object-like. A value is object-like if it's not `null` | ||
* and has a `typeof` result of "object". | ||
* | ||
* @example | ||
* ```typescript | ||
* isObjectLike({}) | ||
* // => true | ||
* | ||
* isObjectLike([1, 2, 3]) | ||
* // => true | ||
* | ||
* isObjectLike(Function) | ||
* // => false | ||
* | ||
* isObjectLike(null) | ||
* // => false | ||
* ``` | ||
* | ||
* @param value - The value to check. | ||
* @returns Returns `true` if `value` is object-like, else `false`. | ||
*/ | ||
declare const isObjectLike: (obj: unknown) => boolean; | ||
export { isObjectLike } | ||
export { isObjectLike as isObjectLike_alias_1 } | ||
export { isObjectLike as isObjectLike_alias_2 } | ||
/** | ||
* Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. | ||
* | ||
* @example | ||
* ```typescript | ||
* function Foo() { | ||
* this.a = 1 | ||
* } | ||
* | ||
* isPlainObject(new Foo) | ||
* // => false | ||
* | ||
* isPlainObject([1, 2, 3]) | ||
* // => false | ||
* | ||
* isPlainObject({ 'x': 0, 'y': 0 }) | ||
* // => true | ||
* | ||
* isPlainObject(Object.create(null)) | ||
* // => true | ||
* ``` | ||
* | ||
* @param obj The value to check. | ||
* @returns Returns `true` if `obj` is a plain object, else `false`. | ||
*/ | ||
declare const isPlainObject: (obj: unknown) => boolean; | ||
export { isPlainObject } | ||
export { isPlainObject as isPlainObject_alias_1 } | ||
export { isPlainObject as isPlainObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is a built-in primitive | ||
* | ||
* @remarks | ||
* The full list of primitive types includes: | ||
* * `number` | ||
* * `string` | ||
* * `boolean` | ||
* * `symbol` | ||
* * `bigint` | ||
* * `undefined` | ||
* * `null` | ||
* | ||
* @param obj - The value to type check | ||
* @returns An indicator specifying if the value provided is a built-in primitive | ||
*/ | ||
declare const isPrimitive: (value: unknown) => boolean; | ||
export { isPrimitive } | ||
export { isPrimitive as isPrimitive_alias_1 } | ||
export { isPrimitive as isPrimitive_alias_2 } | ||
/** | ||
* Check if the provided value's type is a promise | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type a promise | ||
*/ | ||
declare const isPromise: (value: unknown) => value is Promise<unknown>; | ||
export { isPromise } | ||
export { isPromise as isPromise_alias_1 } | ||
export { isPromise as isPromise_alias_2 } | ||
/** | ||
* Check if the provided value is a {@link https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 React Element}. | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type {@link https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 React Element} | ||
*/ | ||
declare const isReactElement: (value: any) => boolean; | ||
export { isReactElement } | ||
export { isReactElement as isReactElement_alias_1 } | ||
export { isReactElement as isReactElement_alias_2 } | ||
/** | ||
* Check if the provided value's type is a ref | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type ref | ||
*/ | ||
declare const isRef: <TRef = unknown>(value: unknown) => value is RefObject<TRef>; | ||
export { isRef } | ||
export { isRef as isRef_alias_1 } | ||
export { isRef as isRef_alias_2 } | ||
/** | ||
* The function checks if the code is running in | ||
* the browser (and not on the server). | ||
*/ | ||
declare const isRuntimeClient: () => boolean; | ||
export { isRuntimeClient } | ||
export { isRuntimeClient as isRuntimeClient_alias_1 } | ||
export { isRuntimeClient as isRuntimeClient_alias_2 } | ||
/** | ||
* The function checks if the code is running on | ||
* the server (and not in the browser). | ||
*/ | ||
declare const isRuntimeServer: () => boolean; | ||
export { isRuntimeServer } | ||
export { isRuntimeServer as isRuntimeServer_alias_1 } | ||
export { isRuntimeServer as isRuntimeServer_alias_2 } | ||
/** | ||
* Check if the provided value's type is SelectOption | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type SelectOption | ||
*/ | ||
declare const isSelectOption: (value: unknown) => value is SelectOption; | ||
export { isSelectOption } | ||
export { isSelectOption as isSelectOption_alias_1 } | ||
export { isSelectOption as isSelectOption_alias_2 } | ||
/** | ||
* The inverse of the `isEmpty` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined` | ||
*/ | ||
declare const isSet: (value: unknown) => value is {}; | ||
export { isSet } | ||
export { isSet as isSet_alias_1 } | ||
export { isSet as isSet_alias_2 } | ||
/** | ||
* Check if the provided value's type is NOT `null` nor `undefined` nor `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is NOT `null` nor `undefined` nor `{}` | ||
*/ | ||
declare const isSetObject: (value: unknown) => value is object; | ||
export { isSetObject } | ||
export { isSetObject as isSetObject_alias_1 } | ||
export { isSetObject as isSetObject_alias_2 } | ||
/** | ||
* Determine if the type is string and is not empty (length greater than zero) | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `string` and length greater than zero | ||
*/ | ||
declare const isSetString: (value: unknown) => value is string; | ||
export { isSetString } | ||
export { isSetString as isSetString_alias_1 } | ||
export { isSetString as isSetString_alias_2 } | ||
/** | ||
* Determine if the type is string | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `string` | ||
*/ | ||
declare const isString: (value: unknown) => value is string; | ||
export { isString } | ||
export { isString as isString_alias_1 } | ||
export { isString as isString_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Symbol` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Symbol` | ||
*/ | ||
declare const isSymbol: (value: unknown) => value is symbol; | ||
export { isSymbol } | ||
export { isSymbol as isSymbol_alias_1 } | ||
export { isSymbol as isSymbol_alias_2 } | ||
/** | ||
* Check if the provided value has a `__typename` property | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided has a `__typename` property | ||
*/ | ||
declare const isTyped: (value: unknown) => value is ITyped; | ||
export { isTyped } | ||
export { isTyped as isTyped_alias_1 } | ||
export { isTyped as isTyped_alias_2 } | ||
/** | ||
* Check if the provided value's type is `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `undefined` | ||
*/ | ||
declare const isUndefined: (value: unknown) => boolean; | ||
export { isUndefined } | ||
export { isUndefined as isUndefined_alias_1 } | ||
export { isUndefined as isUndefined_alias_2 } | ||
declare interface ITyped { | ||
@@ -112,205 +725,286 @@ /** | ||
} | ||
export { ITyped } | ||
export { ITyped as ITyped_alias_1 } | ||
declare interface JsonArray extends Array<JsonValue> { | ||
declare interface IVersioned { | ||
version: number; | ||
} | ||
export { JsonArray } | ||
export { JsonArray as JsonArray_alias_1 } | ||
export { IVersioned } | ||
export { IVersioned as IVersioned_alias_1 } | ||
declare interface JsonObject { | ||
[key: string]: JsonValue; | ||
} | ||
export { JsonObject } | ||
export { JsonObject as JsonObject_alias_1 } | ||
/** | ||
* Convert the input string to kebab case. | ||
* | ||
* @remarks | ||
* "this-is-an-example" | ||
* | ||
* @param input - The input string. | ||
* @returns The kebab-cased string. | ||
*/ | ||
declare const kebabCase: (input?: string) => string | undefined; | ||
export { kebabCase } | ||
export { kebabCase as kebabCase_alias_1 } | ||
export { kebabCase as kebabCase_alias_2 } | ||
declare interface JsonParserResult { | ||
json: JsonValue; | ||
meta?: { | ||
values?: Tree<TypeAnnotation> | Record<string, Tree<TypeAnnotation>> | undefined; | ||
referentialEqualities?: Record<string, string[]> | [string[]] | [string[], Record<string, string[]>]; | ||
}; | ||
} | ||
export { JsonParserResult } | ||
export { JsonParserResult as JsonParserResult_alias_1 } | ||
declare type LiteralUnion<T extends U, U extends Primitive> = T | (U & { | ||
_?: never; | ||
}); | ||
export { LiteralUnion } | ||
export { LiteralUnion as LiteralUnion_alias_1 } | ||
declare type JsonValue = PrimitiveJsonValue | JsonArray | JsonObject; | ||
export { JsonValue } | ||
export { JsonValue as JsonValue_alias_1 } | ||
/** | ||
* Lower case the first character of an input string. | ||
* | ||
* @remarks | ||
* "tHISISANEXAMPLE" | ||
* | ||
* @param input - The input string. | ||
* @returns The lower-cased string. | ||
*/ | ||
declare const lowerCaseFirst: (input?: string) => string | undefined; | ||
export { lowerCaseFirst } | ||
export { lowerCaseFirst as lowerCaseFirst_alias_1 } | ||
export { lowerCaseFirst as lowerCaseFirst_alias_2 } | ||
declare type Leaf<T> = [T]; | ||
export { Leaf } | ||
export { Leaf as Leaf_alias_1 } | ||
declare type MaybePromise<T> = T | Promise<T>; | ||
export { MaybePromise } | ||
export { MaybePromise as MaybePromise_alias_1 } | ||
declare type LeafTypeAnnotation = PrimitiveTypeAnnotation | "regexp" | "Date" | "Error" | "URL"; | ||
export { LeafTypeAnnotation } | ||
export { LeafTypeAnnotation as LeafTypeAnnotation_alias_1 } | ||
declare type NestedValue<TValue extends object = object> = { | ||
[$NestedValue]: never; | ||
} & TValue; | ||
export { NestedValue } | ||
export { NestedValue as NestedValue_alias_1 } | ||
declare type Newable<T> = new (...args: never[]) => T; | ||
export { Newable } | ||
export { Newable as Newable_alias_1 } | ||
declare const NEWLINE_STRING: "\r\n"; | ||
export { NEWLINE_STRING } | ||
export { NEWLINE_STRING as NEWLINE_STRING_alias_1 } | ||
declare type NonUndefined<T> = T extends undefined ? never : T; | ||
export { NonUndefined } | ||
export { NonUndefined as NonUndefined_alias_1 } | ||
/** | ||
* Parse the given value with superjson using the given metadata | ||
* A no op, or no-op, function for no operation | ||
* | ||
* @remarks Please see {@link https://dev.to/praneshpsg239/noop-in-javascript-478h this article} for more information. | ||
* | ||
* @param params - An optional parameter passed to the function. It can be anything (but is not used in any way) | ||
*/ | ||
declare function parse<TData = unknown>(strData: string): TData; | ||
export { parse } | ||
export { parse as parse_alias_1 } | ||
declare const noop: (params?: unknown) => void; | ||
export { noop } | ||
export { noop as noop_alias_1 } | ||
export { noop as noop_alias_2 } | ||
/** | ||
* Parse the given value with qs using the given metadata | ||
* Convert the input string to pascal case. | ||
* | ||
* @remarks | ||
* "ThisIsAnExample" | ||
* | ||
* @param input - The input string. | ||
* @returns The pascal-cased string. | ||
*/ | ||
declare function parseQueryParam<TData = unknown>(strData: string, options?: { | ||
comma?: boolean | undefined; | ||
delimiter?: string | RegExp | undefined; | ||
depth?: number | false | undefined; | ||
arrayLimit?: number | undefined; | ||
parseArrays?: boolean | undefined; | ||
allowDots?: boolean | undefined; | ||
plainObjects?: boolean | undefined; | ||
allowPrototypes?: boolean | undefined; | ||
parameterLimit?: number | undefined; | ||
strictNullHandling?: boolean | undefined; | ||
ignoreQueryPrefix?: boolean | undefined; | ||
charset?: "utf-8" | "iso-8859-1" | undefined; | ||
charsetSentinel?: boolean | undefined; | ||
interpretNumericEntities?: boolean | undefined; | ||
}): TData; | ||
export { parseQueryParam } | ||
export { parseQueryParam as parseQueryParam_alias_1 } | ||
declare const pascalCase: (input?: string) => string | undefined; | ||
export { pascalCase } | ||
export { pascalCase as pascalCase_alias_1 } | ||
export { pascalCase as pascalCase_alias_2 } | ||
declare type PrimitiveJsonValue = string | number | boolean | undefined | null; | ||
export { PrimitiveJsonValue } | ||
export { PrimitiveJsonValue as PrimitiveJsonValue_alias_1 } | ||
/** | ||
* Make all characters lowercase and add a period in between each word | ||
* | ||
* @remarks | ||
* "this.is.an.example" | ||
* | ||
* @param input - The input string. | ||
* @returns The period-split string. | ||
*/ | ||
declare const periodSplit: (input?: string) => string | undefined; | ||
export { periodSplit } | ||
export { periodSplit as periodSplit_alias_1 } | ||
export { periodSplit as periodSplit_alias_2 } | ||
declare type PrimitiveTypeAnnotation = "number" | "undefined" | "bigint"; | ||
export { PrimitiveTypeAnnotation } | ||
export { PrimitiveTypeAnnotation as PrimitiveTypeAnnotation_alias_1 } | ||
/** | ||
* Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive). | ||
* | ||
* @category Type | ||
*/ | ||
declare type Primitive = null | undefined | string | number | boolean | symbol | bigint; | ||
export { Primitive } | ||
export { Primitive as Primitive_alias_1 } | ||
declare function register<TData = any, TJsonObject extends JsonValue = JsonValue>(name: string, serialize: (data: TData) => TJsonObject, deserialize: (json: TJsonObject) => TData, isApplicable: (data: any) => data is TData): void; | ||
export { register } | ||
export { register as register_alias_1 } | ||
/** | ||
* Check if the provided object has the provided property | ||
* | ||
* @param object - The object to check | ||
* @param propertyKey - The property to check | ||
* @returns An indicator specifying if the object has the provided property | ||
*/ | ||
declare const propertyExists: (object: any, propertyKey: PropertyKey) => boolean; | ||
export { propertyExists } | ||
export { propertyExists as propertyExists_alias_1 } | ||
export { propertyExists as propertyExists_alias_2 } | ||
declare const Serializable: <TData = any>(options: { | ||
/** | ||
* Check if the provided object has the provided property and if it's safe to merge | ||
* | ||
* @param object - The object to check | ||
* @param propertyKey - The property to check | ||
* @returns An indicator specifying if the object has the provided property and if it's safe to merge | ||
*/ | ||
declare const propertyUnsafe: (object: any, propertyKey: PropertyKey) => boolean; | ||
export { propertyUnsafe } | ||
export { propertyUnsafe as propertyUnsafe_alias_1 } | ||
export { propertyUnsafe as propertyUnsafe_alias_2 } | ||
declare type ReducerFunction<TState, TAction> = (state: TState, action: TAction) => TState; | ||
export { ReducerFunction } | ||
export { ReducerFunction as ReducerFunction_alias_1 } | ||
declare interface RefObject<T> { | ||
current: T; | ||
} | ||
export { RefObject } | ||
export { RefObject as RefObject_alias_1 } | ||
/** | ||
* Extract all required keys from the given type. | ||
* | ||
* @remarks This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc... | ||
* @category Utilities | ||
*/ | ||
declare type RequiredKeysOf<BaseType extends object> = Exclude<{ | ||
[Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]> ? Key : never; | ||
}[keyof BaseType], undefined>; | ||
export { RequiredKeysOf } | ||
export { RequiredKeysOf as RequiredKeysOf_alias_1 } | ||
declare type Rollback = Record<string, (initialValue: any, currentValue: any) => any>; | ||
export { Rollback } | ||
export { Rollback as Rollback_alias_1 } | ||
declare interface SelectOption { | ||
/** | ||
* The type and/or name of the record | ||
* The string value to display in the field | ||
*/ | ||
name?: string | undefined; | ||
name: string; | ||
/** | ||
* Serialize the class to a JSON object or string | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
* The value stored behind the scenes when selected | ||
*/ | ||
serialize: SerializationFunct<TData>; | ||
value: string; | ||
/** | ||
* Deserialize the class from a JSON object or string | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* Is the option value valid for selection in the dropdown | ||
*/ | ||
deserialize: DeserializeFunct<TData>; | ||
}) => <TClass extends new (...args: any) => any = new (...args: any) => TData>(target: TClass) => { | ||
new (...args: any): { | ||
[x: string]: any; | ||
/** | ||
* The name of the class's type | ||
*/ | ||
__typename: string; | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @returns The data object to serialize | ||
*/ | ||
serialize: () => JsonValue; | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
*/ | ||
deserialize: (json: JsonValue) => void; | ||
/** | ||
* Run type check on the given value | ||
* @param value - The value to check | ||
* @returns True if the value is of the type of the class | ||
*/ | ||
isTypeOf(value: any): value is TData; | ||
}; | ||
} & TClass; | ||
export { Serializable } | ||
export { Serializable as Serializable_alias_1 } | ||
disabled: boolean; | ||
/** | ||
* Sets or retrieves whether the option in the list box is the default item. | ||
*/ | ||
selected: boolean; | ||
} | ||
export { SelectOption } | ||
export { SelectOption as SelectOption_alias_1 } | ||
declare type SerializableJsonValue = Symbol | Set<JsonValue> | Map<JsonValue, JsonValue> | undefined | bigint | Date | ClassInstance | RegExp; | ||
export { SerializableJsonValue } | ||
export { SerializableJsonValue as SerializableJsonValue_alias_1 } | ||
declare type SerializableType<T> = ClassSerializable<T> & ClassTypeCheckable<T> & ITyped & T; | ||
export { SerializableType } | ||
export { SerializableType as SerializableType_alias_1 } | ||
/** | ||
* A function that can serialize a certain type of data | ||
* Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type. | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
* @remarks Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required. | ||
* @category Object | ||
*/ | ||
declare type SerializationFunct<TData = any, TJsonValue extends JsonValue = JsonValue> = (data: TData) => TJsonValue; | ||
export { SerializationFunct } | ||
export { SerializationFunct as SerializationFunct_alias_1 } | ||
declare type SetRequired<BaseType, Keys extends keyof BaseType> = BaseType extends unknown ? Simplify<Except<BaseType, Keys> & Required<Pick<BaseType, Keys>>> : never; | ||
export { SetRequired } | ||
export { SetRequired as SetRequired_alias_1 } | ||
declare type SerializationMetadata<T> = DataTransformer<T> & ClassTypeCheckable<T>; | ||
export { SerializationMetadata } | ||
export { SerializationMetadata as SerializationMetadata_alias_1 } | ||
declare const sha256: (value: string) => Promise<string>; | ||
export { sha256 } | ||
export { sha256 as sha256_alias_1 } | ||
export { sha256 as sha256_alias_2 } | ||
/** | ||
* Serialize the given value with superjson | ||
* Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability. | ||
* | ||
* @remarks Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface. | ||
* @remarks If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`. | ||
* @link https://github.com/microsoft/TypeScript/issues/15300 | ||
* @category Object | ||
*/ | ||
declare function serialize(object: JsonValue): JsonParserResult; | ||
export { serialize } | ||
export { serialize as serialize_alias_1 } | ||
declare type Simplify<T> = { | ||
[KeyType in keyof T]: T[KeyType]; | ||
} & {}; | ||
export { Simplify } | ||
export { Simplify as Simplify_alias_1 } | ||
declare type SimpleTypeAnnotation = LeafTypeAnnotation | "map" | "set"; | ||
export { SimpleTypeAnnotation } | ||
export { SimpleTypeAnnotation as SimpleTypeAnnotation_alias_1 } | ||
/** | ||
* Stringify the given value with superjson | ||
* Convert the input string to snake case. | ||
* | ||
* @remarks | ||
* "this_is_an_example" | ||
* | ||
* @param input - The input string. | ||
* @param options - Options to control the behavior of the function. | ||
* @returns The snake-cased string. | ||
*/ | ||
declare function stringify(json: any): string; | ||
export { stringify } | ||
export { stringify as stringify_alias_1 } | ||
declare const snakeCase: (input?: string, options?: { | ||
splitOnNumber: boolean; | ||
}) => string | undefined; | ||
export { snakeCase } | ||
export { snakeCase as snakeCase_alias_1 } | ||
export { snakeCase as snakeCase_alias_2 } | ||
/** | ||
* Stringify the given value with qs | ||
* Convert the input string to title case. | ||
* | ||
* @remarks | ||
* "This Is An Example" | ||
* | ||
* @param input - The input string. | ||
* @returns The title cased string. | ||
*/ | ||
declare function stringifyQueryParam(json: JsonValue, options?: { | ||
delimiter?: string | undefined; | ||
strictNullHandling?: boolean | undefined; | ||
skipNulls?: boolean | undefined; | ||
encode?: boolean | undefined; | ||
filter?: Array<string | number> | ((prefix: string, value: any) => any) | undefined; | ||
arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined; | ||
indices?: boolean | undefined; | ||
sort?: ((a: any, b: any) => number) | undefined; | ||
serializeDate?: ((d: Date) => string) | undefined; | ||
format?: "RFC1738" | "RFC3986" | undefined; | ||
encodeValuesOnly?: boolean | undefined; | ||
addQueryPrefix?: boolean | undefined; | ||
charset?: "utf-8" | "iso-8859-1" | undefined; | ||
allowDots?: boolean | undefined; | ||
charsetSentinel?: boolean | undefined; | ||
}): string; | ||
export { stringifyQueryParam } | ||
export { stringifyQueryParam as stringifyQueryParam_alias_1 } | ||
declare const titleCase: (input?: string) => string | undefined; | ||
export { titleCase } | ||
export { titleCase as titleCase_alias_1 } | ||
export { titleCase as titleCase_alias_2 } | ||
declare type SymbolTypeAnnotation = ["symbol", string]; | ||
export { SymbolTypeAnnotation } | ||
export { SymbolTypeAnnotation as SymbolTypeAnnotation_alias_1 } | ||
declare const TYPE_ARGUMENTS = "Arguments"; | ||
export { TYPE_ARGUMENTS } | ||
export { TYPE_ARGUMENTS as TYPE_ARGUMENTS_alias_1 } | ||
declare type Tree<T> = InnerNode<T> | Leaf<T>; | ||
export { Tree } | ||
export { Tree as Tree_alias_1 } | ||
declare const TYPE_ARRAY = "Array"; | ||
export { TYPE_ARRAY } | ||
export { TYPE_ARRAY as TYPE_ARRAY_alias_1 } | ||
declare type TypeAnnotation = SimpleTypeAnnotation | CompositeTypeAnnotation; | ||
export { TypeAnnotation } | ||
export { TypeAnnotation as TypeAnnotation_alias_1 } | ||
declare const TYPE_MAP = "Map"; | ||
export { TYPE_MAP } | ||
export { TYPE_MAP as TYPE_MAP_alias_1 } | ||
declare type TypedArrayAnnotation = ["typed-array", string]; | ||
export { TypedArrayAnnotation } | ||
export { TypedArrayAnnotation as TypedArrayAnnotation_alias_1 } | ||
declare const TYPE_OBJECT = "Object"; | ||
export { TYPE_OBJECT } | ||
export { TYPE_OBJECT as TYPE_OBJECT_alias_1 } | ||
declare const TYPE_SET = "Set"; | ||
export { TYPE_SET } | ||
export { TYPE_SET as TYPE_SET_alias_1 } | ||
declare function typeDetect(obj: unknown): string; | ||
export { typeDetect } | ||
export { typeDetect as typeDetect_alias_1 } | ||
export { typeDetect as typeDetect_alias_2 } | ||
/** | ||
* Upper case the first character of an input string. | ||
* | ||
* @remarks | ||
* "Thisisanexample" | ||
* | ||
* @param input - The input string. | ||
* @returns The capitalized string. | ||
*/ | ||
declare const upperCaseFirst: (input?: string) => string | undefined; | ||
export { upperCaseFirst } | ||
export { upperCaseFirst as upperCaseFirst_alias_1 } | ||
export { upperCaseFirst as upperCaseFirst_alias_2 } | ||
export { } |
@@ -1,35 +0,37 @@ | ||
declare type Class = { | ||
new (...args: any[]): any; | ||
}; | ||
export { Class } | ||
export { Class as Class_alias_1 } | ||
declare const $NestedValue: unique symbol; | ||
export { $NestedValue } | ||
export { $NestedValue as $NestedValue_alias_1 } | ||
declare type ClassInstance = any; | ||
export { ClassInstance } | ||
export { ClassInstance as ClassInstance_alias_1 } | ||
declare interface Abstract<T> { | ||
prototype: T; | ||
} | ||
export { Abstract } | ||
export { Abstract as Abstract_alias_1 } | ||
declare type AnyCase<T extends IndexType> = string extends T ? string : T extends `${infer F1}${infer F2}${infer R}` ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}` : T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}` : typeof EMPTY_STRING; | ||
export { AnyCase } | ||
export { AnyCase as AnyCase_alias_1 } | ||
declare type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never; | ||
export { ArrayElement } | ||
export { ArrayElement as ArrayElement_alias_1 } | ||
declare type BrowserNativeObject = Date | FileList | File; | ||
export { BrowserNativeObject } | ||
export { BrowserNativeObject as BrowserNativeObject_alias_1 } | ||
/** | ||
* A class that can be serialized and deserialized | ||
* Convert the input string to camel case. | ||
* | ||
* @remarks | ||
* "thisIsAnExample" | ||
* | ||
* @param input - The input string. | ||
* @returns The camel-cased string. | ||
*/ | ||
declare interface ClassSerializable<TData, TJsonValue extends JsonValue = JsonValue> { | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @returns The data object to serialize | ||
*/ | ||
serialize: () => TJsonValue; | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
*/ | ||
deserialize: (json: TJsonValue) => void; | ||
} | ||
export { ClassSerializable } | ||
export { ClassSerializable as ClassSerializable_alias_1 } | ||
declare const camelCase: (input?: string) => string | undefined; | ||
export { camelCase } | ||
export { camelCase as camelCase_alias_1 } | ||
export { camelCase as camelCase_alias_2 } | ||
declare type ClassTypeAnnotation = ["class", string]; | ||
export { ClassTypeAnnotation } | ||
export { ClassTypeAnnotation as ClassTypeAnnotation_alias_1 } | ||
declare interface ClassTypeCheckable<T> extends ITyped { | ||
@@ -43,64 +45,675 @@ /** | ||
} | ||
export { ClassTypeCheckable } | ||
export { ClassTypeCheckable as ClassTypeCheckable_alias_1 } | ||
declare type CompositeTypeAnnotation = TypedArrayAnnotation | ClassTypeAnnotation | SymbolTypeAnnotation | CustomTypeAnnotation; | ||
export { CompositeTypeAnnotation } | ||
export { CompositeTypeAnnotation as CompositeTypeAnnotation_alias_1 } | ||
declare interface Clonable<T> { | ||
clone(): T; | ||
} | ||
export { Clonable } | ||
export { Clonable as Clonable_alias_1 } | ||
declare type CustomTypeAnnotation = ["custom", string]; | ||
export { CustomTypeAnnotation } | ||
export { CustomTypeAnnotation as CustomTypeAnnotation_alias_1 } | ||
declare type Collection = IArguments | Array<unknown> | Map<unknown, unknown> | Record<string | number | symbol, unknown> | Set<unknown>; | ||
export { Collection } | ||
export { Collection as Collection_alias_1 } | ||
/** | ||
* A class that can be serialized and deserialized | ||
* Convert the input string to constant case. | ||
* | ||
* @remarks | ||
* "THIS_IS_AN_EXAMPLE" | ||
* | ||
* @param input - The input string. | ||
* @returns The constant-cased string. | ||
*/ | ||
declare interface DataTransformer<TData, TJsonValue extends JsonValue = JsonValue> { | ||
declare const constantCase: (input?: string) => string | undefined; | ||
export { constantCase } | ||
export { constantCase as constantCase_alias_1 } | ||
export { constantCase as constantCase_alias_2 } | ||
/** | ||
* copy value with customizer function | ||
* | ||
* @private | ||
* @param value | ||
* @param type | ||
*/ | ||
declare function copy(value: unknown, valueType: string, customizer?: ((value: unknown, type: string) => unknown) | null): unknown; | ||
export { copy } | ||
export { copy as copy_alias_1 } | ||
export { copy as copy_alias_2 } | ||
declare const Crypto_2: Crypto | undefined; | ||
export { Crypto_2 as Crypto } | ||
export { Crypto_2 as Crypto_alias_1 } | ||
export { Crypto_2 as Crypto_alias_2 } | ||
/** | ||
* Deep copy an object/array/value | ||
* | ||
* @param value - The value to copy | ||
* @param options - The options | ||
*/ | ||
declare function deepCopy<T>(value: T, options?: { | ||
customizer?: (value: unknown, type: string) => unknown; | ||
}): T; | ||
export { deepCopy } | ||
export { deepCopy as deepCopy_alias_1 } | ||
export { deepCopy as deepCopy_alias_2 } | ||
/** | ||
* Deep merge two objects | ||
* | ||
* @param target - The target object | ||
* @param source - The source object | ||
* @param options - The options object | ||
* @returns The merged object | ||
*/ | ||
declare const deepMerge: { | ||
<X = any, Y = any, Z = X & Y>(target: X, source: Y, options?: any): Z; | ||
all(array: Array<any>, options?: any): any; | ||
}; | ||
export { deepMerge } | ||
export { deepMerge as deepMerge_alias_1 } | ||
export { deepMerge as deepMerge_alias_2 } | ||
declare type DeepPartial<T> = T extends BrowserNativeObject | NestedValue ? T : { | ||
[K in keyof T]?: DeepPartial<T[K]>; | ||
}; | ||
export { DeepPartial } | ||
export { DeepPartial as DeepPartial_alias_1 } | ||
declare const EMPTY_OBJECT: {}; | ||
export { EMPTY_OBJECT } | ||
export { EMPTY_OBJECT as EMPTY_OBJECT_alias_1 } | ||
declare const EMPTY_STRING: ""; | ||
export { EMPTY_STRING } | ||
export { EMPTY_STRING as EMPTY_STRING_alias_1 } | ||
declare type EmptyObject = { | ||
[K in string | number]: never; | ||
}; | ||
export { EmptyObject } | ||
export { EmptyObject as EmptyObject_alias_1 } | ||
/** | ||
* Create a type from an object type without certain keys. | ||
* | ||
* @remarks We recommend setting the `requireExactProps` option to `true`. | ||
* @remarks This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically. | ||
* @remarks This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)). | ||
* @category Object | ||
*/ | ||
declare type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = { | ||
requireExactProps: false; | ||
}> = { | ||
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; | ||
} & (Options["requireExactProps"] extends true ? Partial<Record<KeysType, never>> : {}); | ||
export { Except } | ||
export { Except as Except_alias_1 } | ||
declare type ExceptOptions = { | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
Disallow assigning non-specified properties. | ||
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`. | ||
@default false | ||
*/ | ||
serialize: SerializationFunct<TData, TJsonValue>; | ||
requireExactProps?: boolean; | ||
}; | ||
declare type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : KeyType extends ExcludeType ? never : KeyType; | ||
export { Filter } | ||
export { Filter as Filter_alias_1 } | ||
/** | ||
* Flatten an object. | ||
* | ||
* @param obj - The object to flatten. | ||
* @param prefix - The prefix to use. | ||
* @param keyStringFn - The function to use to convert the key to a string. | ||
* @returns The flattened object. | ||
*/ | ||
declare const flattenObject: (obj: any, prefix?: string, keyStringFn?: (input?: string) => string | undefined) => any; | ||
export { flattenObject } | ||
export { flattenObject as flattenObject_alias_1 } | ||
export { flattenObject as flattenObject_alias_2 } | ||
/** | ||
* Gets the `toStringTag` of `obj`. | ||
* | ||
* @param value The obj to query. | ||
* @returns Returns the `toStringTag`. | ||
*/ | ||
declare const getObjectTag: (value: unknown) => string; | ||
export { getObjectTag } | ||
export { getObjectTag as getObjectTag_alias_1 } | ||
export { getObjectTag as getObjectTag_alias_2 } | ||
/** | ||
* Get the WebCrypto object | ||
* | ||
* @remarks | ||
* This helper function is used to get the WebCrypto object. If the object is not available, an error will be thrown. | ||
* | ||
* @returns The WebCrypto object | ||
*/ | ||
declare const getWebCrypto: () => Crypto; | ||
export { getWebCrypto } | ||
export { getWebCrypto as getWebCrypto_alias_1 } | ||
export { getWebCrypto as getWebCrypto_alias_2 } | ||
declare interface IIdentity<T = string> { | ||
id: T; | ||
} | ||
export { IIdentity } | ||
export { IIdentity as IIdentity_alias_1 } | ||
/** | ||
* The declaration of a ***dictionary-type*** object | ||
*/ | ||
declare type Indexable = { | ||
[index: IndexType]: any; | ||
}; | ||
export { Indexable } | ||
export { Indexable as Indexable_alias_1 } | ||
/** | ||
* The valid types of the index for an `Indexable` type object | ||
*/ | ||
declare type IndexType = string | number | symbol; | ||
export { IndexType } | ||
export { IndexType as IndexType_alias_1 } | ||
/** | ||
* Check if the provided value's type is "array-like" | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is "array-like" | ||
*/ | ||
declare const isArrayLike: (value: any) => boolean; | ||
export { isArrayLike } | ||
export { isArrayLike as isArrayLike_alias_1 } | ||
export { isArrayLike as isArrayLike_alias_2 } | ||
/** | ||
* Check if the provided value's type is `AsyncIterable` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is `AsyncIterable` | ||
*/ | ||
declare const isAsyncIterable: (value: unknown) => value is AsyncIterable<unknown>; | ||
export { isAsyncIterable } | ||
export { isAsyncIterable as isAsyncIterable_alias_1 } | ||
export { isAsyncIterable as isAsyncIterable_alias_2 } | ||
/** | ||
* Checks if `value` is classified as a `bigint` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isDate(37n) | ||
* // => true | ||
* | ||
* isBigInt(37) | ||
* // => false | ||
* ``` | ||
* | ||
* @param value The obj to check. | ||
* @returns Returns `true` if `value` is a bigint object, else `false`. | ||
*/ | ||
declare const isBigInt: (value: unknown) => value is bigint; | ||
export { isBigInt } | ||
export { isBigInt as isBigInt_alias_1 } | ||
export { isBigInt as isBigInt_alias_2 } | ||
/** | ||
* Check if the provided value's type is `boolean` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `boolean` | ||
*/ | ||
declare const isBoolean: (value: unknown) => value is boolean; | ||
export { isBoolean } | ||
export { isBoolean as isBoolean_alias_1 } | ||
export { isBoolean as isBoolean_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Buffer` | ||
*/ | ||
declare const isBuffer: typeof Buffer.isBuffer; | ||
export { isBuffer } | ||
export { isBuffer as isBuffer_alias_1 } | ||
export { isBuffer as isBuffer_alias_2 } | ||
declare const isBufferExists: boolean; | ||
export { isBufferExists } | ||
export { isBufferExists as isBufferExists_alias_1 } | ||
export { isBufferExists as isBufferExists_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Collection` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Collection` | ||
*/ | ||
declare function isCollection(value: any): value is Collection; | ||
export { isCollection } | ||
export { isCollection as isCollection_alias_1 } | ||
export { isCollection as isCollection_alias_2 } | ||
/** | ||
* Checks if `value` is classified as a `Date` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isDate(new Date) | ||
* // => true | ||
* | ||
* isDate('Mon April 23 2012') | ||
* // => false | ||
* ``` | ||
* | ||
* @param value - The value to check. | ||
* @returns Returns `true` if `obj` is a date object, else `false`. | ||
*/ | ||
declare const isDate: (value: unknown) => value is Date; | ||
export { isDate } | ||
export { isDate as isDate_alias_1 } | ||
export { isDate as isDate_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` or `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` or `undefined` | ||
*/ | ||
declare const isEmpty: (value: unknown) => boolean; | ||
export { isEmpty } | ||
export { isEmpty as isEmpty_alias_1 } | ||
export { isEmpty as isEmpty_alias_2 } | ||
/** | ||
* Check if the provided value's type is `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `{}` | ||
*/ | ||
declare const isEmptyObject: (value: unknown) => value is {}; | ||
export { isEmptyObject } | ||
export { isEmptyObject as isEmptyObject_alias_1 } | ||
export { isEmptyObject as isEmptyObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` or `undefined` or `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` or `undefined` or `{}` | ||
*/ | ||
declare const isEmptyOrEmptyObject: (value: unknown) => boolean; | ||
export { isEmptyOrEmptyObject } | ||
export { isEmptyOrEmptyObject as isEmptyOrEmptyObject_alias_1 } | ||
export { isEmptyOrEmptyObject as isEmptyOrEmptyObject_alias_2 } | ||
/** | ||
* Determine if the type is string and is empty | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `""` | ||
*/ | ||
declare const isEmptyString: (value: unknown) => value is string; | ||
export { isEmptyString } | ||
export { isEmptyString as isEmptyString_alias_1 } | ||
export { isEmptyString as isEmptyString_alias_2 } | ||
/** | ||
* Returns a boolean for whether the two given types are equal. | ||
* | ||
* @remarks Use-cases: If you want to make a conditional branch based on the result of a comparison of two types. | ||
* @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650 | ||
* @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796 | ||
* @category Type Guard | ||
* @category Utilities | ||
*/ | ||
declare type IsEqual<A, B> = (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B ? 1 : 2 ? true : false; | ||
export { IsEqual } | ||
export { IsEqual as IsEqual_alias_1 } | ||
declare interface ISequenced { | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* The sequence number (version, or event counter, etc.) of the record | ||
*/ | ||
deserialize: DeserializeFunct<TData, TJsonValue>; | ||
sequence: number; | ||
} | ||
export { DataTransformer } | ||
export { DataTransformer as DataTransformer_alias_1 } | ||
export { ISequenced } | ||
export { ISequenced as ISequenced_alias_1 } | ||
/** | ||
* Deserialize the given value with superjson using the given metadata | ||
* Checks if `obj` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, | ||
* `SyntaxError`, `TypeError`, or `URIError` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isError(new Error) | ||
* // => true | ||
* | ||
* isError(Error) | ||
* // => false | ||
* ``` | ||
* | ||
* @param obj - The obj to check. | ||
* @returns Returns `true` if `obj` is an error object, else `false`. | ||
*/ | ||
declare function deserialize<TData = unknown>(payload: JsonParserResult): TData; | ||
export { deserialize } | ||
export { deserialize as deserialize_alias_1 } | ||
declare const isError: (obj: unknown) => obj is Error; | ||
export { isError } | ||
export { isError as isError_alias_1 } | ||
export { isError as isError_alias_2 } | ||
/** | ||
* A function that can deserialize a certain type of data | ||
* Check if the provided value's type is a float | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` and is a float | ||
*/ | ||
declare type DeserializeFunct<TData = any, TJsonValue extends JsonValue = JsonValue> = (json: TJsonValue) => TData; | ||
export { DeserializeFunct } | ||
export { DeserializeFunct as DeserializeFunct_alias_1 } | ||
declare const isFloat: (value: any) => value is number; | ||
export { isFloat } | ||
export { isFloat as isFloat_alias_1 } | ||
export { isFloat as isFloat_alias_2 } | ||
declare interface IJsonParser { | ||
parse: <TData = any>(strData: string) => TData; | ||
stringify: <TData = any>(data: TData) => string; | ||
serialize: (object: JsonValue) => JsonParserResult; | ||
deserialize: <TData = any>(payload: JsonParserResult) => TData; | ||
register: <TData = any, TJsonValue extends JsonValue = JsonValue>(name: string, serialize: (object: JsonValue) => TJsonValue, deserialize: (payload: TJsonValue) => TData, isApplicable: (data: any) => data is TData) => void; | ||
} | ||
export { IJsonParser } | ||
export { IJsonParser as IJsonParser_alias_1 } | ||
/** | ||
* Check if the provided value's type is `Function` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Function` | ||
*/ | ||
declare const isFunction: (value: unknown) => value is ((params?: unknown) => unknown) & Function; | ||
export { isFunction } | ||
export { isFunction as isFunction_alias_1 } | ||
export { isFunction as isFunction_alias_2 } | ||
declare type InnerNode<T> = [T, Record<string, Tree<T>>]; | ||
export { InnerNode } | ||
export { InnerNode as InnerNode_alias_1 } | ||
/** | ||
* Check if the provided value's type is an integer | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` and is an integer | ||
*/ | ||
declare const isInt: (value: any) => value is number; | ||
export { isInt } | ||
export { isInt as isInt_alias_1 } | ||
export { isInt as isInt_alias_2 } | ||
declare const isMergeableObject: (value: any) => boolean; | ||
export { isMergeableObject } | ||
export { isMergeableObject as isMergeableObject_alias_1 } | ||
export { isMergeableObject as isMergeableObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Object` and is not `null` or `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined` | ||
*/ | ||
export declare const isNonNullObject: (value: any) => value is object; | ||
/** | ||
* The inverse of the `isEmptyObject` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined` or `{}` | ||
*/ | ||
declare const isNotEmpty: (value: unknown) => value is {}; | ||
export { isNotEmpty } | ||
export { isNotEmpty as isNotEmpty_alias_1 } | ||
export { isNotEmpty as isNotEmpty_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` | ||
*/ | ||
declare const isNull: (value: unknown) => value is null; | ||
export { isNull } | ||
export { isNull as isNull_alias_1 } | ||
export { isNull as isNull_alias_2 } | ||
/** | ||
* Check if the provided value's type is `number` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` | ||
*/ | ||
declare const isNumber: (value: unknown) => value is number; | ||
export { isNumber } | ||
export { isNumber as isNumber_alias_1 } | ||
export { isNumber as isNumber_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Object` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Object` | ||
*/ | ||
declare const isObject: (value: unknown) => value is object; | ||
export { isObject } | ||
export { isObject as isObject_alias_1 } | ||
export { isObject as isObject_alias_2 } | ||
/** | ||
* Checks if `value` is object-like. A value is object-like if it's not `null` | ||
* and has a `typeof` result of "object". | ||
* | ||
* @example | ||
* ```typescript | ||
* isObjectLike({}) | ||
* // => true | ||
* | ||
* isObjectLike([1, 2, 3]) | ||
* // => true | ||
* | ||
* isObjectLike(Function) | ||
* // => false | ||
* | ||
* isObjectLike(null) | ||
* // => false | ||
* ``` | ||
* | ||
* @param value - The value to check. | ||
* @returns Returns `true` if `value` is object-like, else `false`. | ||
*/ | ||
declare const isObjectLike: (obj: unknown) => boolean; | ||
export { isObjectLike } | ||
export { isObjectLike as isObjectLike_alias_1 } | ||
export { isObjectLike as isObjectLike_alias_2 } | ||
/** | ||
* Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. | ||
* | ||
* @example | ||
* ```typescript | ||
* function Foo() { | ||
* this.a = 1 | ||
* } | ||
* | ||
* isPlainObject(new Foo) | ||
* // => false | ||
* | ||
* isPlainObject([1, 2, 3]) | ||
* // => false | ||
* | ||
* isPlainObject({ 'x': 0, 'y': 0 }) | ||
* // => true | ||
* | ||
* isPlainObject(Object.create(null)) | ||
* // => true | ||
* ``` | ||
* | ||
* @param obj The value to check. | ||
* @returns Returns `true` if `obj` is a plain object, else `false`. | ||
*/ | ||
declare const isPlainObject: (obj: unknown) => boolean; | ||
export { isPlainObject } | ||
export { isPlainObject as isPlainObject_alias_1 } | ||
export { isPlainObject as isPlainObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is a built-in primitive | ||
* | ||
* @remarks | ||
* The full list of primitive types includes: | ||
* * `number` | ||
* * `string` | ||
* * `boolean` | ||
* * `symbol` | ||
* * `bigint` | ||
* * `undefined` | ||
* * `null` | ||
* | ||
* @param obj - The value to type check | ||
* @returns An indicator specifying if the value provided is a built-in primitive | ||
*/ | ||
declare const isPrimitive: (value: unknown) => boolean; | ||
export { isPrimitive } | ||
export { isPrimitive as isPrimitive_alias_1 } | ||
export { isPrimitive as isPrimitive_alias_2 } | ||
/** | ||
* Check if the provided value's type is a promise | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type a promise | ||
*/ | ||
declare const isPromise: (value: unknown) => value is Promise<unknown>; | ||
export { isPromise } | ||
export { isPromise as isPromise_alias_1 } | ||
export { isPromise as isPromise_alias_2 } | ||
/** | ||
* Check if the provided value is a {@link https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 React Element}. | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type {@link https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 React Element} | ||
*/ | ||
declare const isReactElement: (value: any) => boolean; | ||
export { isReactElement } | ||
export { isReactElement as isReactElement_alias_1 } | ||
export { isReactElement as isReactElement_alias_2 } | ||
/** | ||
* Check if the provided value's type is a ref | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type ref | ||
*/ | ||
declare const isRef: <TRef = unknown>(value: unknown) => value is RefObject<TRef>; | ||
export { isRef } | ||
export { isRef as isRef_alias_1 } | ||
export { isRef as isRef_alias_2 } | ||
/** | ||
* The function checks if the code is running in | ||
* the browser (and not on the server). | ||
*/ | ||
declare const isRuntimeClient: () => boolean; | ||
export { isRuntimeClient } | ||
export { isRuntimeClient as isRuntimeClient_alias_1 } | ||
export { isRuntimeClient as isRuntimeClient_alias_2 } | ||
/** | ||
* The function checks if the code is running on | ||
* the server (and not in the browser). | ||
*/ | ||
declare const isRuntimeServer: () => boolean; | ||
export { isRuntimeServer } | ||
export { isRuntimeServer as isRuntimeServer_alias_1 } | ||
export { isRuntimeServer as isRuntimeServer_alias_2 } | ||
/** | ||
* Check if the provided value's type is SelectOption | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type SelectOption | ||
*/ | ||
declare const isSelectOption: (value: unknown) => value is SelectOption; | ||
export { isSelectOption } | ||
export { isSelectOption as isSelectOption_alias_1 } | ||
export { isSelectOption as isSelectOption_alias_2 } | ||
/** | ||
* The inverse of the `isEmpty` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined` | ||
*/ | ||
declare const isSet: (value: unknown) => value is {}; | ||
export { isSet } | ||
export { isSet as isSet_alias_1 } | ||
export { isSet as isSet_alias_2 } | ||
/** | ||
* Check if the provided value's type is NOT `null` nor `undefined` nor `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is NOT `null` nor `undefined` nor `{}` | ||
*/ | ||
declare const isSetObject: (value: unknown) => value is object; | ||
export { isSetObject } | ||
export { isSetObject as isSetObject_alias_1 } | ||
export { isSetObject as isSetObject_alias_2 } | ||
/** | ||
* Determine if the type is string and is not empty (length greater than zero) | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `string` and length greater than zero | ||
*/ | ||
declare const isSetString: (value: unknown) => value is string; | ||
export { isSetString } | ||
export { isSetString as isSetString_alias_1 } | ||
export { isSetString as isSetString_alias_2 } | ||
/** | ||
* Determine if the type is string | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `string` | ||
*/ | ||
declare const isString: (value: unknown) => value is string; | ||
export { isString } | ||
export { isString as isString_alias_1 } | ||
export { isString as isString_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Symbol` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Symbol` | ||
*/ | ||
declare const isSymbol: (value: unknown) => value is symbol; | ||
export { isSymbol } | ||
export { isSymbol as isSymbol_alias_1 } | ||
export { isSymbol as isSymbol_alias_2 } | ||
/** | ||
* Check if the provided value has a `__typename` property | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided has a `__typename` property | ||
*/ | ||
declare const isTyped: (value: unknown) => value is ITyped; | ||
export { isTyped } | ||
export { isTyped as isTyped_alias_1 } | ||
export { isTyped as isTyped_alias_2 } | ||
/** | ||
* Check if the provided value's type is `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `undefined` | ||
*/ | ||
declare const isUndefined: (value: unknown) => boolean; | ||
export { isUndefined } | ||
export { isUndefined as isUndefined_alias_1 } | ||
export { isUndefined as isUndefined_alias_2 } | ||
declare interface ITyped { | ||
@@ -112,205 +725,286 @@ /** | ||
} | ||
export { ITyped } | ||
export { ITyped as ITyped_alias_1 } | ||
declare interface JsonArray extends Array<JsonValue> { | ||
declare interface IVersioned { | ||
version: number; | ||
} | ||
export { JsonArray } | ||
export { JsonArray as JsonArray_alias_1 } | ||
export { IVersioned } | ||
export { IVersioned as IVersioned_alias_1 } | ||
declare interface JsonObject { | ||
[key: string]: JsonValue; | ||
} | ||
export { JsonObject } | ||
export { JsonObject as JsonObject_alias_1 } | ||
/** | ||
* Convert the input string to kebab case. | ||
* | ||
* @remarks | ||
* "this-is-an-example" | ||
* | ||
* @param input - The input string. | ||
* @returns The kebab-cased string. | ||
*/ | ||
declare const kebabCase: (input?: string) => string | undefined; | ||
export { kebabCase } | ||
export { kebabCase as kebabCase_alias_1 } | ||
export { kebabCase as kebabCase_alias_2 } | ||
declare interface JsonParserResult { | ||
json: JsonValue; | ||
meta?: { | ||
values?: Tree<TypeAnnotation> | Record<string, Tree<TypeAnnotation>> | undefined; | ||
referentialEqualities?: Record<string, string[]> | [string[]] | [string[], Record<string, string[]>]; | ||
}; | ||
} | ||
export { JsonParserResult } | ||
export { JsonParserResult as JsonParserResult_alias_1 } | ||
declare type LiteralUnion<T extends U, U extends Primitive> = T | (U & { | ||
_?: never; | ||
}); | ||
export { LiteralUnion } | ||
export { LiteralUnion as LiteralUnion_alias_1 } | ||
declare type JsonValue = PrimitiveJsonValue | JsonArray | JsonObject; | ||
export { JsonValue } | ||
export { JsonValue as JsonValue_alias_1 } | ||
/** | ||
* Lower case the first character of an input string. | ||
* | ||
* @remarks | ||
* "tHISISANEXAMPLE" | ||
* | ||
* @param input - The input string. | ||
* @returns The lower-cased string. | ||
*/ | ||
declare const lowerCaseFirst: (input?: string) => string | undefined; | ||
export { lowerCaseFirst } | ||
export { lowerCaseFirst as lowerCaseFirst_alias_1 } | ||
export { lowerCaseFirst as lowerCaseFirst_alias_2 } | ||
declare type Leaf<T> = [T]; | ||
export { Leaf } | ||
export { Leaf as Leaf_alias_1 } | ||
declare type MaybePromise<T> = T | Promise<T>; | ||
export { MaybePromise } | ||
export { MaybePromise as MaybePromise_alias_1 } | ||
declare type LeafTypeAnnotation = PrimitiveTypeAnnotation | "regexp" | "Date" | "Error" | "URL"; | ||
export { LeafTypeAnnotation } | ||
export { LeafTypeAnnotation as LeafTypeAnnotation_alias_1 } | ||
declare type NestedValue<TValue extends object = object> = { | ||
[$NestedValue]: never; | ||
} & TValue; | ||
export { NestedValue } | ||
export { NestedValue as NestedValue_alias_1 } | ||
declare type Newable<T> = new (...args: never[]) => T; | ||
export { Newable } | ||
export { Newable as Newable_alias_1 } | ||
declare const NEWLINE_STRING: "\r\n"; | ||
export { NEWLINE_STRING } | ||
export { NEWLINE_STRING as NEWLINE_STRING_alias_1 } | ||
declare type NonUndefined<T> = T extends undefined ? never : T; | ||
export { NonUndefined } | ||
export { NonUndefined as NonUndefined_alias_1 } | ||
/** | ||
* Parse the given value with superjson using the given metadata | ||
* A no op, or no-op, function for no operation | ||
* | ||
* @remarks Please see {@link https://dev.to/praneshpsg239/noop-in-javascript-478h this article} for more information. | ||
* | ||
* @param params - An optional parameter passed to the function. It can be anything (but is not used in any way) | ||
*/ | ||
declare function parse<TData = unknown>(strData: string): TData; | ||
export { parse } | ||
export { parse as parse_alias_1 } | ||
declare const noop: (params?: unknown) => void; | ||
export { noop } | ||
export { noop as noop_alias_1 } | ||
export { noop as noop_alias_2 } | ||
/** | ||
* Parse the given value with qs using the given metadata | ||
* Convert the input string to pascal case. | ||
* | ||
* @remarks | ||
* "ThisIsAnExample" | ||
* | ||
* @param input - The input string. | ||
* @returns The pascal-cased string. | ||
*/ | ||
declare function parseQueryParam<TData = unknown>(strData: string, options?: { | ||
comma?: boolean | undefined; | ||
delimiter?: string | RegExp | undefined; | ||
depth?: number | false | undefined; | ||
arrayLimit?: number | undefined; | ||
parseArrays?: boolean | undefined; | ||
allowDots?: boolean | undefined; | ||
plainObjects?: boolean | undefined; | ||
allowPrototypes?: boolean | undefined; | ||
parameterLimit?: number | undefined; | ||
strictNullHandling?: boolean | undefined; | ||
ignoreQueryPrefix?: boolean | undefined; | ||
charset?: "utf-8" | "iso-8859-1" | undefined; | ||
charsetSentinel?: boolean | undefined; | ||
interpretNumericEntities?: boolean | undefined; | ||
}): TData; | ||
export { parseQueryParam } | ||
export { parseQueryParam as parseQueryParam_alias_1 } | ||
declare const pascalCase: (input?: string) => string | undefined; | ||
export { pascalCase } | ||
export { pascalCase as pascalCase_alias_1 } | ||
export { pascalCase as pascalCase_alias_2 } | ||
declare type PrimitiveJsonValue = string | number | boolean | undefined | null; | ||
export { PrimitiveJsonValue } | ||
export { PrimitiveJsonValue as PrimitiveJsonValue_alias_1 } | ||
/** | ||
* Make all characters lowercase and add a period in between each word | ||
* | ||
* @remarks | ||
* "this.is.an.example" | ||
* | ||
* @param input - The input string. | ||
* @returns The period-split string. | ||
*/ | ||
declare const periodSplit: (input?: string) => string | undefined; | ||
export { periodSplit } | ||
export { periodSplit as periodSplit_alias_1 } | ||
export { periodSplit as periodSplit_alias_2 } | ||
declare type PrimitiveTypeAnnotation = "number" | "undefined" | "bigint"; | ||
export { PrimitiveTypeAnnotation } | ||
export { PrimitiveTypeAnnotation as PrimitiveTypeAnnotation_alias_1 } | ||
/** | ||
* Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive). | ||
* | ||
* @category Type | ||
*/ | ||
declare type Primitive = null | undefined | string | number | boolean | symbol | bigint; | ||
export { Primitive } | ||
export { Primitive as Primitive_alias_1 } | ||
declare function register<TData = any, TJsonObject extends JsonValue = JsonValue>(name: string, serialize: (data: TData) => TJsonObject, deserialize: (json: TJsonObject) => TData, isApplicable: (data: any) => data is TData): void; | ||
export { register } | ||
export { register as register_alias_1 } | ||
/** | ||
* Check if the provided object has the provided property | ||
* | ||
* @param object - The object to check | ||
* @param propertyKey - The property to check | ||
* @returns An indicator specifying if the object has the provided property | ||
*/ | ||
declare const propertyExists: (object: any, propertyKey: PropertyKey) => boolean; | ||
export { propertyExists } | ||
export { propertyExists as propertyExists_alias_1 } | ||
export { propertyExists as propertyExists_alias_2 } | ||
declare const Serializable: <TData = any>(options: { | ||
/** | ||
* Check if the provided object has the provided property and if it's safe to merge | ||
* | ||
* @param object - The object to check | ||
* @param propertyKey - The property to check | ||
* @returns An indicator specifying if the object has the provided property and if it's safe to merge | ||
*/ | ||
declare const propertyUnsafe: (object: any, propertyKey: PropertyKey) => boolean; | ||
export { propertyUnsafe } | ||
export { propertyUnsafe as propertyUnsafe_alias_1 } | ||
export { propertyUnsafe as propertyUnsafe_alias_2 } | ||
declare type ReducerFunction<TState, TAction> = (state: TState, action: TAction) => TState; | ||
export { ReducerFunction } | ||
export { ReducerFunction as ReducerFunction_alias_1 } | ||
declare interface RefObject<T> { | ||
current: T; | ||
} | ||
export { RefObject } | ||
export { RefObject as RefObject_alias_1 } | ||
/** | ||
* Extract all required keys from the given type. | ||
* | ||
* @remarks This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc... | ||
* @category Utilities | ||
*/ | ||
declare type RequiredKeysOf<BaseType extends object> = Exclude<{ | ||
[Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]> ? Key : never; | ||
}[keyof BaseType], undefined>; | ||
export { RequiredKeysOf } | ||
export { RequiredKeysOf as RequiredKeysOf_alias_1 } | ||
declare type Rollback = Record<string, (initialValue: any, currentValue: any) => any>; | ||
export { Rollback } | ||
export { Rollback as Rollback_alias_1 } | ||
declare interface SelectOption { | ||
/** | ||
* The type and/or name of the record | ||
* The string value to display in the field | ||
*/ | ||
name?: string | undefined; | ||
name: string; | ||
/** | ||
* Serialize the class to a JSON object or string | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
* The value stored behind the scenes when selected | ||
*/ | ||
serialize: SerializationFunct<TData>; | ||
value: string; | ||
/** | ||
* Deserialize the class from a JSON object or string | ||
* | ||
* @param json - The JSON object to deserialize from | ||
* @returns The deserialized data | ||
* Is the option value valid for selection in the dropdown | ||
*/ | ||
deserialize: DeserializeFunct<TData>; | ||
}) => <TClass extends new (...args: any) => any = new (...args: any) => TData>(target: TClass) => { | ||
new (...args: any): { | ||
[x: string]: any; | ||
/** | ||
* The name of the class's type | ||
*/ | ||
__typename: string; | ||
/** | ||
* Serialize the class to a JSON object | ||
* | ||
* @returns The data object to serialize | ||
*/ | ||
serialize: () => JsonValue; | ||
/** | ||
* Deserialize the class from a JSON object | ||
* | ||
* @param json - The JSON object to deserialize from | ||
*/ | ||
deserialize: (json: JsonValue) => void; | ||
/** | ||
* Run type check on the given value | ||
* @param value - The value to check | ||
* @returns True if the value is of the type of the class | ||
*/ | ||
isTypeOf(value: any): value is TData; | ||
}; | ||
} & TClass; | ||
export { Serializable } | ||
export { Serializable as Serializable_alias_1 } | ||
disabled: boolean; | ||
/** | ||
* Sets or retrieves whether the option in the list box is the default item. | ||
*/ | ||
selected: boolean; | ||
} | ||
export { SelectOption } | ||
export { SelectOption as SelectOption_alias_1 } | ||
declare type SerializableJsonValue = Symbol | Set<JsonValue> | Map<JsonValue, JsonValue> | undefined | bigint | Date | ClassInstance | RegExp; | ||
export { SerializableJsonValue } | ||
export { SerializableJsonValue as SerializableJsonValue_alias_1 } | ||
declare type SerializableType<T> = ClassSerializable<T> & ClassTypeCheckable<T> & ITyped & T; | ||
export { SerializableType } | ||
export { SerializableType as SerializableType_alias_1 } | ||
/** | ||
* A function that can serialize a certain type of data | ||
* Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type. | ||
* | ||
* @param data - The data object to serialize | ||
* @returns The serialized JSON object | ||
* @remarks Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required. | ||
* @category Object | ||
*/ | ||
declare type SerializationFunct<TData = any, TJsonValue extends JsonValue = JsonValue> = (data: TData) => TJsonValue; | ||
export { SerializationFunct } | ||
export { SerializationFunct as SerializationFunct_alias_1 } | ||
declare type SetRequired<BaseType, Keys extends keyof BaseType> = BaseType extends unknown ? Simplify<Except<BaseType, Keys> & Required<Pick<BaseType, Keys>>> : never; | ||
export { SetRequired } | ||
export { SetRequired as SetRequired_alias_1 } | ||
declare type SerializationMetadata<T> = DataTransformer<T> & ClassTypeCheckable<T>; | ||
export { SerializationMetadata } | ||
export { SerializationMetadata as SerializationMetadata_alias_1 } | ||
declare const sha256: (value: string) => Promise<string>; | ||
export { sha256 } | ||
export { sha256 as sha256_alias_1 } | ||
export { sha256 as sha256_alias_2 } | ||
/** | ||
* Serialize the given value with superjson | ||
* Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability. | ||
* | ||
* @remarks Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface. | ||
* @remarks If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`. | ||
* @link https://github.com/microsoft/TypeScript/issues/15300 | ||
* @category Object | ||
*/ | ||
declare function serialize(object: JsonValue): JsonParserResult; | ||
export { serialize } | ||
export { serialize as serialize_alias_1 } | ||
declare type Simplify<T> = { | ||
[KeyType in keyof T]: T[KeyType]; | ||
} & {}; | ||
export { Simplify } | ||
export { Simplify as Simplify_alias_1 } | ||
declare type SimpleTypeAnnotation = LeafTypeAnnotation | "map" | "set"; | ||
export { SimpleTypeAnnotation } | ||
export { SimpleTypeAnnotation as SimpleTypeAnnotation_alias_1 } | ||
/** | ||
* Stringify the given value with superjson | ||
* Convert the input string to snake case. | ||
* | ||
* @remarks | ||
* "this_is_an_example" | ||
* | ||
* @param input - The input string. | ||
* @param options - Options to control the behavior of the function. | ||
* @returns The snake-cased string. | ||
*/ | ||
declare function stringify(json: any): string; | ||
export { stringify } | ||
export { stringify as stringify_alias_1 } | ||
declare const snakeCase: (input?: string, options?: { | ||
splitOnNumber: boolean; | ||
}) => string | undefined; | ||
export { snakeCase } | ||
export { snakeCase as snakeCase_alias_1 } | ||
export { snakeCase as snakeCase_alias_2 } | ||
/** | ||
* Stringify the given value with qs | ||
* Convert the input string to title case. | ||
* | ||
* @remarks | ||
* "This Is An Example" | ||
* | ||
* @param input - The input string. | ||
* @returns The title cased string. | ||
*/ | ||
declare function stringifyQueryParam(json: JsonValue, options?: { | ||
delimiter?: string | undefined; | ||
strictNullHandling?: boolean | undefined; | ||
skipNulls?: boolean | undefined; | ||
encode?: boolean | undefined; | ||
filter?: Array<string | number> | ((prefix: string, value: any) => any) | undefined; | ||
arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined; | ||
indices?: boolean | undefined; | ||
sort?: ((a: any, b: any) => number) | undefined; | ||
serializeDate?: ((d: Date) => string) | undefined; | ||
format?: "RFC1738" | "RFC3986" | undefined; | ||
encodeValuesOnly?: boolean | undefined; | ||
addQueryPrefix?: boolean | undefined; | ||
charset?: "utf-8" | "iso-8859-1" | undefined; | ||
allowDots?: boolean | undefined; | ||
charsetSentinel?: boolean | undefined; | ||
}): string; | ||
export { stringifyQueryParam } | ||
export { stringifyQueryParam as stringifyQueryParam_alias_1 } | ||
declare const titleCase: (input?: string) => string | undefined; | ||
export { titleCase } | ||
export { titleCase as titleCase_alias_1 } | ||
export { titleCase as titleCase_alias_2 } | ||
declare type SymbolTypeAnnotation = ["symbol", string]; | ||
export { SymbolTypeAnnotation } | ||
export { SymbolTypeAnnotation as SymbolTypeAnnotation_alias_1 } | ||
declare const TYPE_ARGUMENTS = "Arguments"; | ||
export { TYPE_ARGUMENTS } | ||
export { TYPE_ARGUMENTS as TYPE_ARGUMENTS_alias_1 } | ||
declare type Tree<T> = InnerNode<T> | Leaf<T>; | ||
export { Tree } | ||
export { Tree as Tree_alias_1 } | ||
declare const TYPE_ARRAY = "Array"; | ||
export { TYPE_ARRAY } | ||
export { TYPE_ARRAY as TYPE_ARRAY_alias_1 } | ||
declare type TypeAnnotation = SimpleTypeAnnotation | CompositeTypeAnnotation; | ||
export { TypeAnnotation } | ||
export { TypeAnnotation as TypeAnnotation_alias_1 } | ||
declare const TYPE_MAP = "Map"; | ||
export { TYPE_MAP } | ||
export { TYPE_MAP as TYPE_MAP_alias_1 } | ||
declare type TypedArrayAnnotation = ["typed-array", string]; | ||
export { TypedArrayAnnotation } | ||
export { TypedArrayAnnotation as TypedArrayAnnotation_alias_1 } | ||
declare const TYPE_OBJECT = "Object"; | ||
export { TYPE_OBJECT } | ||
export { TYPE_OBJECT as TYPE_OBJECT_alias_1 } | ||
declare const TYPE_SET = "Set"; | ||
export { TYPE_SET } | ||
export { TYPE_SET as TYPE_SET_alias_1 } | ||
declare function typeDetect(obj: unknown): string; | ||
export { typeDetect } | ||
export { typeDetect as typeDetect_alias_1 } | ||
export { typeDetect as typeDetect_alias_2 } | ||
/** | ||
* Upper case the first character of an input string. | ||
* | ||
* @remarks | ||
* "Thisisanexample" | ||
* | ||
* @param input - The input string. | ||
* @returns The capitalized string. | ||
*/ | ||
declare const upperCaseFirst: (input?: string) => string | undefined; | ||
export { upperCaseFirst } | ||
export { upperCaseFirst as upperCaseFirst_alias_1 } | ||
export { upperCaseFirst as upperCaseFirst_alias_2 } | ||
export { } |
{ | ||
"name": "@storm-stack/serialization", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "A package used to support serializing and deserializing data sent between the client and the server.", |
@@ -19,3 +19,3 @@ <!-- START header --> | ||
[![Version](https://img.shields.io/badge/version-1.0.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/) | ||
[![Version](https://img.shields.io/badge/version-1.1.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/) | ||
[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6) | ||
@@ -22,0 +22,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1142623
4021
1