Skip to content

TypeScript cells do not handle imports correctly #87

@mbostock

Description

@mbostock

It appears that the TypeScript transpiler is implicitly stripping unused imports (even though they are in fact “used” because the code will be rewritten to expose the imported symbols as top-level variables). Also, by default it appears to generate a CommonJS module, or something. So this:

import {foo} from "npm:bar";

Is being converted into this:

export {};

When it shouldn’t be changed at all. I suspect we are passing the wrong arguments to transpile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions