DonJayamanne/typescript-notebook

import is unavailable in the next cell

Opened this issue · 3 comments

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

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

image

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')

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