@xylabs/promise
Advanced tools
Comparing version 3.0.17 to 3.0.18
export type TypedValue = bigint | string | number | boolean | null | TypedObject | TypedArray | Function | symbol | undefined; | ||
export type TypedKey = string | number | symbol; | ||
export type TypedKey<T extends string | void = void> = T extends string ? T : string | number | symbol; | ||
export type TypedObject = { | ||
[key: TypedKey]: TypedValue; | ||
}; | ||
} | object; | ||
export type TypedArray = TypedValue[]; | ||
export declare const isTypedKey: (value: unknown) => value is TypedKey; | ||
export declare const isTypedKey: (value: unknown) => value is string | number | symbol; | ||
export declare const isTypedValue: (value: unknown) => value is TypedValue; | ||
export declare const isTypedArray: (value: unknown) => value is TypedArray; | ||
export declare const isValidTypedFieldPair: (pair: [key: unknown, value: unknown]) => pair is [key: TypedKey, value: TypedValue]; | ||
export declare const isValidTypedFieldPair: (pair: [key: unknown, value: unknown]) => pair is [key: string | number | symbol, value: TypedValue]; | ||
export declare const isTypedObject: (value: unknown) => value is TypedObject; | ||
//# sourceMappingURL=Typed.d.ts.map |
export type TypedValue = bigint | string | number | boolean | null | TypedObject | TypedArray | Function | symbol | undefined; | ||
export type TypedKey = string | number | symbol; | ||
export type TypedKey<T extends string | void = void> = T extends string ? T : string | number | symbol; | ||
export type TypedObject = { | ||
[key: TypedKey]: TypedValue; | ||
}; | ||
} | object; | ||
export type TypedArray = TypedValue[]; | ||
export declare const isTypedKey: (value: unknown) => value is TypedKey; | ||
export declare const isTypedKey: (value: unknown) => value is string | number | symbol; | ||
export declare const isTypedValue: (value: unknown) => value is TypedValue; | ||
export declare const isTypedArray: (value: unknown) => value is TypedArray; | ||
export declare const isValidTypedFieldPair: (pair: [key: unknown, value: unknown]) => pair is [key: TypedKey, value: TypedValue]; | ||
export declare const isValidTypedFieldPair: (pair: [key: unknown, value: unknown]) => pair is [key: string | number | symbol, value: TypedValue]; | ||
export declare const isTypedObject: (value: unknown) => value is TypedObject; | ||
//# sourceMappingURL=Typed.d.ts.map |
@@ -54,4 +54,4 @@ { | ||
"sideEffects": false, | ||
"version": "3.0.17", | ||
"version": "3.0.18", | ||
"type": "module" | ||
} |
@@ -5,4 +5,4 @@ import { isType } from './isType' | ||
export type TypedValue = bigint | string | number | boolean | null | TypedObject | TypedArray | Function | symbol | undefined | ||
export type TypedKey = string | number | symbol | ||
export type TypedObject = { [key: TypedKey]: TypedValue } | ||
export type TypedKey<T extends string | void = void> = T extends string ? T : string | number | symbol | ||
export type TypedObject = { [key: TypedKey]: TypedValue } | object | ||
export type TypedArray = TypedValue[] | ||
@@ -53,1 +53,16 @@ | ||
} | ||
//Object Type Test | ||
/* | ||
interface TestObject { | ||
value: number | ||
} | ||
const x: TestObject = { value: 1 } | ||
const f = (p: TypedValue): void => { | ||
console.log(p) | ||
} | ||
f(x) | ||
*/ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
116674
860