itcast 6e512b8ce6 aaaa 10 miesięcy temu
..
dist 6e512b8ce6 aaaa 10 miesięcy temu
src 6e512b8ce6 aaaa 10 miesięcy temu
LICENSE 6e512b8ce6 aaaa 10 miesięcy temu
README.md 6e512b8ce6 aaaa 10 miesięcy temu
package.json 6e512b8ce6 aaaa 10 miesięcy temu

README.md

WithRequired type

This package defines the TypeScript utility type WithRequired. It transforms a type that has one or more optional fields into a type where those fields are required.

For example:

import { WithRequired } from '@apollo/utils.withrequired';

interface HasSomeOptionals {
    foo: number;
    bar?: string;
    baz?: boolean;
    quux?: string;
}

type MoreRequired = WithRequired<HasSomeOptions, 'bar' | 'baz'>;

The MoreRequired type is like HasSomeOptionals, but bar and baz are now required rather than optional. quux remains optional.