Fairly new to Typescript and Im getting this error about missing properties when delcaring an array of string. Any help would really be appreciated.
1 Answer
I guess you missed ()
at the end. Please use below line to get persons:
const persons:any[] = await sp.web.lists.getByTitle("Persons").items.select("PersonName","Id").orderBy("PersonName", true)();
-
Tried that and now get Type 'Promise<any[]>' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more Commented Jul 22 at 11:21
-