Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add isBigint and isBigintLiteral() #1506

Open
mjperrone opened this issue Feb 14, 2024 · 1 comment
Open

add isBigint and isBigintLiteral() #1506

mjperrone opened this issue Feb 14, 2024 · 1 comment

Comments

@mjperrone
Copy link

mjperrone commented Feb 14, 2024

https://ts-morph.com/details/types#telling-type

If you see something that doesn't exist here and should (there's a lot missing), then please log an issue or submit a pull request.

Is your feature request related to a problem? Please describe.

I'd like to write some code that behaves differently when it encounters a bigint typed node.

Describe the solution you'd like

those type guard functions defined

This is a likely implementation, but I'm not sure I'd be able to get the surrounding work done adequately (docs, tests, build etc) so submitting this as an issue to ask for help.

  /**
   * Gets if this is a bigint literal type.
   */
  isBigIntLiteral(): this is Type<ts.BigIntLiteralType> {
    return this.#hasTypeFlag(TypeFlags.BigIntLiteral);
  }
@mjperrone
Copy link
Author

@dsherret is this something you would consider doing or giving advice on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant