@chubbyts/chubbyts-framework
Version:
A minimal, highly performant middleware PSR-15 inspired function based micro framework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.
15 lines (14 loc) • 352 B
TypeScript
/**
* ```ts
* type WithOptionals = {
* title: string;
* shortDescription?: string;
* description?: string;
* };
*
* type WithoutOptionals = RequiredProperties<WithOptionals, 'shortDescription' | 'description'>;
* ```
*/
export type RequiredProperties<Type, Key extends keyof Type> = Type & {
[Property in Key]-?: Type[Property];
};