[IMP] component: various prop validation improvements

- add optional form for list props: ['optionalField?']
- accept undefined values for optional props
- allow declaring props with only boolean true
- throw error if extra prop is given to component

closes #223
This commit is contained in:
Géry Debongnie
2019-06-28 15:48:33 +02:00
parent 1c8e1af86d
commit 7245ccf8f9
7 changed files with 277 additions and 127 deletions
+1 -1
View File
@@ -353,7 +353,7 @@ exports[`class and style attributes with t-component t-att-class is properly add
let def3;
const ref5 = \`child\`;
let _6 = {'a':true};
Object.assign(_6, this.utils.toObj(context['state'].b?'b':''))
Object.assign(_6, utils.toObj(context['state'].b?'b':''))
let w4 = 4 in context.__owl__.cmap ? context.__owl__.children[context.__owl__.cmap[4]] : false;
let _2_index = c1.length;
c1.push(null);