Skip to content

Is it possible to load global script? #213

Description

@unional

I tried to load a file like this and failed:

(function() {
  window['MyCompany'] = {
    component: {}
  }

  const foo: string = 'foo'
  window['MyCompany'].component.foo = foo
}())

error: 'Missing initializer in const declaration'.
If I remove the type, i.e. from const foo: string = 'foo' to const foo = 'foo', it works.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions