( tView: TView, tParent: TElementNode | TContainerNode | null, type: TNodeType, index: number, value: string | null, attrs: TAttributes | null, )
| 270 | attrs: TAttributes | null, |
| 271 | ): TNode; |
| 272 | export function createTNode( |
| 273 | tView: TView, |
| 274 | tParent: TElementNode | TContainerNode | null, |
| 275 | type: TNodeType, |
| 276 | index: number, |
| 277 | value: string | null, |
| 278 | attrs: TAttributes | null, |
| 279 | ): TNode { |
| 280 | ngDevMode && |
| 281 | index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in |
| 282 | // `view_engine_compatibility` for additional context. |
| 283 | assertGreaterThanOrEqual(index, HEADER_OFFSET, "TNodes can't be in the LView header."); |
| 284 | ngDevMode && assertNotSame(attrs, undefined, "'undefined' is not valid value for 'attrs'"); |
| 285 | ngDevMode && tParent && assertTNodeForTView(tParent, tView); |
| 286 | let injectorIndex = tParent ? tParent.injectorIndex : -1; |
| 287 | let flags = 0; |
| 288 | if (isInSkipHydrationBlock()) { |
| 289 | flags |= TNodeFlags.inSkipHydrationBlock; |
| 290 | } |
| 291 | |
| 292 | // TODO: would it be helpful to use a prototypal inheritance here, similar to the way we do so with signals? |
| 293 | const tNode = { |
| 294 | type, |
| 295 | index, |
| 296 | insertBeforeIndex: null, |
| 297 | injectorIndex, |
| 298 | directiveStart: -1, |
| 299 | directiveEnd: -1, |
| 300 | directiveStylingLast: -1, |
| 301 | componentOffset: -1, |
| 302 | controlDirectiveIndex: -1, |
| 303 | customControlIndex: -1, |
| 304 | propertyBindings: null, |
| 305 | flags, |
| 306 | providerIndexes: 0, |
| 307 | value: value, |
| 308 | namespace: getNamespace(), |
| 309 | attrs: attrs, |
| 310 | mergedAttrs: null, |
| 311 | localNames: null, |
| 312 | initialInputs: null, |
| 313 | inputs: null, |
| 314 | hostDirectiveInputs: null, |
| 315 | outputs: null, |
| 316 | hostDirectiveOutputs: null, |
| 317 | directiveToIndex: null, |
| 318 | tView: null, |
| 319 | next: null, |
| 320 | prev: null, |
| 321 | projectionNext: null, |
| 322 | child: null, |
| 323 | parent: tParent, |
| 324 | projection: null, |
| 325 | styles: null, |
| 326 | stylesWithoutHost: null, |
| 327 | residualStyles: undefined, |
| 328 | classes: null, |
| 329 | classesWithoutHost: null, |
no test coverage detected
searching dependent graphs…