Skip to content

Commit

Permalink
Add patches for type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Oct 29, 2024
1 parent 4358c2e commit 50be77f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
16 changes: 16 additions & 0 deletions patches/expo-image-manipulator+13.0.0+002+fix-type-exports.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/node_modules/expo-image-manipulator/src/index.ts b/node_modules/expo-image-manipulator/src/index.ts
index 65e63fb..9613c39 100644
--- a/node_modules/expo-image-manipulator/src/index.ts
+++ b/node_modules/expo-image-manipulator/src/index.ts
@@ -1,9 +1,9 @@
export { ImageManipulator, manipulateAsync, useImageManipulator } from './ImageManipulator';

-export { SaveOptions, SaveFormat, ImageResult } from './ImageManipulator.types';
+export type { SaveOptions, SaveFormat, ImageResult } from './ImageManipulator.types';

// Export types that are deprecated as of SDK 52
-export {
+export type {
ActionResize,
ActionRotate,
FlipType,
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/node_modules/expo-modules-core/src/NativeModulesProxy.native.ts b/node_modules/expo-modules-core/src/NativeModulesProxy.native.ts
index 4f4244d..d378217 100644
--- a/node_modules/expo-modules-core/src/NativeModulesProxy.native.ts
+++ b/node_modules/expo-modules-core/src/NativeModulesProxy.native.ts
@@ -5,7 +5,7 @@

import { NativeModules } from 'react-native';

-import { ProxyNativeModule } from './NativeModulesProxy.types';
+import type { ProxyNativeModule } from './NativeModulesProxy.types';

const LegacyNativeProxy = NativeModules.NativeUnimoduleProxy;
// Fixes `cannot find name 'global'.` in tests
diff --git a/node_modules/expo-modules-core/src/NativeModulesProxy.ts b/node_modules/expo-modules-core/src/NativeModulesProxy.ts
index e0409ba..5eab9de 100644
--- a/node_modules/expo-modules-core/src/NativeModulesProxy.ts
+++ b/node_modules/expo-modules-core/src/NativeModulesProxy.ts
@@ -1,4 +1,4 @@
-import { ProxyNativeModule } from './NativeModulesProxy.types';
+import type { ProxyNativeModule } from './NativeModulesProxy.types';

// We default to an empty object shim wherever we don't have an environment-specific implementation

diff --git a/node_modules/expo-modules-core/src/index.ts b/node_modules/expo-modules-core/src/index.ts
index 944f46f..5cdb4af 100644
--- a/node_modules/expo-modules-core/src/index.ts
+++ b/node_modules/expo-modules-core/src/index.ts
@@ -2,7 +2,7 @@ import EventEmitter, { type EventSubscription } from './EventEmitter';
import { LegacyEventEmitter } from './LegacyEventEmitter';
import NativeModule from './NativeModule';
import NativeModulesProxy from './NativeModulesProxy';
-import { ProxyNativeModule } from './NativeModulesProxy.types';
+import type { ProxyNativeModule } from './NativeModulesProxy.types';
import { requireNativeViewManager } from './NativeViewManagerAdapter';
import Platform from './Platform';
import SharedObject from './SharedObject';

0 comments on commit 50be77f

Please sign in to comment.