mirror of
https://github.com/FortAwesome/Font-Awesome.git
synced 2025-01-13 08:40:28 +08:00
b1f7b53df3
Given the following `tsconfig.json`: ```json { "compilerOptions": { "emitDecoratorMetadata": true, "experimentalDecorators": true } } ``` The following will currently causes an import error: ```ts import { IconName } from '@fortawesome/fontawesome-common-types'; class MyClass { @MyDecorator icon: IconName; } ``` This is because in some situations TypeScript doesn’t know that `IconName` is a only exists as a type. It will generate an import, which can’t be resolved. Simply adding an empty JavaScript file, will make the environment able to import the package, even though the import value of `IconName` will be `undefined`. |
||
---|---|---|
.. | ||
fontawesome-common-types | ||
fontawesome-free | ||
fontawesome-svg-core | ||
free-brands-svg-icons | ||
free-regular-svg-icons | ||
free-solid-svg-icons |