From fe9ddf224ed17a46fe41e2ec85d8f2fa3eaa9a04 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Fri, 11 Nov 2016 13:41:26 -0800 Subject: [PATCH] Fix build failure in new testing framework --- paper/tsconfig.json | 19 ++++++++++++++++++ react-onclickoutside/index.d.ts | 6 ++---- .../react-onclickoutside-tests.tsx | 2 +- react-onclickoutside/tsconfig.json | 20 +++++++++++++++++++ react-redux-i18n/index.d.ts | 15 ++++++-------- react-redux-i18n/tsconfig.json | 20 +++++++++++++++++++ 6 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 paper/tsconfig.json create mode 100644 react-onclickoutside/tsconfig.json create mode 100644 react-redux-i18n/tsconfig.json diff --git a/paper/tsconfig.json b/paper/tsconfig.json new file mode 100644 index 0000000000..f6f1f92fb0 --- /dev/null +++ b/paper/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "paper-tests.ts" + ] +} \ No newline at end of file diff --git a/react-onclickoutside/index.d.ts b/react-onclickoutside/index.d.ts index ca807da848..78f55db655 100644 --- a/react-onclickoutside/index.d.ts +++ b/react-onclickoutside/index.d.ts @@ -3,13 +3,11 @@ // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as React from "react" declare namespace ReactOnClickOutside { - import React = __React - interface OnClickOutsideComponent { - handleClickOutside(e: React.MouseEvent): void + handleClickOutside(e: React.MouseEvent): void } interface OnClickOutsideProps { diff --git a/react-onclickoutside/react-onclickoutside-tests.tsx b/react-onclickoutside/react-onclickoutside-tests.tsx index 9a59eccb1a..c293eb3648 100644 --- a/react-onclickoutside/react-onclickoutside-tests.tsx +++ b/react-onclickoutside/react-onclickoutside-tests.tsx @@ -16,7 +16,7 @@ var TestStateless: StatelessComponent = (props: TestProps) => { var TestStatelessWrapped = onClickOutside(TestStateless) class Test extends Component implements ReactOnClickOutside.OnClickOutsideComponent { - handleClickOutside (e: MouseEvent) {} + handleClickOutside (e: MouseEvent) {} render () { return (
Test
) diff --git a/react-onclickoutside/tsconfig.json b/react-onclickoutside/tsconfig.json new file mode 100644 index 0000000000..7d7bfb3377 --- /dev/null +++ b/react-onclickoutside/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-onclickoutside-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-redux-i18n/index.d.ts b/react-redux-i18n/index.d.ts index 537955af37..aa47bb2723 100644 --- a/react-redux-i18n/index.d.ts +++ b/react-redux-i18n/index.d.ts @@ -3,12 +3,9 @@ // Definitions by: Clément Devos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// - declare module 'react-redux-i18n' { - import R = __React; - import _Redux = Redux; + import * as react from "react" + import * as redux from "redux" /** * Helper methods @@ -42,18 +39,18 @@ declare module 'react-redux-i18n' { /** * React components */ - export class Translate extends R.Component{ } - export class Localize extends R.Component{ } + export class Translate extends react.Component{ } + export class Localize extends react.Component{ } /** * Reducer */ - export function i18nReducer(state?: any, options?: any): _Redux.Reducer; + export function i18nReducer(state?: any, options?: any): redux.Reducer; /** * Reducer init */ - export function syncTranslationWithStore(store: _Redux.Store): void; + export function syncTranslationWithStore(store: redux.Store): void; /** * Redux Actions diff --git a/react-redux-i18n/tsconfig.json b/react-redux-i18n/tsconfig.json new file mode 100644 index 0000000000..102c56da02 --- /dev/null +++ b/react-redux-i18n/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-redux-i18n-tests.tsx" + ] +} \ No newline at end of file