-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
Hi, I'm having some troubles declaring default values in my shape
in this example i'm expecting the theme property to be #E58005 if the object doesn't contain that property, instead my object contains only the properties I add.
import type from 'vue-types'
export default type.shape({
author: type.string.isRequired,
text: type.string.isRequired,
theme: type.string.def('#E58005')
})if I receive this object as a prop of my component
{
author: 'matteogabriele',
text: 'lorem ipsum'
}I'm expecting this
{
author: 'matteogabriele',
text: 'lorem ipsum',
theme: '#E58005'
}thanks for your time, love this package! :)
Metadata
Metadata
Assignees
Labels
No labels