+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+ export interface Visitor {
+ enter?: (node: any, parentNode: any) => any;
+ leave?: (node: any, parentNode: any) => any;
+
+ fallback?: string;
+
+ keys?: {};
+}
+
+export enum VisitorOption {
+ Skip, Break, Remove
+}
+
+export function traverse (ast: any, visitor: Visitor): any;
+export function replace (ast: any, visitor: Visitor): any;
diff --git a/estraverse/tsconfig.json b/estraverse/tsconfig.json
new file mode 100644
index 0000000000..f5505b0583
--- /dev/null
+++ b/estraverse/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "estraverse-tests.ts"
+ ]
+}
\ No newline at end of file
diff --git a/react-dom/index.d.ts b/react-dom/index.d.ts
index f55edda14d..a2b3209672 100644
--- a/react-dom/index.d.ts
+++ b/react-dom/index.d.ts
@@ -18,19 +18,19 @@ declare namespace ReactDOM {
function render, T extends Element>(
element: DOMElement
,
- container: Element,
+ container: Element | null,
callback?: (element: T) => any): T;
function render
(
element: SFCElement
,
- container: Element,
+ container: Element | null,
callback?: () => any): void;
function render
>(
element: CElement
,
- container: Element,
+ container: Element | null,
callback?: (component: T) => any): T;
function render
(
element: ReactElement
,
- container: Element,
+ container: Element | null,
callback?: (component?: Component
| Element) => any): Component
| Element | void;
function unmountComponentAtNode(container: Element): boolean;
diff --git a/react/react-tests.ts b/react/react-tests.ts
index a8dcab0095..9a66d361e9 100644
--- a/react/react-tests.ts
+++ b/react/react-tests.ts
@@ -211,8 +211,15 @@ var clonedDOMElement: React.ReactHTMLElement =
// React.render
var component: ModernComponent =
ReactDOM.render(element, container);
+var componentNullContainer: ModernComponent =
+ ReactDOM.render(element, null);
+
+var componentElementOrNull: ModernComponent =
+ ReactDOM.render(element, document.getElementById("anelement"));
var componentNoState: ModernComponentNoState =
ReactDOM.render(elementNoState, container);
+var componentNoStateElementOrNull: ModernComponentNoState =
+ ReactDOM.render(elementNoState, document.getElementById("anelement"));
var classicComponent: React.ClassicComponent =
ReactDOM.render(classicElement, container);
var domComponent: Element =
diff --git a/types b/types
deleted file mode 100644
index 8c33e8d31c..0000000000
--- a/types
+++ /dev/null
@@ -1,2 +0,0 @@
-
-C:\github\DefinitelyTyped>git add -A * && git commit -m "Start preparing for path- transition"