mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-27 12:21:19 +08:00
[react] better return-type inference for (scry|find)RenderedComponent(s?)WithType
This commit is contained in:
1 parent
a3d2b67d36
commit
edb41e7850
2 files changed
+9
-10
No files matched your search
@@ -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
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user