You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enums should be exported as values - not only as types.
// this works, but is badimport{typePaymentStatus}from'@stripe/terminal-js/pure'constbad=terminal.getPaymentStatus()===('waiting_for_input'asPaymentStatus)
// this throws error, but should workimport{PaymentStatus}from'@stripe/terminal-js/pure'constgood=terminal.getPaymentStatus()===PaymentStatus.WAITING_FOR_INPUT)// TypeError: Cannot read properties of undefined (reading 'WAITING_FOR_INPUT')
Summary
Enums should be exported as values - not only as types.
Other information
Small repo that should work, but throws error:
https://codesandbox.io/s/competent-cloud-xku665?file=/src/index.ts
The text was updated successfully, but these errors were encountered: