Skip to content

Consider all files as modules #564

Description

@ark120202

TSTL target environment is closer to node/bundler, where each module is isolated even if it doesn't contain any imports/exports. Even though in TypeScript the following code declares a global onEvent symbol (mostly because of legacy environments support) in runtime you usually won't expect _G.onEvent to be defined.

function onEvent() {}
listenToEvent(onEvent);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions