UNPKG

@nativescript/core

Version:

A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.

7 lines (6 loc) 259 B
/** * Makes the specified properties in a type optional. * @example type NotifyData = Optional<EventData, "object"> * // returns: { eventName: string; object?: Observable } */ export type Optional<T, K extends keyof T> = Omit<T, K> & { [P in K]?: T[P] };