Skip to content

Cannot target ES6 in Typescript (possible regression) #5973

Closed

Description

@cherrydev

Right now it appears that it's impossible to use angular2 directly from node_modules when typescript is targetting es6 because es6-shim.d.ts is indirectly referenced from zone.d.ts. This APPEARS to be a regression of #4882 that has happened because zone.d.ts directly references es6-shim.d.ts. This is confusing to me because zone.d.ts (in definitelytyped) has ALWAYS referenced es6-shim.d.ts and therefore this should never have worked.

The reference chain is:
core.d.ts -> ./manual_typings/globals-es6.d.ts -> ../typings/zone/zone.d.ts -> ../es6-shim/es6-shim.d.ts

Activity

  1. alexeagle commented on Jan 10, 2016

    @alexeagle
    Contributor

    Yes, the zone.d.ts shipping with angular2 (I tried beta.1) has es6-shim dependency (https://github.com/angular/DefinitelyTyped/blob/master/zone/zone.d.ts). The one on DefinitelyTyped has an es6-promise dependency (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/zone.js/zone.js.d.ts#L6)
    Note, I have a PR to remove our fork, which might solve this problem
    #6267

  2. DanielJoyce commented on Jan 14, 2016

    @DanielJoyce

    Bumping into this bug as well. Still encountering in angular2 2.0.0-beta.1

  3. kalahari commented on Jan 16, 2016

    @kalahari

    Is the best current work around with 2.0.0-beta.1 going into node_modules/angular2 and making changes to .d.ts files? I haven't found anything else that works.

  4. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Sep 7, 2019
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions