Skip to content

Commit

Permalink
fix: remove annoying logs (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
miku1958 authored Mar 6, 2024
1 parent 6cd972e commit b39559a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-gyb",
"version": "0.10.0",
"version": "0.10.1",
"description": "Generate Native API based on TS interface",
"repository": {
"type": "git",
Expand Down
10 changes: 9 additions & 1 deletion src/generator/named-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,13 @@ function recursiveVisitMembersType(
return;
}

console.log(`Unhandled value type ${JSON.stringify(valueType)}`);
if (valueType.kind === ValueTypeKind.basicType) {
// string, boolean, etc.
return;
}
if (valueType.kind === ValueTypeKind.predefinedType) {
// CodeGen_Int, etc.
return;
}
throw Error(`Unhandled value type ${JSON.stringify(valueType)}`);
}

0 comments on commit b39559a

Please sign in to comment.