I want to compile my Angular2 application written in Typescript in planning ES6 code to compile it in ES5 recently using Babel. But I get an error message:
node_modules/angular2/typings/es6-shim/es6-shim.d.ts(6,14): error TS2300: Duplicate identifier 'PropertyKey'. <...> node_modules/typescript/lib/lib.es6.d.ts(3841,14): error TS2300: Duplicate identifier 'PropertyKey'. <...>
I tried to solve this problem by adding a directive noLibto mine tsconfig.json, but one of the angular files ( zone.d.ts) should import es6-shim.d.tsusing
noLib
tsconfig.json
zone.d.ts
es6-shim.d.ts
/// <reference path="es6-shim/es6-shim.d.ts" />
and it conflicts with the Typescript ES6 ( lib.es6.d.ts) core library .
lib.es6.d.ts
How can I solve this problem?
Have you tried this in your tsconfig.json ?: { "compilerOptions": { "target": "ES6" } }
{ "compilerOptions": { "target": "ES6" } }
btw, babel, typescript? , . typescript, typescript js, , . , es5 es6, es6, , es6 , , es6.
Source: https://habr.com/ru/post/1623554/More articles:Minimizing an AngularJS script that includes a custom filter - javascriptUpload image to map Marker using Android - androidCannot drag DrawerLayout from list - javaVelocity IncludeEventHandler Dilemma - springRepel annotations in matplotlib? - pythonabsolute positioned text area does not match the properties on the right and bottom - cssnpm lite-server does not recognize changes in css - angularjsWhy is this piece of code not working? - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1623558/create-more-variables-or-calculate-when-passing-arguments-to-function&usg=ALkJrhhMLBWMXM2zOwt9fqJAe_GbL4hRSwSearch for large primes in Mathematica - wolfram-mathematicaAll Articles