Skip to content

Scripts without import/export appear to be duplicated #104

Open
@edemaine

Description

@edemaine

Playground link

image

As described by @modderme123 in #103 (comment):

This is an issue with files that don't have imports or exports and are then treated as a global script file. One trick might be to add a tsconfig flag to ignore output_dont_import.tsx?

I tried adding an exclude option to languages.typescript.typescriptDefaults.setCompilerOptions (in src/components/editor/setupSolid.ts) but it doesn't seem to fix the problem.

I previously wrote:

It seems that src/components/editor/monacoTabs.tsx's MonacoTabs creates two models: the model at the top of the function and the model for each tab in tabs. I'm seeing the same source code in both the root model and a tab, which is presumably the source of the problem. [...] Could we remove one of the duplicates (presumably the top-level model?)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions