Skip to content

Commit

Permalink
use parser.nameForGenericTypeAnnotation()
Browse files Browse the repository at this point in the history
avoids ternary :)

Co-authored-by: Riccardo Cipolleschi <[email protected]>
  • Loading branch information
Pranav-yadav and cipolleschi committed Mar 16, 2023
1 parent 983116c commit 4360da4
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,7 @@ function emitCommonTypes(
parser: Parser,
): $FlowFixMe {
const typeAnnotationType =
parser.language() === 'TypeScript'
? typeAnnotation.type
: typeAnnotation.id.name;
const typeAnnotationType = parser.nameForGenericTypeAnnotation()

switch (typeAnnotationType) {
case 'Stringish': {
Expand Down

0 comments on commit 4360da4

Please sign in to comment.