(protected readonly modelPath: string)
| 65 | protected asyncStorage: AsyncStorageStatic; |
| 66 | |
| 67 | constructor(protected readonly modelPath: string) { |
| 68 | if (modelPath == null || !modelPath) { |
| 69 | throw new Error('modelPath must not be null, undefined or empty.'); |
| 70 | } |
| 71 | this.keys = getModelKeys(this.modelPath); |
| 72 | |
| 73 | // We import this dynamically because it binds to a native library that |
| 74 | // needs to be installed by the user if they use this handler. We don't |
| 75 | // want users who are not using AsyncStorage to have to install this |
| 76 | // library. |
| 77 | this.asyncStorage = |
| 78 | // tslint:disable-next-line:no-require-imports |
| 79 | require('@react-native-async-storage/async-storage').default; |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Save model artifacts to AsyncStorage |
nothing calls this directly
no test coverage detected