expo-pay 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/.prettierrc +8 -0
  2. package/LICENSE +21 -0
  3. package/android/build.gradle +18 -0
  4. package/android/src/main/AndroidManifest.xml +2 -0
  5. package/android/src/main/java/expo/modules/pay/ExpoPayModule.kt +29 -0
  6. package/android/src/main/java/expo/modules/pay/ExpoPayView.kt +26 -0
  7. package/build/ExpoPay.types.d.ts +12 -0
  8. package/build/ExpoPay.types.d.ts.map +1 -0
  9. package/build/ExpoPay.types.js +2 -0
  10. package/build/ExpoPay.types.js.map +1 -0
  11. package/build/ExpoPayModule.d.ts +10 -0
  12. package/build/ExpoPayModule.d.ts.map +1 -0
  13. package/build/ExpoPayModule.js +3 -0
  14. package/build/ExpoPayModule.js.map +1 -0
  15. package/build/ExpoPayModule.web.d.ts +7 -0
  16. package/build/ExpoPayModule.web.d.ts.map +1 -0
  17. package/build/ExpoPayModule.web.js +6 -0
  18. package/build/ExpoPayModule.web.js.map +1 -0
  19. package/build/ExpoPayView.d.ts +4 -0
  20. package/build/ExpoPayView.d.ts.map +1 -0
  21. package/build/ExpoPayView.js +7 -0
  22. package/build/ExpoPayView.js.map +1 -0
  23. package/build/ExpoPayView.web.d.ts +3 -0
  24. package/build/ExpoPayView.web.d.ts.map +1 -0
  25. package/build/ExpoPayView.web.js +5 -0
  26. package/build/ExpoPayView.web.js.map +1 -0
  27. package/build/index.d.ts +4 -0
  28. package/build/index.d.ts.map +1 -0
  29. package/build/index.js +6 -0
  30. package/build/index.js.map +1 -0
  31. package/eslint.config.cjs +5 -0
  32. package/expo-module.config.json +6 -0
  33. package/package.json +55 -0
  34. package/src/ExpoPay.types.ts +15 -0
  35. package/src/ExpoPayModule.ts +11 -0
  36. package/src/ExpoPayModule.web.ts +8 -0
  37. package/src/ExpoPayView.tsx +10 -0
  38. package/src/ExpoPayView.web.tsx +6 -0
  39. package/src/index.ts +5 -0
  40. package/tsconfig.json +28 -0
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "printWidth": 100,
3
+ "tabWidth": 2,
4
+ "singleQuote": true,
5
+ "bracketSameLine": true,
6
+ "trailingComma": "es5",
7
+ "jsxSingleQuote": false,
8
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,18 @@
1
+ plugins {
2
+ id 'com.android.library'
3
+ id 'expo-module-gradle-plugin'
4
+ }
5
+
6
+ group = 'expo.modules.pay'
7
+ version = '0.1.0'
8
+
9
+ android {
10
+ namespace "expo.modules.pay"
11
+ defaultConfig {
12
+ versionCode 1
13
+ versionName "0.1.0"
14
+ }
15
+ lintOptions {
16
+ abortOnError false
17
+ }
18
+ }
@@ -0,0 +1,2 @@
1
+ <manifest>
2
+ </manifest>
@@ -0,0 +1,29 @@
1
+ package expo.modules.pay
2
+
3
+ import expo.modules.kotlin.modules.Module
4
+ import expo.modules.kotlin.modules.ModuleDefinition
5
+
6
+ class ExpoPayModule : Module() {
7
+ override fun definition() = ModuleDefinition {
8
+ Name("ExpoPay")
9
+
10
+ Events("onChange")
11
+
12
+ Constant("PI") {
13
+ Math.PI
14
+ }
15
+
16
+ Function("hello") {
17
+ "Hello world! 👋"
18
+ }
19
+
20
+ AsyncFunction("setValueAsync") { value: String ->
21
+ sendEvent("onChange", mapOf(
22
+ "value" to value
23
+ ))
24
+ }
25
+
26
+ View(ExpoPayView::class) {
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,26 @@
1
+ package expo.modules.pay
2
+
3
+ import android.content.Context
4
+ import android.graphics.Color
5
+ import android.view.Gravity
6
+ import android.widget.LinearLayout
7
+ import android.widget.TextView
8
+ import expo.modules.kotlin.AppContext
9
+ import expo.modules.kotlin.views.ExpoView
10
+
11
+ class ExpoPayView(context: Context, appContext: AppContext) : ExpoView(context, appContext) {
12
+ init {
13
+ val container = LinearLayout(context).apply {
14
+ layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
15
+ orientation = LinearLayout.VERTICAL
16
+ gravity = Gravity.CENTER
17
+ setBackgroundColor(Color.parseColor("#aabbcc"))
18
+ }
19
+ val label = TextView(context).apply {
20
+ text = "ExpoPay - native view"
21
+ gravity = Gravity.CENTER
22
+ }
23
+ container.addView(label)
24
+ addView(container)
25
+ }
26
+ }
@@ -0,0 +1,12 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native';
2
+ export type ExpoPayModuleEvents = {
3
+ onChange: (params: ChangeEventPayload) => void;
4
+ };
5
+ export type ChangeEventPayload = {
6
+ value: string;
7
+ };
8
+ export type OnTapEventPayload = Record<string, never>;
9
+ export type ExpoPayViewProps = {
10
+ style?: StyleProp<ViewStyle>;
11
+ };
12
+ //# sourceMappingURL=ExpoPay.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPay.types.d.ts","sourceRoot":"","sources":["../src/ExpoPay.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ExpoPay.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPay.types.js","sourceRoot":"","sources":["../src/ExpoPay.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nexport type ExpoPayModuleEvents = {\n onChange: (params: ChangeEventPayload) => void;\n};\n\nexport type ChangeEventPayload = {\n value: string;\n};\n\nexport type OnTapEventPayload = Record<string, never>;\n\nexport type ExpoPayViewProps = {\n style?: StyleProp<ViewStyle>;\n};\n"]}
@@ -0,0 +1,10 @@
1
+ import { NativeModule } from 'expo';
2
+ import { ExpoPayModuleEvents } from './ExpoPay.types';
3
+ declare class ExpoPayModule extends NativeModule<ExpoPayModuleEvents> {
4
+ PI: number;
5
+ hello(): string;
6
+ setValueAsync(value: string): Promise<void>;
7
+ }
8
+ declare const _default: ExpoPayModule;
9
+ export default _default;
10
+ //# sourceMappingURL=ExpoPayModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPayModule.d.ts","sourceRoot":"","sources":["../src/ExpoPayModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,OAAO,aAAc,SAAQ,YAAY,CAAC,mBAAmB,CAAC;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,IAAI,MAAM;IACf,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAC5C;;AAED,wBAA6D"}
@@ -0,0 +1,3 @@
1
+ import { requireNativeModule } from 'expo';
2
+ export default requireNativeModule('ExpoPay');
3
+ //# sourceMappingURL=ExpoPayModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPayModule.js","sourceRoot":"","sources":["../src/ExpoPayModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAUzD,eAAe,mBAAmB,CAAgB,SAAS,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo';\n\nimport { ExpoPayModuleEvents } from './ExpoPay.types';\n\ndeclare class ExpoPayModule extends NativeModule<ExpoPayModuleEvents> {\n PI: number;\n hello(): string;\n setValueAsync(value: string): Promise<void>;\n}\n\nexport default requireNativeModule<ExpoPayModule>('ExpoPay');\n"]}
@@ -0,0 +1,7 @@
1
+ import { NativeModule } from 'expo';
2
+ import { ExpoPayModuleEvents } from './ExpoPay.types';
3
+ declare class ExpoPayModule extends NativeModule<ExpoPayModuleEvents> {
4
+ }
5
+ declare const _default: typeof ExpoPayModule;
6
+ export default _default;
7
+ //# sourceMappingURL=ExpoPayModule.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPayModule.web.d.ts","sourceRoot":"","sources":["../src/ExpoPayModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAE,MAAM,MAAM,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,cAAM,aAAc,SAAQ,YAAY,CAAC,mBAAmB,CAAC;CAAG;;AAEhE,wBAAiE"}
@@ -0,0 +1,6 @@
1
+ import { registerWebModule, NativeModule } from 'expo';
2
+ // ExpoPayModule is not available on the web platform.
3
+ class ExpoPayModule extends NativeModule {
4
+ }
5
+ export default registerWebModule(ExpoPayModule, 'ExpoPayModule');
6
+ //# sourceMappingURL=ExpoPayModule.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPayModule.web.js","sourceRoot":"","sources":["../src/ExpoPayModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIvD,sDAAsD;AACtD,MAAM,aAAc,SAAQ,YAAiC;CAAG;AAEhE,eAAe,iBAAiB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import { registerWebModule, NativeModule } from 'expo';\n\nimport { ExpoPayModuleEvents } from './ExpoPay.types';\n\n// ExpoPayModule is not available on the web platform.\nclass ExpoPayModule extends NativeModule<ExpoPayModuleEvents> {}\n\nexport default registerWebModule(ExpoPayModule, 'ExpoPayModule');\n"]}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import { ExpoPayViewProps } from './ExpoPay.types';
3
+ export default function ExpoPayView(props: ExpoPayViewProps): React.JSX.Element;
4
+ //# sourceMappingURL=ExpoPayView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPayView.d.ts","sourceRoot":"","sources":["../src/ExpoPayView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAInD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAE1D"}
@@ -0,0 +1,7 @@
1
+ import { requireNativeView } from 'expo';
2
+ import * as React from 'react';
3
+ const NativeView = requireNativeView('ExpoPay');
4
+ export default function ExpoPayView(props) {
5
+ return <NativeView {...props}/>;
6
+ }
7
+ //# sourceMappingURL=ExpoPayView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPayView.js","sourceRoot":"","sources":["../src/ExpoPayView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,UAAU,GAA0C,iBAAiB,CAAC,SAAS,CAAC,CAAC;AAEvF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IACzD,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport * as React from 'react';\n\nimport { ExpoPayViewProps } from './ExpoPay.types';\n\nconst NativeView: React.ComponentType<ExpoPayViewProps> = requireNativeView('ExpoPay');\n\nexport default function ExpoPayView(props: ExpoPayViewProps) {\n return <NativeView {...props} />;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { ExpoPayViewProps } from './ExpoPay.types';
2
+ export default function ExpoPayView(_props: ExpoPayViewProps): void;
3
+ //# sourceMappingURL=ExpoPayView.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPayView.web.d.ts","sourceRoot":"","sources":["../src/ExpoPayView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAM,EAAE,gBAAgB,QAE3D"}
@@ -0,0 +1,5 @@
1
+ // ExpoPayView is not available on the web platform.
2
+ export default function ExpoPayView(_props) {
3
+ throw new Error('ExpoPayView is not available on the web platform.');
4
+ }
5
+ //# sourceMappingURL=ExpoPayView.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoPayView.web.js","sourceRoot":"","sources":["../src/ExpoPayView.web.tsx"],"names":[],"mappings":"AAEA,oDAAoD;AACpD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAwB;IAC1D,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { ExpoPayViewProps } from './ExpoPay.types';\n\n// ExpoPayView is not available on the web platform.\nexport default function ExpoPayView(_props: ExpoPayViewProps) {\n throw new Error('ExpoPayView is not available on the web platform.');\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export { default } from './ExpoPayModule';
2
+ export { default as ExpoPayView } from './ExpoPayView';
3
+ export * from './ExpoPay.types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAc,iBAAiB,CAAC"}
package/build/index.js ADDED
@@ -0,0 +1,6 @@
1
+ // Reexport the native module. On web, it will be resolved to ExpoPayModule.web.ts
2
+ // and on native platforms to ExpoPayModule.ts
3
+ export { default } from './ExpoPayModule';
4
+ export { default as ExpoPayView } from './ExpoPayView';
5
+ export * from './ExpoPay.types';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,8CAA8C;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAc,iBAAiB,CAAC","sourcesContent":["// Reexport the native module. On web, it will be resolved to ExpoPayModule.web.ts\n// and on native platforms to ExpoPayModule.ts\nexport { default } from './ExpoPayModule';\nexport { default as ExpoPayView } from './ExpoPayView';\nexport * from './ExpoPay.types';\n"]}
@@ -0,0 +1,5 @@
1
+ const { defineConfig } = require('eslint/config');
2
+ const universe = require('eslint-config-universe/flat/native');
3
+ const universeWeb = require('eslint-config-universe/flat/web');
4
+
5
+ module.exports = defineConfig([{ ignores: ['build'] }, ...universe, ...universeWeb]);
@@ -0,0 +1,6 @@
1
+ {
2
+ "platforms": ["android"],
3
+ "android": {
4
+ "modules": ["expo.modules.pay.ExpoPayModule"]
5
+ }
6
+ }
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "expo-pay",
3
+ "version": "0.1.1",
4
+ "description": "My new module",
5
+ "main": "build/index.js",
6
+ "types": "build/index.d.ts",
7
+ "scripts": {
8
+ "build": "node internal/module_scripts/build.js",
9
+ "clean": "node internal/module_scripts/clean.js",
10
+ "lint": "eslint src/",
11
+ "test": "node internal/module_scripts/test.js",
12
+ "prepare": "node internal/module_scripts/prepare.js",
13
+ "open:ios": "node internal/module_scripts/open-ios.js",
14
+ "open:android": "node internal/module_scripts/open-android.js"
15
+ },
16
+ "keywords": [
17
+ "react-native",
18
+ "expo",
19
+ "expo-pay",
20
+ "ExpoPay"
21
+ ],
22
+ "repository": "https://github.com/otariterterashvili/expo-pay",
23
+ "bugs": {
24
+ "url": "https://github.com/otariterterashvili/expo-pay/issues"
25
+ },
26
+ "author": "Otar Terterashvili <terterashviliotari@gmail.com> (https://github.com/otariterterashvili)",
27
+ "license": "MIT",
28
+ "homepage": "https://github.com/otariterterashvili/expo-pay#readme",
29
+ "dependencies": {},
30
+ "devDependencies": {
31
+ "@babel/core": "^7.26.0",
32
+ "@types/jest": "^29.2.1",
33
+ "@types/react": "~19.1.1",
34
+ "babel-preset-expo": "~55.0.8",
35
+ "eslint": "~9.39.4",
36
+ "eslint-config-universe": "^15.0.3",
37
+ "expo": "^56.0.11",
38
+ "jest": "^29.7.0",
39
+ "jest-expo": "~55.0.9",
40
+ "prettier": "^3.0.0",
41
+ "react-native": "0.82.1",
42
+ "typescript": "^5.9.2"
43
+ },
44
+ "jest": {
45
+ "preset": "jest-expo",
46
+ "roots": [
47
+ "<rootDir>/src"
48
+ ]
49
+ },
50
+ "peerDependencies": {
51
+ "expo": "*",
52
+ "react": "*",
53
+ "react-native": "*"
54
+ }
55
+ }
@@ -0,0 +1,15 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native';
2
+
3
+ export type ExpoPayModuleEvents = {
4
+ onChange: (params: ChangeEventPayload) => void;
5
+ };
6
+
7
+ export type ChangeEventPayload = {
8
+ value: string;
9
+ };
10
+
11
+ export type OnTapEventPayload = Record<string, never>;
12
+
13
+ export type ExpoPayViewProps = {
14
+ style?: StyleProp<ViewStyle>;
15
+ };
@@ -0,0 +1,11 @@
1
+ import { NativeModule, requireNativeModule } from 'expo';
2
+
3
+ import { ExpoPayModuleEvents } from './ExpoPay.types';
4
+
5
+ declare class ExpoPayModule extends NativeModule<ExpoPayModuleEvents> {
6
+ PI: number;
7
+ hello(): string;
8
+ setValueAsync(value: string): Promise<void>;
9
+ }
10
+
11
+ export default requireNativeModule<ExpoPayModule>('ExpoPay');
@@ -0,0 +1,8 @@
1
+ import { registerWebModule, NativeModule } from 'expo';
2
+
3
+ import { ExpoPayModuleEvents } from './ExpoPay.types';
4
+
5
+ // ExpoPayModule is not available on the web platform.
6
+ class ExpoPayModule extends NativeModule<ExpoPayModuleEvents> {}
7
+
8
+ export default registerWebModule(ExpoPayModule, 'ExpoPayModule');
@@ -0,0 +1,10 @@
1
+ import { requireNativeView } from 'expo';
2
+ import * as React from 'react';
3
+
4
+ import { ExpoPayViewProps } from './ExpoPay.types';
5
+
6
+ const NativeView: React.ComponentType<ExpoPayViewProps> = requireNativeView('ExpoPay');
7
+
8
+ export default function ExpoPayView(props: ExpoPayViewProps) {
9
+ return <NativeView {...props} />;
10
+ }
@@ -0,0 +1,6 @@
1
+ import { ExpoPayViewProps } from './ExpoPay.types';
2
+
3
+ // ExpoPayView is not available on the web platform.
4
+ export default function ExpoPayView(_props: ExpoPayViewProps) {
5
+ throw new Error('ExpoPayView is not available on the web platform.');
6
+ }
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ // Reexport the native module. On web, it will be resolved to ExpoPayModule.web.ts
2
+ // and on native platforms to ExpoPayModule.ts
3
+ export { default } from './ExpoPayModule';
4
+ export { default as ExpoPayView } from './ExpoPayView';
5
+ export * from './ExpoPay.types';
package/tsconfig.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["dom", "DOM.Iterable", "esnext"],
4
+ "types": ["jest"],
5
+ "typeRoots": ["./ts-declarations", "./node_modules/@types"],
6
+ "jsx": "react-native",
7
+ "target": "esnext",
8
+ "moduleResolution": "bundler",
9
+ "module": "esnext",
10
+ "moduleDetection": "force",
11
+ "esModuleInterop": true,
12
+ "sourceMap": true,
13
+ "declaration": true,
14
+ "declarationMap": true,
15
+ "inlineSources": true,
16
+ "skipLibCheck": true,
17
+ "strict": true,
18
+ "noFallthroughCasesInSwitch": true,
19
+ "noPropertyAccessFromIndexSignature": false,
20
+ "noImplicitReturns": true,
21
+ "noUnusedLocals": true,
22
+ "noUnusedParameters": false,
23
+ "rootDir": "./src",
24
+ "outDir": "./build"
25
+ },
26
+ "include": ["./src"],
27
+ "exclude": ["**/__mocks__/*", "**/__tests__/*"]
28
+ }