I want to add types to a function which should receive the items array of strings:
type Inputs = {
foo: string
items: string[];
};
const myFunction = (items: string[]) => {
//
}
The code above works but is there a way getting the types from the Inputs type? So something like:
const myFunction = (items: Inputs.items) => {
//
}