File tree Expand file tree Collapse file tree 3 files changed +28
-12
lines changed
packages/default-storage/harmony/async_storage Expand file tree Collapse file tree 3 files changed +28
-12
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
+ */
4
+ export const HAR_VERSION = '1.21.0-0.1.7';
5
+ export const BUILD_MODE_NAME = 'debug';
6
+ export const DEBUG = true;
7
+ export const TARGET_NAME = 'default';
8
+
9
+ /**
10
+ * BuildProfile Class is used only for compatibility purposes.
11
+ */
12
+ export default class BuildProfile {
13
+ static readonly HAR_VERSION = HAR_VERSION;
14
+ static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
15
+ static readonly DEBUG = DEBUG;
16
+ static readonly TARGET_NAME = TARGET_NAME;
17
+ }
Original file line number Diff line number Diff line change 22
22
* SOFTWARE.
23
23
*/
24
24
25
- import { RNPackage , TurboModulesFactory } from '@rnoh/react-native-openharmony/ts' ;
26
- import type { TurboModule , TurboModuleContext } from '@rnoh/react-native-openharmony/ts' ;
25
+ import { RNPackage , WorkerTurboModuleFactory } from '@rnoh/react-native-openharmony/ts' ;
26
+ import type { WorkerTurboModule , WorkerTurboModuleContext } from '@rnoh/react-native-openharmony/ts' ;
27
27
import { AsyncStorageTurboModule } from './AsyncStorageTurboModule' ;
28
28
29
- class AsyncStorageTurboModulesFactory extends TurboModulesFactory {
29
+ class AsyncStorageTurboModulesFactory extends WorkerTurboModuleFactory {
30
30
31
- createTurboModule ( name : string ) : TurboModule | null {
31
+ createTurboModule ( name : string ) : WorkerTurboModule | null {
32
32
if ( name === 'RNCAsyncStorage' ) {
33
33
return new AsyncStorageTurboModule ( this . ctx ) ;
34
34
}
@@ -41,7 +41,7 @@ class AsyncStorageTurboModulesFactory extends TurboModulesFactory {
41
41
}
42
42
43
43
export class AsyncStoragePackage extends RNPackage {
44
- createTurboModulesFactory ( ctx : TurboModuleContext ) : TurboModulesFactory {
44
+ createWorkerTurboModuleFactory ( ctx : WorkerTurboModuleContext ) : WorkerTurboModuleFactory {
45
45
return new AsyncStorageTurboModulesFactory ( ctx ) ;
46
46
}
47
47
}
Original file line number Diff line number Diff line change 22
22
* SOFTWARE.
23
23
*/
24
24
25
- import relationalStore from '@ohos.data.relationalStore'
26
- import taskpool from '@ohos.taskpool' ;
27
- import { TurboModule , TurboModuleContext } from '@rnoh/react-native-openharmony/ts' ;
25
+ import relationalStore from '@ohos.data.relationalStore' ;
26
+ import { WorkerTurboModule , WorkerTurboModuleContext } from '@rnoh/react-native-openharmony/ts' ;
28
27
import ReactDatabaseSupplier from './ReactDatabaseSupplier' ;
29
28
import AsyncStorageErrorUtil from './AsyncStorageErrorUtil' ;
30
29
import Logger from './Logger' ;
31
- import CommonConstants from './CommonConstants'
30
+ import CommonConstants from './CommonConstants' ;
32
31
import AsyncLocalStorageUtil from './AsyncLocalStorageUtil' ;
33
- import AsyncLocker from './AsyncLocker'
32
+ import AsyncLocker from './AsyncLocker' ;
34
33
35
34
const MAX_SQL_KEYS = 999 ;
36
35
37
- export class AsyncStorageTurboModule extends TurboModule {
36
+ export class AsyncStorageTurboModule extends WorkerTurboModule {
38
37
39
38
private table = new ReactDatabaseSupplier ( )
40
39
private lock : AsyncLocker = new AsyncLocker ( )
41
40
42
- constructor ( ctx : TurboModuleContext ) {
41
+ constructor ( ctx : WorkerTurboModuleContext ) {
43
42
super ( ctx ) ;
44
43
Logger . debug ( CommonConstants . TAG , `AsyncStorageTurboModule construct!` ) ;
45
44
this . table . initialRdbStore ( this . ctx . uiAbilityContext ) ;
You can’t perform that action at this time.
0 commit comments