UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

26 lines 695 B
/** * Makes specified properties required. * * @example * ``` * import { AlertProps } from '~components/alert/interfaces' * * type InternalAlertProps = SomeRequired<AlertProps, 'type'> * * function Alert(props: AlertProps) { ... } * function InternalAlert(props: InternalAlertProps) { ... } * ``` */ export type SomeRequired<Type, Keys extends keyof Type> = Type & { [Key in Keys]-?: Type[Key]; }; /** * Utility type that makes a union of given type and undefined. * @example * ``` * type OptionalString = Optional<string> * type OptionalStringOrNumber = Optional<string | number> * ``` */ export type Optional<Type> = Type | undefined; //# sourceMappingURL=types.d.ts.map