Node-v3
Node-v3 copied to clipboard
Typescript support
Typescript support is needed for the module flutterwave-node-v3
+1
+1
@Marcosmaliki @teyalite I had a similar issue, I gave a response here on how i was able to use it without types definition
Hello @teyalite @Marcosmaliki @nejos97
Thank you for sharing this feedback. We have plans to support TypeScript in the Library. We'd communicate to everyone once support for TS is available.
@opeolluwa Thank you very much for the workaround, We appreciate you helping others out 👍🏾.
@Corvus97 I have the intention of rewriting the SDK in typescript. I would like to know if the project already exist in development or I can just start on a fresh plate
@Corvus97 Thanks for letting us know about the plans to support TS. Can you give us a timeline? I for one wants to build a library that is dependent on this feature :pray:
@opeolluwa You don't have to rewrite the SDK in TS. You can write the Types definition instead. We could write it together. Let me know if you're interested.
I'll check through the requirements of add type definition to a package and let you know
@orimdominic, I've checked through. It would be awesome to work together, let me know when the plans are
@opeolluwa I'll chat you up on LinkedIn and we shoot from there :raised_hands:
Hello @teyalite @Marcosmaliki @nejos97
Thank you for sharing this feedback. We have plans to support TypeScript in the Library. We'd communicate to everyone once support for TS is available.
@opeolluwa Thank you very much for the workaround, We appreciate you helping others out 👍🏾.
I can work on this but will you merge it if I open a PR? I don't want to waste my time to work on something that will not be merged
Hello @orimdominic @opeolluwa @iamsethsamuel
We welcome contributions from the community. Any pull request made would be subject to the guidelines outlined here. If they are acceptable, we would merge after a 48-hour review.
You can reach out on Slack or email if you have any questions regarding contributing to this library.
@Corvus97 Thank you
I would like to suggest that a branch should be created for this so that all changes to this end would be merged to and compared against. This would help prevent merging code to work that already exists on the main branch. It would also help in managing reviews. When the work is complete, it can then be merged to the main branch.
I also suggest a step-wise procedure for converting the codebase to TS, with explanations.
-
Convert in loose mode Here we convert all JS files to TS, allow implicit anys (loose types, no types) and set types for primitive identifiers
-
Forbid implicit anys We set the
noImplicitAny
tsconfig setting totrue
to prohibit all untyped identifiers and add types for semi-complex identifiers -
Enable strict mode We enable strict mode and make sure that all identifiers are typed
-
Prepare library for use Here we set up tsconfig to allow for non-breaking changes and well-typed use when clients install it from npm.
Kindly share your thoughts about this
@orimdominic, Sounds like a plan to me
@orimdominic, Sounds like a plan to me Thank you
Let us hear what the Flutterwave engineering team has to say
I am already working on it on this PR https://github.com/Flutterwave/Node/pull/85
Hello Flutterwave devs. Up to today, No types yet. It's very difficult working without types (No difference with using HTTP request).
It there any plan of adding TypeScript ???
1year now TS support not manifest
@corneliusyaovi please you guys should do something about this, please. It's really annoying.
@iamsethsamuel @orimdominic @opeolluwa how were you guys able to resolve this issue.
@Marcosmaliki @teyalite I had a similar issue, I gave a response here on how i was able to use it without types definition
@Mishael-Joe
I can start working on this later this week or next week, fear is would the team review and merge it
I can start working on this later this week or next week, fear is would the team review and merge it
I have tried this too, it's not working, it's throwing syntax error: package is a reserved name. And it's keeps breaking my code. Any help please?
Would you like to mail me your mobile number, [email protected] let's have a meet call, perhaps we can fix it.
I can start working on this later this week or next week, fear is would the team review and merge it
I have tried this too, it's not working, it's throwing syntax error: package is a reserved name. And it's keeps breaking my code. Any help please?
Here is the full error message:
I have been getting this error whenever I tried bundling the flutterwave_node_vs package and then on further research, I found out that the flutterwave_node_v3 package uses javascript-reserved words. and thus the error. here was the error when bundling with rollup
[!] (plugin commonjs--resolver) SyntaxError: The keyword 'package' is reserved (4:6) in C:\Users\name\Desktop\elias\repo\repo\node_modules\flutterwave-node-v3\services\banks\rave.banks-branches.js
2: const q = require('q');
3: const axios = require('axios');
4: const package = require('../../package.json');
^
5:
6: const spec = morx.spec()
SyntaxError: The keyword 'package' is reserved (4:6) in C:\Users\computer name\Desktop\name\name\name\node_modules\flutterwave-node-v3\services\beneficiaries\rave.create.js
Would you like to mail me your mobile number, [email protected] let's have a meet call, perhaps we can fix it.
Great idea, I love it.
@corneliusyaovi please you guys should do something about this, please. It's really annoying.
@iamsethsamuel @orimdominic @opeolluwa how were you guys able to resolve this issue.
I rewrote the library with Typescript and opened a PR. But it seems like Flutterwave really don't want to support typescript so I uploaded the Typescript version to NPM
Here is the link https://www.npmjs.com/package/flutterwave-node-v3-withtypes
I can start working on this later this week or next week, fear is would the team review and merge it
They won't
I have tried this too, it's not working, it's throwing syntax error: package is a reserved name. And it's keeps breaking my code. Any help please?
Here is the full error message:
I have been getting this error whenever I tried bundling the flutterwave_node_vs package and then on further research, I found out that the flutterwave_node_v3 package uses javascript-reserved words. and thus the error. here was the error when bundling with rollup
[!] (plugin commonjs--resolver) SyntaxError: The keyword 'package' is reserved (4:6) in C:\Users\name\Desktop\elias\repo\repo\node_modules\flutterwave-node-v3\services\banks\rave.banks-branches.js 2: const q = require('q'); 3: const axios = require('axios'); 4: const package = require('../../package.json'); ^ 5: 6: const spec = morx.spec() SyntaxError: The keyword 'package' is reserved (4:6) in C:\Users\computer name\Desktop\name\name\name\node_modules\flutterwave-node-v3\services\beneficiaries\rave.create.js
@iamsethsamuel will the 'types' resolve this issue I'm facing? Can I use it?
@corneliusyaovi please you guys should do something about this, please. It's really annoying. @iamsethsamuel @orimdominic @opeolluwa how were you guys able to resolve this issue.
I rewrote the library with Typescript and opened a PR. But it seems like Flutterwave really don't want to support typescript so I uploaded the Typescript version to NPM
Here is the link https://www.npmjs.com/package/flutterwave-node-v3-withtypes
Wow, didn't even see this. Thanks for saving me a lot of stress - apparently I had already begun working on adding types to the library.
Sad to see that adding Typescript support isn't a major concern for the Flutterwave Team.
I have tried this too, it's not working, it's throwing syntax error: package is a reserved name. And it's keeps breaking my code. Any help please?
Here is the full error message: I have been getting this error whenever I tried bundling the flutterwave_node_vs package and then on further research, I found out that the flutterwave_node_v3 package uses javascript-reserved words. and thus the error. here was the error when bundling with rollup
[!] (plugin commonjs--resolver) SyntaxError: The keyword 'package' is reserved (4:6) in C:\Users\name\Desktop\elias\repo\repo\node_modules\flutterwave-node-v3\services\banks\rave.banks-branches.js 2: const q = require('q'); 3: const axios = require('axios'); 4: const package = require('../../package.json'); ^ 5: 6: const spec = morx.spec() SyntaxError: The keyword 'package' is reserved (4:6) in C:\Users\computer name\Desktop\name\name\name\node_modules\flutterwave-node-v3\services\beneficiaries\rave.create.js
@iamsethsamuel will the 'types' resolve this issue I'm facing? Can I use it?
Most likely. Try the version with types here flutterwave-node-v3-withtypes