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 moreChris McCarthy– Chris McCarthy2024-07-22 11:21:47 +00:00Commented Jul 22, 2024 at 11:21
-
Can you please share the whole method in your question?Dikesh Gandhi– Dikesh Gandhi2024-07-22 15:29:21 +00:00Commented Jul 22, 2024 at 15:29
