-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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: