forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Expensify#26749 from software-mansion-labs/ts-migr…
…ation/kowczarz/clear-cache-lib [No QA] [TS Migration] Migrate 'clearCache' lib to TypeScript
- Loading branch information
Showing
5 changed files
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {CachesDirectoryPath, unlink} from 'react-native-fs'; | ||
import ClearCache from './types'; | ||
|
||
// `unlink` is used to delete the caches directory | ||
const clearStorage: ClearCache = () => unlink(CachesDirectoryPath); | ||
|
||
export default clearStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import ClearCache from './types'; | ||
|
||
const clearStorage: ClearCache = () => new Promise<void>((res) => res()); | ||
|
||
export default clearStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type ClearCache = () => Promise<void>; | ||
|
||
export default ClearCache; |