Describe the bug
- Cant import
import { EBayApiError } from 'ebay-api/errors', seems to work but IDE shows error: TS2307: Cannot find module ebay-api/errors or its corresponding type declarations.
e instanceof EBayApiError is false
Code
import { EBayApiError } from 'ebay-api/errors'; // TS2307
try {
await useEbay()
.trading.EndItem({
ItemID: '123',
EndingReason: 'NotAvailable',
})
} catch (e) {
console.log(e instanceof EBayApiError); // false
}
Even tho the error throws EBayApiError: The auction has been closed.
expected data
- There should be only one export, e.g.
'ebay-api/errors' or 'ebay-api'
e instanceof EBayApiError should be true with that import
From what I see, it seems to be working with:
import { EBayApiError } from 'ebay-api/lib/errors';
Describe the bug
import { EBayApiError } from 'ebay-api/errors', seems to work but IDE shows error:TS2307: Cannot find module ebay-api/errors or its corresponding type declarations.e instanceof EBayApiErrorisfalseCode
Even tho the error throws
EBayApiError: The auction has been closed.expected data
'ebay-api/errors'or'ebay-api'e instanceof EBayApiErrorshould be true with that importFrom what I see, it seems to be working with:
import { EBayApiError } from 'ebay-api/lib/errors';