-
Notifications
You must be signed in to change notification settings - Fork 30.4k
feat(react-native-appsflyer): complete definition #42158
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
feat(react-native-appsflyer): complete definition #42158
Conversation
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to react-native-appsflyer with its source on master. Comparison details 📊
|
@fabianlee1211 Thank you for submitting this PR! Because this is a new definition, a DefinitelyTyped maintainer will be reviewing this PR in the next few days once the Travis CI build passes. In the meantime, if the build fails or a merge conflict occurs, I'll let you know. Have a nice day! |
function setDeviceTrackingDisabled(isDeviceTrackingDisabled: boolean, success?: SuccessCallback): void; | ||
} | ||
|
||
export default appsFlyer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar at all with what exporting a default namespace is supposed to do (I didn't think it was even supported). Can you help me out? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be honest that I'm not an expert in TS, I referenced other libraries here and came up with writing it this way.
The way I think of it was to follow how the library is implemented, which is just a bunch of methods attached to a JS object. I was trying to do the same with namespace so that it follows how the library APIs are used i.e appsFlyer.<method>
.
Thanks for reviewing though! I'm learning along the way.
About supporting export default namespace
, I suppose it is related to this PR.
microsoft/TypeScript#18628
Please fill in this template.
npm test
.)npm run lint package-name
(ortsc
if notslint.json
is present).Select one of these and delete the others:
If adding a new definition:
.d.ts
files generated via--declaration
dts-gen --dt
, not by basing it on an existing project.tslint.json
should be present and it shouldn't have any additional or disabling of rules. Just content as{ "extends": "dtslint/dt.json" }
. If for reason the some rule need to be disabled, disable it for that line using// tslint:disable-next-line [ruleName]
and not for whole package so that the need for disabling can be reviewed.tsconfig.json
should havenoImplicitAny
,noImplicitThis
,strictNullChecks
, andstrictFunctionTypes
set totrue
.Hello there,
This is a package definition for React Native AppsFlyer.
Package: https://www.npmjs.com/package/react-native-appsflyer
Source: https://github.com/AppsFlyerSDK/react-native-appsflyer
Cheers!