Comments (21)
Yup merged it
from paypal-js.
Issue-Label Bot is automatically applying the label feature_request
to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
from paypal-js.
Hi, I'm interested in this. Never made typings for ts, sounds interesting!
from paypal-js.
Ah @ReazerDev beat me to it. If you need an extra hand lemme know.
from paypal-js.
No worries @claeusdev! If you're wanting to hack around w/ TypeScript, there are some other similar ones under these repos too! https://github.com/paypal/hacktoberfest/blob/main/README.md#repos
from paypal-js.
Wait, am I too eligible to get the socks?^^ I'm asking since I don't commit anything to this repo, but to DefinitelyTyped
from paypal-js.
@ReazerDev No problem! When you commit it to DefinitelyTyped, can you drop the link here?
from paypal-js.
DefinitelyTyped/DefinitelyTyped#48454
from paypal-js.
Has been merged :)
from paypal-js.
@ReazerDev wow, that was really fast 😸 Thanks! We have you down for some fancy socks. Have fun hacking :)
from paypal-js.
Nice :) Was a lot of fun, thank you. You too have fun^^
from paypal-js.
Am I getting an email regarding shipping information?
from paypal-js.
I was thinking the same thing. I'm not sure how to get your shipping info. We probably should've included a google form or thought that through.
Can you add your email to your GitHub profile real quick? Then you can take it down afterwards. Open to other ideas too. Or maybe I can DM you on Twitter or another way? Hmm... 🤔
from paypal-js.
My Twitter is: Reazer_Dev
from paypal-js.
@ReazerDev thanks so much for adding types for paypal-js to DefinitelyTyped! 👏
I was reviewing the PR and noticed a minor issue. The public api for paypal-js v1 is a single function loadScript()
and a string attribute named version
. The functions in utils.js are not publicly exported and should be removed from the typescript definitions. I could see how this is confusing since the paypal-js project lacks an index.js that clearly defines what is publicly exported.
Would you be up for sending a follow up PR to DefinitelyTyped to remove the types for the private functions? The types files should look like this:
// Type definitions for @paypal/paypal-js 1.0
// Project: https://github.com/paypal/paypal-js
// Definitions by: ReazerDev <https://github.com/ReazerDev>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface ScriptOptions {
// options here
}
export function loadScript(options: ScriptOptions): Promise<any>;
export const version: string;
from paypal-js.
@ReazerDev thanks so much for adding types for paypal-js to DefinitelyTyped! 👏
I was reviewing the PR and noticed a minor issue. The public api for paypal-js v1 is a single function
loadScript()
and a string attribute namedversion
. The functions in utils.js are not publicly exported and should be removed from the typescript definitions. I could see how this is confusing since the paypal-js project lacks an index.js that clearly defines what is publicly exported.Would you be up for sending a follow up PR to DefinitelyTyped to remove the types for the private functions? The types files should look like this:
// Type definitions for @paypal/paypal-js 1.0 // Project: https://github.com/paypal/paypal-js // Definitions by: ReazerDev <https://github.com/ReazerDev> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export interface ScriptOptions { // options here } export function loadScript(options: ScriptOptions): Promise<any>; export const version: string;
Oh yes, of course! Will do once I'm home!
from paypal-js.
Awesome! Thanks @ReazerDev!
Also, thanks for documenting all the scriptOptions
. I think you got almost all of them. Here's a list I have on my end of all the different available options. It's in React PropTypes, but it should help with identifying any missing ones.
"buyer-country": PropTypes.string,
"client-id": PropTypes.string.isRequired,
commit: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
components: PropTypes.string,
currency: PropTypes.string,
"data-csp-nonce": PropTypes.string,
"data-order-id": PropTypes.string,
"data-page-type": PropTypes.string,
"data-partner-attribution-id": PropTypes.string,
debug: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
"disable-funding": PropTypes.string,
"integration-date": PropTypes.string,
intent: PropTypes.string,
locale: PropTypes.string,
"merchant-id": PropTypes.string,
vault: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
from paypal-js.
DefinitelyTyped/DefinitelyTyped#48513
from paypal-js.
Great improvements @ReazerDev! Thanks for taking care of this so quickly. I approved the PR and it looks like you can merge it whenever you're ready: DefinitelyTyped/DefinitelyTyped#48513 (comment)
from paypal-js.
Thanks again @ReazerDev. I verified the types locally by installing @types/paypal__paypal-js
and it works great 😄
from paypal-js.
Great! Was fun working on it!
from paypal-js.
Related Issues (20)
- Buttons not showing on Nuxt.js with ssr enabled HOT 2
- TypeScript error: paypal.Buttons() is possibly undefined HOT 4
- [Feature] array of strings should be allowed for `enable-funding` and `disable-funding` HOT 1
- [Bug] Button Installment Period not working HOT 2
- Payment Method HOT 18
- [Bug] Styling, button (pill) corners become square on hover [Firefox] HOT 2
- The window.paypal global variable is not available. HOT 2
- PayPalApplePayError: accountlifecycleserv responded with no legal_country_code field HOT 3
- How to inject crossorigin="anonymous" in script tag when using loadScript HOT 3
- [Bug] CreateOrderRequestBody seems incorrectly typed HOT 2
- [Bug] Paypal Subscription Error : Billing Plan Override is not allowed due to insufficient permissions HOT 3
- [Bug] Border of PayPal button invisible on some resolutions HOT 2
- [Bug] Infinite loading screen on safari when setting up a subscription HOT 2
- [Bug] Button background changes to blue when pending transaction HOT 2
- [Bug] the paypal Frame flicker when use onClick to validate form HOT 7
- Type mismatch in lastest version of @paypal/paypal-js and @paypal/react-paypal-js HOT 1
- [Feature] CardFields types HOT 2
- [Feature] Feature request
- Paypal JS SDK not loading for some users HOT 1
- https://join.robinhood.com
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paypal-js.