Skip to content

/// <reference types="xxx" /> from packages introduce collisions #12040

Closed
@tomitrescak

Description

@tomitrescak

TypeScript Version: nightly (2.1.0-dev.201xxxxx)

The problem here is related to #11671

  1. Package that I use requires "es6-shim" as following /// <reference types="es6-shim" />.

  2. This REQUIRES me to install @types/es6-shim otherwise I get an error

  3. My project is ES6 based. As a result, after I install that dependency, I get following error during compilation:

     file: 'file:///Users/tomi/Github/apps/Clara-Apollo/node_modules/%40types/es6-shim/index.d.ts'
     severity: 'Error' 
     message: 'Duplicate identifier 'PropertyKey'.'
    
  4. No matter what I set to types property or to typeRoots the error will never go away, unless I manually delete the 'PropertyKey' definition in the es6-shim.d.ts file. While this is ok in local, it PROHIBITS CI, as the project will never compile on CI server

What can I do in this case? Is there any way I can protect myself from these errors?

Metadata

Metadata

Assignees

No one assigned

    Labels

    @typesRelates to working with .d.ts files (declaration/definition files) from DefinitelyTypedNeeds More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions