@datadog/mobile-react-native-code-push
Version:
A client-side React Native module to interact with Appcenter Codepush and Datadog
19 lines • 809 B
TypeScript
/**
* A constant used to define a property that should be discarded from a {@link RequiredOrDiscard} object.
*/
export declare const DISCARD_PROPERTY: {
_dd_meta_: string;
};
/**
* Used to change the type of every property of an object to be either required or {@link DISCARD_PROPERTY}.
*/
export type RequiredOrDiscard<T> = {
[K in keyof T]-?: T[K] | typeof DISCARD_PROPERTY;
};
/**
* Removes all entries of value {@link DISCARD_PROPERTY} from the given object
* @param obj The object to remove the {@link DISCARD_PROPERTY} entries from.
* @returns The object without the {@link DISCARD_PROPERTY} entries.
*/
export declare const removeDiscardProperties: <T extends Record<string, any>>(obj: T) => { [K in keyof T]: T[K] extends null ? undefined : T[K]; };
//# sourceMappingURL=utils.d.ts.map