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

import is unavailable in the next cell #74

Open
samuelstroschein opened this issue Aug 27, 2022 · 3 comments
Open

import is unavailable in the next cell #74

samuelstroschein opened this issue Aug 27, 2022 · 3 comments

Comments

@samuelstroschein
Copy link

samuelstroschein commented Aug 27, 2022

Importing a package works as expected in the cell where the import is defined. However, typescript lints in following cells that the import is unavailable and upon execution, a crash occurs.

Related to #12?

image

@samuelstroschein
Copy link
Author

Assigning the import to a variable does not crash the following cell. TypeScript still complains though.

image

@samuelstroschein
Copy link
Author

The issue exists in multiple jupyter related repositories.

yunabe/tslab#56
microsoft/vscode#130000

A workaround is const tslab = require("tslab") as typeof import('tslab')

@DonJayamanne
Copy link
Owner

thanks for filling this issue, and sorry You're thinking into this.
unfortunately this is a bug in the typescript language server.
they don't support notebooks

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

2 participants