I am currently working on creating a function that requires one property as an argument, but could potentially have additional properties as well. Here is an example:
interface Foo {
bar: string;
}
function someFunc(obj) {
// implement functionality here
}
someFunc({bar: 'test', biff: 'test2'})
The obj
parameter passed into the someFunc
function may contain any number of properties, but it must always include the bar
property.