@rimbu/base
Advanced tools
Comparing version 0.11.0 to 0.11.1
/** | ||
* Matches any type of function | ||
*/ | ||
export declare type AnyFunc = (...args: any[]) => any; | ||
export type AnyFunc = (...args: any[]) => any; | ||
/** | ||
@@ -9,3 +9,3 @@ * Gives true if the given type T is a function, false otherwise. | ||
*/ | ||
export declare type IsAnyFunc<T> = AnyFunc extends T ? true : false; | ||
export type IsAnyFunc<T> = AnyFunc extends T ? true : false; | ||
/** | ||
@@ -17,3 +17,3 @@ * A predicate type for any record that resolves to true if any of the record | ||
*/ | ||
export declare type IsObjWithoutFunctions<T> = AnyFunc extends T[keyof T] ? false : true; | ||
export type IsObjWithoutFunctions<T> = AnyFunc extends T[keyof T] ? false : true; | ||
/** | ||
@@ -28,3 +28,3 @@ * A predicate type that resolves to true if the given type satisfies: | ||
*/ | ||
export declare type IsPlainObj<T> = T extends null | undefined | number | string | boolean | bigint | symbol | AnyFunc | Iterable<any> | AsyncIterable<any> ? false : IsObjWithoutFunctions<T>; | ||
export type IsPlainObj<T> = T extends null | undefined | number | string | boolean | bigint | symbol | AnyFunc | Iterable<any> | AsyncIterable<any> ? false : IsObjWithoutFunctions<T>; | ||
/** | ||
@@ -35,3 +35,3 @@ * Utility type that will only accept objects that are considered 'plain objects' according | ||
*/ | ||
export declare type PlainObj<T> = IsPlainObj<T> extends true ? T : never; | ||
export type PlainObj<T> = IsPlainObj<T> extends true ? T : never; | ||
/** | ||
@@ -41,3 +41,3 @@ * Utility type that will only return true if the input type T is equal to `any`. | ||
*/ | ||
export declare type IsAny<T> = 0 extends 1 & T ? true : false; | ||
export type IsAny<T> = 0 extends 1 & T ? true : false; | ||
/** | ||
@@ -47,3 +47,3 @@ * Utility type that will only return true if the input type T is a (readonly) array. | ||
*/ | ||
export declare type IsArray<T> = T extends readonly any[] ? true : false; | ||
export type IsArray<T> = T extends readonly any[] ? true : false; | ||
/** | ||
@@ -53,3 +53,3 @@ * Utility type to exclude any types that are iterable. Useful in cases where | ||
*/ | ||
export declare type NotIterable = { | ||
export type NotIterable = { | ||
[Symbol.iterator]?: never; | ||
@@ -64,3 +64,3 @@ }; | ||
*/ | ||
export declare function isPlainObj(obj: any): boolean; | ||
export declare function isPlainObj(obj: any): obj is object; | ||
/** | ||
@@ -67,0 +67,0 @@ * Returns true if the given object is Iterable |
export declare const Token: unique symbol; | ||
export declare type Token = typeof Token; | ||
export type Token = typeof Token; |
{ | ||
"name": "@rimbu/base", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "Utilities to implement Rimbu collections", | ||
@@ -55,4 +55,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@rimbu/common": "^0.12.0", | ||
"tslib": "^2.4.0" | ||
"@rimbu/common": "^0.12.1", | ||
"tslib": "^2.5.0" | ||
}, | ||
@@ -62,3 +62,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "442ffd299583458d458e9bbe3dd02c67828707f3" | ||
"gitHead": "f7a7662f81e9246b244cab22c14776617652833f" | ||
} |
@@ -79,3 +79,3 @@ /** | ||
*/ | ||
export function isPlainObj(obj: any): boolean { | ||
export function isPlainObj(obj: any): obj is object { | ||
return ( | ||
@@ -82,0 +82,0 @@ typeof obj === 'object' && |
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
51853
Updated@rimbu/common@^0.12.1
Updatedtslib@^2.5.0