If you’re looking to how to extract { name: string; test: number; }
type, you can simply create alias to “item at index”:
type Foo = Array<{ name: string; test: number; }>;
type FooItem = Foo[0];
or
type FooItem = Foo[number];
If you’re looking to how to extract { name: string; test: number; }
type, you can simply create alias to “item at index”:
type Foo = Array<{ name: string; test: number; }>;
type FooItem = Foo[0];
or
type FooItem = Foo[number];