-
Notifications
You must be signed in to change notification settings - Fork 222
Open
Description
Description
In v6.17.8, the following lines were added at the end of index.d.ts:
declare const appsFlyer: any; // Type is defined in declare module above
export { appsFlyer as default };This overrides the properly typed appsFlyer object from inside the declare module "react-native-appsflyer" block with any, which causes all method calls to fail strict TypeScript/ESLint rules like:
@typescript-eslint/no-unsafe-call@typescript-eslint/no-unsafe-member-access@typescript-eslint/no-unsafe-assignment
Expected Behavior
The default export should retain the proper types defined in the module declaration, as it did in v6.17.7.
Reproduction
import appsFlyer from 'react-native-appsflyer';
// In 6.17.7: appsFlyer is properly typed
// In 6.17.8: appsFlyer is `any`, causing lint errors
appsFlyer.initSdk({ devKey: 'xxx', appId: 'yyy' }); // ESLint: Unsafe call of an `any` typed valueSuggested Fix
Remove the ambient declaration that overrides the typed export:
- declare const appsFlyer: any; // Type is defined in declare module above
- export { appsFlyer as default };Or properly type it:
import appsFlyer from 'react-native-appsflyer';
export { appsFlyer as default };Environment
- react-native-appsflyer: 6.17.8
- TypeScript: 5.9.3
- ESLint with @typescript-eslint strict rules
destpat and LcsGrz
Metadata
Metadata
Assignees
Labels
No labels