I have a interface consisting of an object with a set of properties:
interface Foo {
prop1: string,
prop2: number,
prop3?: boolean,
prop4?: object
}
Is there a way to construct a new type Bar
that only contains the optional properties of Foo
, but with each property being required like:
inteface Bar {
prop3: boolean,
prop4: object
}
Thanks.