I have a bunch of code in my typescript codebase like this...
export interface SomeType {
name: string;
}
export interface SomeComposedType {
things: [SomeType];
}
This has been working fine but then I started running into issues with
Property '0' is missing in type
and
Argument of type 'SomeType[]' is not assignable to parameter of type '[SomeType]'
I'm really confused about this now. I'm pretty sure that
let x:SomeType[] = []
is equivalent to
let x: Array<SomeType> = []
but is
let x:[SomeType] = []
also equivalent and correct?