Skip to content

Commit db28513

Browse files
authored
fix: invalid module name in augmentation (#805)
1 parent 142fc06 commit db28513

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

jest/async-storage-mock.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type {
2+
AsyncStorageHook,
3+
AsyncStorageStatic,
4+
} from '../lib/typescript/types';
5+
6+
export function useAsyncStorage(key: string): AsyncStorageHook;
7+
8+
declare const AsyncStorage: AsyncStorageStatic;
9+
export default AsyncStorage;

src/index.ts

-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
import AsyncStorage from './AsyncStorage';
2-
import type { AsyncStorageHook, AsyncStorageStatic } from './types';
32

43
export { useAsyncStorage } from './hooks';
5-
export type { AsyncStorageStatic } from './types';
64

75
export default AsyncStorage;
8-
9-
// @ts-ignore AsyncStorage mock module
10-
declare module '@react-native-async-storage/async-storage/jest/async-storage-mock' {
11-
export function useAsyncStorage(key: string): AsyncStorageHook;
12-
const AsyncStorageLib: AsyncStorageStatic;
13-
export default AsyncStorageLib;
14-
}

0 commit comments

Comments
 (0)