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

[ts-ast-viewer] Some invalid inputs print errors in AST factory panel #1523

Open
Andarist opened this issue Mar 16, 2024 · 0 comments
Open

Comments

@Andarist
Copy link

Describe the bug

Version: X.X.X

To Reproduce

Use the code below

type Mapped<T> = {
    []
}

To see the error like:

Something went wrong
TypeError: Cannot read properties of undefined (reading 'kind')

    at bpe (https://ts-ast-viewer.com/assets/index.561569ce.js:50:6354)
    at Z7 (https://ts-ast-viewer.com/assets/index.561569ce.js:50:5545)
    at div
    at https://ts-ast-viewer.com/assets/index.561569ce.js:44:38513
    at div
    at div
    at https://ts-ast-viewer.com/assets/index.561569ce.js:44:38690
    at div
    at https://ts-ast-viewer.com/assets/index.561569ce.js:44:38513
    at div

Expected behavior

It shouldn't crash. Other invalid inputs don't crash. For example:

type Mapped<T> = {
    []:
}
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