$ npm install --save-dev babel-plugin-class-properties
{
"plugins": [
["babel-plugin-class-properties", {
"all": true,
"props": [{
"key": "name",
"static": true
}, {
"key": "foo",
"value": "2 + 3"
}]
}]
]
}
Name | Type | Default | Description |
---|---|---|---|
all |
{Boolean} |
false |
Is enabled for all classes |
classes |
{Array[String]} |
[] |
Is enabled for specify classes |
superClasses |
{Array[String]} |
[] |
Is enabled for specify superClasses |
props |
{Array[Object]} |
[] |
Class properties that need to be added |
key
:String
(required)value
:String | Function
(default:null
)computed
:Boolean
(default:false
)static
:Boolean
(default:false
)