Executable
+1
@@ -0,0 +1 @@
|
||||
export type Nullable<T> = {[K in keyof T]: T[K] | null};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
export function objHasKey<X extends {}, Y extends PropertyKey>(
|
||||
obj: X,
|
||||
prop: Y
|
||||
): obj is X & Record<Y, unknown> {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
return obj.hasOwnProperty(prop);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export type PartialWithRequired<T, K extends keyof T> = Pick<T, K> & Partial<T>;
|
||||
Reference in New Issue
Block a user