Skip to content

Commit bd74375

Browse files
committed
fix: android build and types.ts
1 parent 3b86fa8 commit bd74375

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ android {
156156
"**/libc++_shared.so",
157157
"**/libfbjni.so",
158158
"**/libreactnativejni.so",
159+
"**/libcrypto.so",
159160
"**/libjsi.so",
160161
"**/libreact_nativemodule_core.so",
161162
"**/libturbomodulejsijni.so",

src/util/common.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,20 @@ module.exports.genTSType = (allKeys) => {
7070
Object.keys(allKeys?.public ?? {}).forEach((key) => {
7171
result += `\n ${key}: string;`;
7272
});
73-
result += '\n [key: string]: string;\n};\n\n';
73+
if(!allKeys?.public) {
74+
result += '\n [key: string]: string;\n};\n\n';
75+
} else {
76+
result += '\n};\n\n';
77+
}
7478
result += 'export type KeyTurboSecuredType = {';
7579
Object.keys(allKeys?.secure ?? {}).forEach((key) => {
7680
result += `\n ${key}: string;`;
7781
});
78-
result += '\n[key: string]: string;\n};\n';
82+
if(!allKeys?.secure) {
83+
result += '\n [key: string]: string;\n};\n\n';
84+
} else {
85+
result += '\n};\n\n';
86+
}
7987
fs.outputFileSync(path.join(SRC_PATH, 'type.ts'), result);
8088
};
8189

0 commit comments

Comments
 (0)