Open geoche opened 3 years ago
I created a file named "decs.d.ts" in my root directory (RN 0.63):
declare module 'react-native-advertising-id' {
export const getAdvertisingId: () => Promise<{
advertisingId: string;
isLimitAdTrackingEnabled: boolean;
}>;
}
You might have to specify this file location in the include
property of your tsconfig.json
file.
After installation always have an error
TS7016: Could not find a declaration file for module 'react-native-advertising-id'. 'E:/Projects/application/node_modules/react-native-advertising-id/index.js' implicitly has an 'any' type. Try
npm install @types/react-native-advertising-id
if it exists or add a new declaration (.d.ts) file containingdeclare module 'react-native-advertising-id';
Already tried creating new externals.d.ts with module declaration, some configurations in tscofing. Nothing helped.
Any suggestions?
RN: 0.59.5 with Redux and TS