Prefer to directly export values instead of export = of a namespace (#13645)

This commit is contained in:
Andy
2017-01-01 15:36:12 -08:00
committed by GitHub
parent d389dfdb83
commit 3633866ea5
9 changed files with 487 additions and 519 deletions
+14 -17
View File
@@ -4,21 +4,18 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { ReactElement } from "react";
declare namespace ReactTestRenderer {
export interface Renderer {
toJSON(): ReactTestRendererJSON;
}
export interface ReactTestRendererJSON {
type: string;
props: { [propName: string]: string };
children: null | Array<string | ReactTestRendererJSON>;
$$typeof?: any;
}
export interface TestRendererOptions {
createNodeMock: (element: ReactElement<any>) => any;
}
// https://github.com/facebook/react/blob/master/src/renderers/testing/ReactTestMount.js#L155
export function create(nextElement: ReactElement<any>, options?: TestRendererOptions): Renderer;
}
export = ReactTestRenderer;
interface Renderer {
toJSON(): ReactTestRendererJSON;
}
interface ReactTestRendererJSON {
type: string;
props: { [propName: string]: string };
children: null | Array<string | ReactTestRendererJSON>;
$$typeof?: any;
}
interface TestRendererOptions {
createNodeMock: (element: ReactElement<any>) => any;
}
// https://github.com/facebook/react/blob/master/src/renderers/testing/ReactTestMount.js#L155
export function create(nextElement: ReactElement<any>, options?: TestRendererOptions): Renderer;