Closed pxr89 closed 4 years ago
Now! parametor decorator do't work anymore! here is my babel config:
{
"presets": [
"module:metro-react-native-babel-preset",
"@babel/preset-env",
"@babel/preset-typescript"
],
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
],
"babel-plugin-parameter-decorator"
]
}
package.json
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-decorators": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.7.4",
"@babel/runtime": "^7.4.5",
"@types/jest": "^24.0.13",
"@types/react": "^16.8.21",
"@types/react-native": "^0.57.65",
"@types/react-test-renderer": "^16.8.1",
anyone has any idea?
Hi @pxr89 ,
I will have a look, will let you know once get any update
This is an incompatibility bug appears when using param decorators along with the default param. So a quick temp workaround is to remove the default param clause (= ''
).
I will fix this asap.
Sorry for the delay, I have released a new version 1.0.15
which should fix this problem.
Please let me know if you have any other issue @pxr89 .
@WarnerHooh Hello, i tried version 1.0.15. and still can't work for param with default clause (= ''). but it work for others
as said in title: Only some effect when you use multi parameter decorator in a class function.
this is my parameter Decorator code
used:
Here is the log when I run the code:
that means only 'key2' and 'key5' effect , and others ? how can i make all parameter decorator effect?