Skip to content

Commit

Permalink
Fix code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihanChen-MSFT committed Dec 12, 2022
1 parent a319914 commit 49c8252
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function translateTypeAnnotation(
);
if (indexers.length > 0) {
// check the property type to prevent developers from using unsupported types
// the return value from `translateTypeAnnotation` is unused
const propertyType = indexers[0].value;
translateTypeAnnotation(
hasteModuleName,
Expand Down Expand Up @@ -259,8 +260,9 @@ function translateTypeAnnotation(
case 'MixedTypeAnnotation': {
if (cxxOnly) {
return emitMixed(nullable);
} else {
return emitObject(nullable);
}
// Fallthrough
}
default: {
throw new UnsupportedTypeAnnotationParserError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ function translateTypeAnnotation(
);
if (indexSignatures.length > 0) {
// check the property type to prevent developers from using unsupported types
// the return value from `translateTypeAnnotation` is unused
const propertyType = indexSignatures[0].typeAnnotation;
translateTypeAnnotation(
hasteModuleName,
Expand Down

0 comments on commit 49c8252

Please sign in to comment.