8000 Add a tsconfig option to assume every .ts file is a module · Issue #27535 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Add a tsconfig option to assume every .ts file is a module #27535
@osyrisrblx

Description

@osyrisrblx

Currently with TypeScript, if I create two files and put const foo = "bar"; in each, I will get the following error:

image

For the specific environment I'm using, this is not the case at runtime. I'd like to silence this error with a tsconfig.json option.

One current workaround is to put export {}; in all my files to instruct TypeScript that the file is a module, but I'd like to avoid doing so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0