@adapty/react-native-ui
Version:
Extension to the Adapty SDK that allows you to easily add purchase screens to your application.
28 lines (23 loc) • 680 B
text/typescript
import {
NativeRequestHandler,
ParamMap as GenericParamMap,
} from 'react-native-adapty/dist/native-request-handler';
import type { MethodName, ParamKey } from './types/bridge';
/**
* Name of bridge package
* React Native looks for a module with provided name
* via NativeModules API
*
* Must be the same as string:
* - iOS: RNAdapty.m & RNAdapty.swift. Also match in RCT_EXTERN_MODULE
* - Android: AdaptyReactModule.kt (getName)
*/
export const MODULE_NAME = 'RNAUICallHandler';
export class ParamMap extends GenericParamMap<ParamKey> {
constructor() {
super();
}
}
export const $bridge = new NativeRequestHandler<MethodName, ParamMap>(
MODULE_NAME,
);