mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Update tests for dependencies of React to work with v0.14
This commit is contained in:
@@ -17,7 +17,7 @@ import {reactiveComponent} from 'mobservable-react';
|
||||
}));
|
||||
|
||||
let c1Factory = React.createFactory(c1);
|
||||
React.render(c1Factory({
|
||||
ReactDOM.render(c1Factory({
|
||||
test: "hello"
|
||||
}), null);
|
||||
}
|
||||
@@ -31,7 +31,7 @@ class TestComponent extends React.Component<{ test: string },{}> {
|
||||
|
||||
{
|
||||
let c2Factory = React.createFactory(TestComponent);
|
||||
React.render(c2Factory({
|
||||
ReactDOM.render(c2Factory({
|
||||
test: "hello"
|
||||
}) , null);
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class TestComponent extends React.Component<{ test: string },{}> {
|
||||
{
|
||||
var c3 = reactiveComponent((props: { test: string }) => React.createElement("div"));
|
||||
var c3Factory = React.createFactory(c3); //without JSX
|
||||
React.render(c3Factory({
|
||||
ReactDOM.render(c3Factory({
|
||||
test: "hello"
|
||||
}), null);
|
||||
}
|
||||
@@ -55,7 +55,7 @@ class TestComponent2 extends React.Component<{ test: string },{}> {
|
||||
// Argument of type 'typeof TestComponent2 | void' is not assignable to parameter of type 'ComponentClass<{ test: string; }>'.
|
||||
// Type 'void' is not assignable to type 'ComponentClass<{ test: string; }>'.
|
||||
let c4Factory = React.createFactory(<React.ClassicComponentClass<{test:string}>><any> reactiveComponent(TestComponent2));
|
||||
React.render(c4Factory({
|
||||
ReactDOM.render(c4Factory({
|
||||
test: "hello"
|
||||
}) , null);
|
||||
}
|
||||
Reference in New Issue
Block a user