-
Notifications
You must be signed in to change notification settings - Fork 178
Consider exporting Fbt
, FbtParam
, FbtPlural
#202
Comments
Actually I was able to get typings to work with namespaced elements ( Atm I just copied https://gist.github.com/retyui/c3bd35220fb5c95c322df866834f0913#file-index-d-ts locally. And you can even make it work in plain JS projects in VSCode with a |
I'd like to support this proposal as well. Using Having something which is more "reacty" would be very nice. |
typescript 4.2 support XML syntax in JSX ( I think we can officially add ts defenintions for |
FYI I already have created |
I have another example where Basically, there was a breaking change in Cc @kayhadrin and @jrwats: do you have any thoughts on this issue? 🤔 |
// Before
import {fbt} from 'fbt';
<fbt/>;
// After
import {fbt} from 'fbt'; // never used, so eslint 100% right
React.createElement("fbt"); // you can ignore it using rule options
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: 'fbt',
},
], |
🚀 Feature Proposal
Export "empty"
Fbt
componentsMotivation
Allow
fbt
to work better with TypeScript and friends. With this change types could be added to DefinentlyTyped and would make the setup a lot easier for TypeScript projects.I think that it would make learning
fbt
easier in some sense too, using<fbt>
and<fbt:param>
throws people off when first seeing it.Also if the babel-plugin was updated to I think we could remove the need for a auto-import option described in #194
Example
Please provide an example for how this feature would be used.
Pitch
I don't see how this could be solved outside of
fbt
The text was updated successfully, but these errors were encountered: