1

Fairly new to Typescript and Im getting this error about missing properties when delcaring an array of string. Any help would really be appreciated.

enter image description here

1
  • Can you please share your whole method in your question? Commented Jul 22 at 15:30

1 Answer 1

0

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)();
2
  • 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
  • Can you please share the whole method in your question? Commented Jul 22 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.