* dev only
( rawProps: Data, props: Data, instance: ComponentInternalInstance, )
| 651 | * dev only |
| 652 | */ |
| 653 | function validateProps( |
| 654 | rawProps: Data, |
| 655 | props: Data, |
| 656 | instance: ComponentInternalInstance, |
| 657 | ) { |
| 658 | const resolvedValues = toRaw(props) |
| 659 | const options = instance.propsOptions[0] |
| 660 | const camelizePropsKey = Object.keys(rawProps).map(key => camelize(key)) |
| 661 | for (const key in options) { |
| 662 | let opt = options[key] |
| 663 | if (opt == null) continue |
| 664 | validateProp( |
| 665 | key, |
| 666 | resolvedValues[key], |
| 667 | opt, |
| 668 | __DEV__ ? shallowReadonly(resolvedValues) : resolvedValues, |
| 669 | !camelizePropsKey.includes(key), |
| 670 | ) |
| 671 | } |
| 672 | } |
| 673 | |
| 674 | /** |
| 675 | * dev only |
no test coverage detected