Essentially I want to ensure that an object argument contains all of the required properties, but can contain any other properties it wants. For example:
function foo(bar: { baz: number }) : number {
return bar.baz;
}
foo({ baz: 1, other: 2 });
But this results in:
Object literal may only specify known properties, and 'other' does not exist in type '{ baz: number; }'.