Source has X element(s) but target allows only 1

I had the same problem. The braces have to go after the type:

const FooMapping: [{id: FooOperation, display: string}] 

should be

const FooMapping: {id: FooOperation, display: string}[] 

Easy way to remember this is to replace the object with a type and see if it makes sense:

[string] doesn’t work but string[] does

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)