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

This commit is contained in:
Vincent Siao committed 2016-02-26 18:33:14 -08:00
1 parent a3d2b67d36
commit edb41e7850
2 files changed
+9 -10

No files matched your search

+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
// --------------------------------------------------------------------------