@stackbit/utils
Advanced tools
Comparing version 0.2.14 to 0.2.15-alpha.0
@@ -79,5 +79,2 @@ import { PropertyPath } from 'lodash'; | ||
export declare function rename(object: any, oldPath: PropertyPath, newPath: PropertyPath): void; | ||
export declare type PartialNonNullable<T> = { | ||
[P in keyof T]?: NonNullable<T[P]>; | ||
}; | ||
/** | ||
@@ -87,3 +84,3 @@ * Removed all null and undefined properties from the passed object | ||
*/ | ||
export declare function omitByNil<T extends Record<string, any>>(object: T): PartialNonNullable<T>; | ||
export declare function omitByNil<T extends Record<string, any>>(object: T): T; | ||
/** | ||
@@ -90,0 +87,0 @@ * Deeply maps the passed `value` by recursively calling the `iteratee` with the |
{ | ||
"name": "@stackbit/utils", | ||
"version": "0.2.14", | ||
"version": "0.2.15-alpha.0", | ||
"description": "Stackbit utilities", | ||
@@ -46,3 +46,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "15352ac129e230b9daa9b15f989043522b67fb56" | ||
"gitHead": "4d25ab5a92c58f4ffb74c63a777ba71a6fc32f77" | ||
} |
@@ -130,6 +130,2 @@ import _, { PropertyPath } from 'lodash'; | ||
export type PartialNonNullable<T> = { | ||
[P in keyof T]?: NonNullable<T[P]>; | ||
}; | ||
/** | ||
@@ -139,4 +135,4 @@ * Removed all null and undefined properties from the passed object | ||
*/ | ||
export function omitByNil<T extends Record<string, any>>(object: T): PartialNonNullable<T> { | ||
return _.omitBy(object, _.isNil) as PartialNonNullable<T>; | ||
export function omitByNil<T extends Record<string, any>>(object: T): T { | ||
return _.omitBy(object, _.isNil) as T; | ||
} | ||
@@ -143,0 +139,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
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
161182
2948