Skip to content

Commit

Permalink
fix: android build and types.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ngocle2497 committed Nov 4, 2023
1 parent 3b86fa8 commit bd74375
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ android {
"**/libc++_shared.so",
"**/libfbjni.so",
"**/libreactnativejni.so",
"**/libcrypto.so",
"**/libjsi.so",
"**/libreact_nativemodule_core.so",
"**/libturbomodulejsijni.so",
Expand Down
12 changes: 10 additions & 2 deletions src/util/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,20 @@ module.exports.genTSType = (allKeys) => {
Object.keys(allKeys?.public ?? {}).forEach((key) => {
result += `\n ${key}: string;`;
});
result += '\n [key: string]: string;\n};\n\n';
if(!allKeys?.public) {
result += '\n [key: string]: string;\n};\n\n';
} else {
result += '\n};\n\n';
}
result += 'export type KeyTurboSecuredType = {';
Object.keys(allKeys?.secure ?? {}).forEach((key) => {
result += `\n ${key}: string;`;
});
result += '\n[key: string]: string;\n};\n';
if(!allKeys?.secure) {
result += '\n [key: string]: string;\n};\n\n';
} else {
result += '\n};\n\n';
}
fs.outputFileSync(path.join(SRC_PATH, 'type.ts'), result);
};

Expand Down

0 comments on commit bd74375

Please sign in to comment.