Skip to content

Commit

Permalink
fix: invalid module name in augmentation (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored May 18, 2022
1 parent 142fc06 commit db28513
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions jest/async-storage-mock.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {
AsyncStorageHook,
AsyncStorageStatic,
} from '../lib/typescript/types';

export function useAsyncStorage(key: string): AsyncStorageHook;

declare const AsyncStorage: AsyncStorageStatic;
export default AsyncStorage;
9 changes: 0 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import AsyncStorage from './AsyncStorage';
import type { AsyncStorageHook, AsyncStorageStatic } from './types';

export { useAsyncStorage } from './hooks';
export type { AsyncStorageStatic } from './types';

export default AsyncStorage;

// @ts-ignore AsyncStorage mock module
declare module '@react-native-async-storage/async-storage/jest/async-storage-mock' {
export function useAsyncStorage(key: string): AsyncStorageHook;
const AsyncStorageLib: AsyncStorageStatic;
export default AsyncStorageLib;
}

0 comments on commit db28513

Please sign in to comment.