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.

Typescript warning but build error

See original GitHub issue

Type of Issue

Build error

[x ] Bug Report
[ ] Feature Request

Description

A typescript warning is turned in build error.

How To Reproduce

Add comment as :

/**

  • Returns the value at this numeric index.
  • @param {string} row array of values
  • @param index numeric index
  • @returns or ‘’ if invalid index */

Version Information

ng-packagr: 2.0.0.rc-6

warning TS0: the type annotation on @param is redundant with its TypeScript type, remove the {…} part the type annotation on @param is redundant with its TypeScript type, remove the {…} part

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
Korigothcommented, Mar 15, 2018

We have a pretty big lib and we cannot take the time to do it everywhere… is it possible to get an other solution to get ng-packgr >=2.0.0 to work with {type} ?

3reactions
matheusdavidsoncommented, Feb 18, 2019

My solution, in angular 7, was change my tsconfig.lib.json config,

from this:

"angularCompilerOptions": {
    "annotateForClosureCompiler": true
    ...
    ...
}

to this:

"angularCompilerOptions": {
    "annotateForClosureCompiler": false
    ...
    ...
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript 'Failed to Compile` Errors as Warnings
Admittedly a Typescript noob but this took me forever to figure out. CRA defaults strict to true which will fail the compilation for...
Read more >
Show warnings instead of compiler errors · Issue #238 - GitHub
I started a project now with create-react-app-typescript and everytime I make a mistake (according to tslint rules) it's not compiling until ...
Read more >
Common React TypeScript ESLint / Lint Errors & Warning ...
It won't create a compile-time error, but lint will find the error or properties won't be available. Change From const onClickHandler = (e:...
Read more >
TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >
TypeScript Programming with Visual Studio Code
The TypeScript language service will analyze your program for coding problems and report errors and warnings: In the Status bar, there is a...
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