Since you're doing an object literal, the colon is used to divide the key from the value (ie, it has its normal javascript meaning, not its typescript meaning). As a result, trying to set the type the way you're doing is causing an error.
There are a few ways you could do what you want. You could set the type using the as keyword:
this.state = { orders: undefined as orderItem[] };
or with an empty array:
this.state = { orders: [] as orderItem[] };
Or you could create something ahead of time, and then insert that into the object:
let myOrders: orderItem[] = []; this.state = { orders: myOrders };
Or you could have a separate interface for the state and use that:
interface myState { orders: orderItem[] } class myClass { private state: myState; constructor () { this.state = { orders: undefined } } }