Skip to content

6.17.8: Default export typed as any breaks strict TypeScript/ESLint #670

@manticarodrigo

Description

@manticarodrigo

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 value

Suggested 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions