fix(core): Update types for TypeScript nullability support (#15472)
This commit is contained in:

committed by
Victor Berchet

parent
331b9f6425
commit
910c0d9ee7
@ -29,19 +29,19 @@ function _pureExpressionDef(flags: NodeFlags, propertyNames: string[]): NodeDef
|
||||
bindings[i] = {
|
||||
flags: BindingFlags.TypeProperty,
|
||||
name: prop,
|
||||
ns: undefined,
|
||||
ns: null,
|
||||
nonMinifiedName: prop,
|
||||
securityContext: undefined,
|
||||
suffix: undefined
|
||||
securityContext: null,
|
||||
suffix: null
|
||||
};
|
||||
}
|
||||
return {
|
||||
// will bet set by the view definition
|
||||
index: undefined,
|
||||
parent: undefined,
|
||||
renderParent: undefined,
|
||||
bindingIndex: undefined,
|
||||
outputIndex: undefined,
|
||||
index: -1,
|
||||
parent: null,
|
||||
renderParent: null,
|
||||
bindingIndex: -1,
|
||||
outputIndex: -1,
|
||||
// regular values
|
||||
flags,
|
||||
childFlags: 0,
|
||||
@ -50,15 +50,15 @@ function _pureExpressionDef(flags: NodeFlags, propertyNames: string[]): NodeDef
|
||||
matchedQueries: {},
|
||||
matchedQueryIds: 0,
|
||||
references: {},
|
||||
ngContentIndex: undefined,
|
||||
ngContentIndex: -1,
|
||||
childCount: 0, bindings,
|
||||
bindingFlags: calcBindingFlags(bindings),
|
||||
outputs: [],
|
||||
element: undefined,
|
||||
provider: undefined,
|
||||
text: undefined,
|
||||
query: undefined,
|
||||
ngContent: undefined
|
||||
element: null,
|
||||
provider: null,
|
||||
text: null,
|
||||
query: null,
|
||||
ngContent: null
|
||||
};
|
||||
}
|
||||
|
||||
@ -102,16 +102,16 @@ export function checkAndUpdatePureExpressionInline(
|
||||
break;
|
||||
case NodeFlags.TypePureObject:
|
||||
value = {};
|
||||
if (bindLen > 0) value[bindings[0].name] = v0;
|
||||
if (bindLen > 1) value[bindings[1].name] = v1;
|
||||
if (bindLen > 2) value[bindings[2].name] = v2;
|
||||
if (bindLen > 3) value[bindings[3].name] = v3;
|
||||
if (bindLen > 4) value[bindings[4].name] = v4;
|
||||
if (bindLen > 5) value[bindings[5].name] = v5;
|
||||
if (bindLen > 6) value[bindings[6].name] = v6;
|
||||
if (bindLen > 7) value[bindings[7].name] = v7;
|
||||
if (bindLen > 8) value[bindings[8].name] = v8;
|
||||
if (bindLen > 9) value[bindings[9].name] = v9;
|
||||
if (bindLen > 0) value[bindings[0].name !] = v0;
|
||||
if (bindLen > 1) value[bindings[1].name !] = v1;
|
||||
if (bindLen > 2) value[bindings[2].name !] = v2;
|
||||
if (bindLen > 3) value[bindings[3].name !] = v3;
|
||||
if (bindLen > 4) value[bindings[4].name !] = v4;
|
||||
if (bindLen > 5) value[bindings[5].name !] = v5;
|
||||
if (bindLen > 6) value[bindings[6].name !] = v6;
|
||||
if (bindLen > 7) value[bindings[7].name !] = v7;
|
||||
if (bindLen > 8) value[bindings[8].name !] = v8;
|
||||
if (bindLen > 9) value[bindings[9].name !] = v9;
|
||||
break;
|
||||
case NodeFlags.TypePurePipe:
|
||||
const pipe = v0;
|
||||
@ -175,7 +175,7 @@ export function checkAndUpdatePureExpressionDynamic(
|
||||
case NodeFlags.TypePureObject:
|
||||
value = {};
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
value[bindings[i].name] = values[i];
|
||||
value[bindings[i].name !] = values[i];
|
||||
}
|
||||
break;
|
||||
case NodeFlags.TypePurePipe:
|
||||
|
Reference in New Issue
Block a user