-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Paystack Typescript import not constructable #4
Comments
Hi @orimdominic, thanks for providing context on this bug. I'll try to replicate it on my end and get back to you |
Hi @orimdominic I've been able to replicate the bug. We'll work on a fix and push it out as soon as possible. |
@orimdominic we've just published the fix to this issue in PR #6. Kindly upgrade to v1.0.1 and try again. You might get an error about the resource (e.g transaction) not being a type of |
Hey @waptik I somehow missed this. Are you still getting this error? Should the issue be reopened? |
Yes ooo, i am still getting that error. I think it should be reopened since it occurs at the import level |
Can you share what your |
Bumping this up again.... I still have this issue despite using the v1.0.1 This is what my tsconfig looks like
|
Sincere apologies for the delay here. Q1 planning and setting up for the year pushed this further down the backlog. However, it's been prioritised now and we'll push a permanent fix in early Q2. |
Hi, are there still any plans to fix this issue? |
Hello @damilola-paystack Is there any resolution on this? Editor: VSCode 1.82.1
|
almost two years and still not fixed |
Hey folks, apologizing right now is literally rubbing salt on injury. For some reason, the notifications from this thread wasn't getting to our internal tool. I've assigned the issue to myself and will pick up work on it. |
Hi @ogheneovo12 @orimdominic @R4heem-Orekoya @daudujohn thanks for the patience so far. A beta release has been published, which can be gotten by running: Kindly help test and share your feedback. PS: We've now switched to named export which means you'd now need to use curly braces to access the Paystack class i.e.
Looking forward to your feedback. |
Hello @damilola-paystack, I have tested this with import { Paystack } from '@paystack/paystack-sdk'
const p = new Paystack("you-cant-see-me")
p. // no suggestions for methods like `charge` and `customer` |
Thanks for the feedback @orimdominic. Yeah, I noticed the types aren't built after compilation. This is being looked into but we want to ensure the SDK is stable and usable first. |
@damilola-paystack I tested with when initializing the paystack object. Here is a code snippet
|
Hey @steve-jr it seems you didn't complete typing out your feedback. Can you try update so we understand what the issue is? |
@damilola-paystack It is updated now. |
This is strange @steve-jr. I tried replicating to no avail. Can you try making a direct API call in the same project without using the library? |
Hi! try out this package. It's not yet a major release but it supports typescript and other JavaScript runtime like bun and Deno https://www.npmjs.com/package/@gray-adeyi/paystack-sdk |
@gray-adeyi/paystack-sdk 0.2.4 release is now available with even better type support 🔥 https://www.npmjs.com/package/@gray-adeyi/paystack-sdk |
Describe the bug
Cannot construct object from Paystack import after following documentation
To Reproduce
Steps to reproduce the behavior:
@paystack/paystack-sdk
Expected behavior
There should be no errors and the returned object from the
Paystack
constructor should have autocomplete suggestionsScreenshots
Additional context
Editor: VSCode
Node.js version: v16.17.1
Typescript version: ^4.7.4
The text was updated successfully, but these errors were encountered: