Check out my class and interface below:
export interface Foo{
numFoo: string
}
export class Blah{
constructor(
public numBlah: string,
public arrayOfFoos: Array<Foo>,
public idBlah: string
) { }
}
let numBlah: string = 'numBlah'
let arr: Array<Foo> =[{numFoo: '1'}]
let idBlah: string = 'id'
let blah = new Blah(numBlah, arr, idBlah)
I am trying to create a new instance of the Blah class by passing arguments directly instead of specifying the field names. However, I keep encountering an error. Can anyone help me figure out what is causing this issue?