Assume I get from the api an object which looks like this:

```
{
  field1: null,
  field2: "foo",
  field3: 42,
  field4: {"a":"b"},
  field5: [1,2,3]
}

```

and I have a component that needs certain properties of the object, let's say field2 and field4.

Now, in reality, the data-object contains 100s of fields, and I have several components which always require a certain subset.

Is there any notation how I can pass down only the relevant fields?

What I mean:

```
type TMyData = {
      field1?: string;
      field2: string;
      field3: number;
      field4: object;
      field5: [number];
    }

type TMyDataPartial = {
      field2: string;
      field4: object;
    }

```

Main Component:

```
data: TMyData = await api.get("url");

return(
<ComponentA data={data} />
{/*more stuff*/}
);

```

and inside ComponentA I have

```
interface IProps {
  data: TMyDataPartial
}

const ComponentA = ( {data}: IProps ) => //stuff

```

This would clearly fail, since typescript-compiler tells the data type in my MyComponent differs from the one my ComponentA is expecting.