Skip to content

Members of declare global are prefixed with global #803

@hazzard993

Description

@hazzard993

Input

export const _ = 0;

declare global {
    export const globalVariable: number;
}

globalVariable;

Current Output (0.30.1)

  local ____exports = {}
  ____exports._ = 0
- local ____ = global.globalVariable
  return ____exports

Expected Output

  local ____exports = {}
  ____exports._ = 0
+ local ____ = globalVariable
  return ____exports

This is TypeScript's output for the same code:

"use strict";
exports.__esModule = true;
exports._ = 0;
globalVariable;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions