question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tsc error when building locally, conflict with AngularJs typings

See original GitHub issue

I’ve come across this because of a change in a typing from DefinitelyTyped to AngularJS LN1980. This new typing conflicts with source code presently in ng-metadata-src/core/directives/metadata-directives.

node_modules/ng-metadata/src/core/directives/metadata_directives.d.ts(16,15): error TS2314: Generic type 'IDirectiveCompileFn<TScope>' requires 1 type argument(s).

I actually import this module, ng-metadata/src/core/directives/metadata_directives, so that I can use those decorator features to generate a component template. When two libraries conflict like this, TypeScript hasn’t really suggested a good solution for external conflicts 1 .

Although, I could swing a few ways for a solution, I believe the most appropriate resolution is to update this project’s typings.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
mtraynhamcommented, Nov 6, 2017

So it does, that PR just didn’t do it for all of them…

    interface IDirectiveCompileFn<TScope extends IScope = IScope> {

I’ll submit a PR to DefinitelyTyped and link back here

0reactions
mtraynhamcommented, Nov 8, 2017

Merged up and seems fixed, so am closing. Thanks again for the feedback @aciccarello!

Read more comments on GitHub >

github_iconTop Results From Across the Web

import declaration conflicts with local declaration of 'ng'
I had this error " import declaration conflicts with local declaration of 'ng' " in my Visual Studio 2015 solution where I used...
Read more >
TS2440: Import declaration conflicts with local ... - GitHub
Hi Sir! Bug report I am getting following below error : ERROR in [at-loader] ./node_modules/protractor/built/index.d.ts:5:10 TS2440: Import ...
Read more >
TypeScript configuration - Angular
Browsers can't execute TypeScript directly. Typescript must be "transpiled" into JavaScript using the tsc compiler, which requires some configuration. This page ...
Read more >
Top 18 Most Common AngularJS Developer Mistakes - Toptal
Common Mistake #16: Not Running The Unit Tests In TDD Mode​​ Tests will not make your code free of AngularJS error messages. What...
Read more >
Building AngularJS application with TypeScript and Visual ...
Run npm install and observe that newly added packages are downloaded locally. Edit gulpfile.js : At the start of the file add: tsc...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found