I was trying to run this sample code today in the Aurelia project, and VS2017 15.8.1 and the command line build are giving issues with the API service in ./ClientApp/app/components/contact/contactServce.ts:
ERROR in ./ClientApp/app/components/contacts/contactService.ts
(16,9): error TS2322: Type 'Promise<void | Contact[]>' is not assignable to type 'Promise<Contact[]>'.
fail: Microsoft.AspNetCore.NodeServices[0]
Type 'void | Contact[]' is not assignable to type 'Contact[]'.
fail: Microsoft.AspNetCore.NodeServices[0]
Type 'void' is not assignable to type 'Contact[]'.
ERROR in ./ClientApp/app/components/contacts/contactService.ts
(23,9): error TS2322: Type 'Promise<void | Contact>' is not assignable to type 'Promise<Contact>'.
fail: Microsoft.AspNetCore.NodeServices[0]
Type 'void | Contact' is not assignable to type 'Contact'.
fail: Microsoft.AspNetCore.NodeServices[0]
Type 'void' is not assignable to type 'Contact'.
ERROR in ./ClientApp/app/components/contacts/contactService.ts
(30,9): error TS2322: Type 'Promise<void | Contact>' is not assignable to type 'Promise<Contact>'.
And I'm so new to TS that I don't know how to being fixing this.
I was trying to run this sample code today in the Aurelia project, and VS2017 15.8.1 and the command line build are giving issues with the API service in ./ClientApp/app/components/contact/contactServce.ts:
And I'm so new to TS that I don't know how to being fixing this.