Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the example code from: ```ts if (ticket.id) { receiptIds.push(ticket.id); } ``` to ```ts if (ticket.status == "ok") { // doing this help with typescript error receiptIds.push(ticket.id) } ``` The typescript Error: ``` Property 'id' does not exist on type 'ExpoPushTicket'. Property 'id' does not exist on type 'ExpoPushErrorReceipt'. ``` this is due to the type being declare like this ```ts export type ExpoPushReceiptId = string; export type ExpoPushSuccessTicket = { status: 'ok'; id: ExpoPushReceiptId; }; export type ExpoPushErrorTicket = ExpoPushErrorReceipt; export type ExpoPushTicket = ExpoPushSuccessTicket | ExpoPushErrorTicket; ``` in `src/ExpoClient.ts`
- Loading branch information