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.

Type Definition Error

See original GitHub issue

When using the pro light icons I get the following error on the line where I add the light icon to the library:

angular_1  | ERROR in src/app/abcd/abcd.module.ts(14,13): error TS2345: Argument of type 'IconDefinition' is not assignable to parameter of type 'IconDefinitionOrPack'.
angular_1  |   Type 'IconDefinition' is not assignable to type 'IconPack'.
angular_1  |     Index signature is missing in type 'IconDefinition'.

I don’t get this error using the solid icons or the free icons.

My module code has the following:

import {library} from '@fortawesome/fontawesome-svg-core';
// import {faArrowToBottom} from '@fortawesome/pro-solid-svg-icons'; <--- Works fine
import {faArrowToBottom} from '@fortawesome/fontawesome-pro-light';

library.add(faArrowToBottom); <--- Error is on this line

My template uses the icon as follows:

<fa-icon [icon]="['fal', 'arrow-to-bottom']"></fa-icon>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
devoto13commented, Apr 10, 2018

It may be because you use '@fortawesome/fontawesome-pro-light‘ package instead of '@fortawesome/pro-light-svg-icons‘. Former is not intended to be used with the latest pre-release.

0reactions
mlwilkersoncommented, Apr 10, 2018

OK, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type definition error when posting a new object using a REST ...
"Type definition error: [simple type, class ffuentese.rest_example.Persona]; nested exception is com.fasterxml.jackson.databind.exc.
Read more >
Type definition error: [simple type, class de.codecentric.boot ...
Client cannot register itself in admin, some JSON deserialization issue. Tried it in different configurations and app constellations ...
Read more >
type definition error: [simple type, class java.io.filedescriptor]
Spring: Type definition error when posting a new object using a REST service. Asked Jun 24, 2018 • 9 votes 3 answers. QUESTION...
Read more >
simple type, class org.hibernate.proxy.pojo.bytebuddy ... - velog
HttpMessageConversionException : Type definition error: [simple type, class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor].
Read more >
Type I and type II errors - Wikipedia
In statistical hypothesis testing, a type I error is the mistaken rejection of an actually true null hypothesis (also known as a "false...
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