Skip to content

Commit

Permalink
fix(eslint-plugin): fix printing BigInt literal
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Mar 5, 2023
1 parent d022d8e commit 49e64cb
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -83,6 +83,12 @@ function describeLiteralType(type: ts.Type): string {
}

if (type.isLiteral()) {
if (typeof type.value === 'object') {
// Print ts.PseudoBigInt
return `${
type.value.negative ? '-' : ''
}${type.value.base10Value.toString()}n`;
}
return type.value.toString();
}

Expand Down

0 comments on commit 49e64cb

Please sign in to comment.