UNPKG

709 BPlain TextView Raw
1import * as FileSystem from './FileSystem';
2export * from './FileSystem';
3
4declare var module: any;
5
6if (module && module.exports) {
7 let wasImportWarningShown = false;
8 // @ts-ignore: Temporarily define an export named "FileSystem" for legacy compatibility
9 Object.defineProperty(module.exports, 'FileSystem', {
10 get() {
11 if (!wasImportWarningShown) {
12 console.warn(
13 `The syntax "import { FileSystem } from 'expo-file-system'" is deprecated. Use "import * as FileSystem from 'expo-file-system'" or import named exports instead. Support for the old syntax will be removed in SDK 34.`
14 );
15 wasImportWarningShown = true;
16 }
17 return FileSystem;
18 },
19 });
20}