build: fix our copy of Array#find typing (#27742)
It should be nullable, matching the lib.es2015.d.ts from TypeScript PR Close #27742
This commit is contained in:

committed by
Matias Niemelä

parent
a20b2f72f2
commit
e8f7241366
@ -412,7 +412,7 @@ function declareTests(config?: {useJit: boolean}) {
|
||||
const ngIfEl = fixture.debugElement.children[0];
|
||||
const someViewport: SomeViewport =
|
||||
ngIfEl.childNodes
|
||||
.find(debugElement => debugElement.nativeNode.nodeType === Node.COMMENT_NODE)
|
||||
.find(debugElement => debugElement.nativeNode.nodeType === Node.COMMENT_NODE)!
|
||||
.injector.get(SomeViewport);
|
||||
expect(someViewport.container.length).toBe(2);
|
||||
expect(ngIfEl.children.length).toBe(2);
|
||||
@ -812,7 +812,7 @@ function declareTests(config?: {useJit: boolean}) {
|
||||
})
|
||||
.createComponent(MyComp);
|
||||
const tc = fixture.debugElement.childNodes.find(
|
||||
debugElement => debugElement.nativeNode.nodeType === Node.COMMENT_NODE);
|
||||
debugElement => debugElement.nativeNode.nodeType === Node.COMMENT_NODE)!;
|
||||
|
||||
const emitter = tc.injector.get(DirectiveEmittingEvent);
|
||||
const myComp = fixture.debugElement.injector.get(MyComp);
|
||||
|
Reference in New Issue
Block a user