[react] better return-type inference for (scry|find)RenderedComponent(s?)WithType

This commit is contained in:
Vincent Siao
2016-02-26 18:33:14 -08:00
parent a3d2b67d36
commit edb41e7850
2 changed files with 9 additions and 10 deletions
+5
View File
@@ -541,6 +541,11 @@ renderer.render(React.createElement(Timer));
var output: React.ReactElement<React.Props<Timer>> =
renderer.getRenderOutput();
var foundComponent: ModernComponent = TestUtils.findRenderedComponentWithType(
inst, ModernComponent);
var foundComponents: ModernComponent[] = TestUtils.scryRenderedComponentsWithType(
inst, ModernComponent);
//
// TransitionGroup addon
// --------------------------------------------------------------------------