mirror of
https://github.com/FortAwesome/Font-Awesome.git
synced 2025-03-15 13:54:41 +08:00

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`.