Fix build failure in new testing framework

This commit is contained in:
Kanchalai Tanglertsampan 2016-11-11 13:41:26 -08:00
parent 00c4f8e152
commit fe9ddf224e
6 changed files with 68 additions and 14 deletions

19
paper/tsconfig.json Normal file
View File

@ -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"
]
}

View File

@ -3,13 +3,11 @@
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference path='../react/react.d.ts' />
import * as React from "react"
declare namespace ReactOnClickOutside {
import React = __React
interface OnClickOutsideComponent {
handleClickOutside(e: React.MouseEvent): void
handleClickOutside(e: React.MouseEvent<any>): void
}
interface OnClickOutsideProps {

View File

@ -16,7 +16,7 @@ var TestStateless: StatelessComponent<TestProps> = (props: TestProps) => {
var TestStatelessWrapped = onClickOutside(TestStateless)
class Test extends Component<TestProps, any> implements ReactOnClickOutside.OnClickOutsideComponent {
handleClickOutside (e: MouseEvent) {}
handleClickOutside (e: MouseEvent<any>) {}
render () {
return (<div>Test</div>)

View File

@ -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"
]
}

View File

@ -3,12 +3,9 @@
// Definitions by: Clément Devos <https://github.com/clementdevos>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference path="../react/react.d.ts" />
///<reference path="../redux/redux.d.ts" />
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<TranslateProps, any>{ }
export class Localize extends R.Component<LocalizeProps, any>{ }
export class Translate extends react.Component<TranslateProps, any>{ }
export class Localize extends react.Component<LocalizeProps, any>{ }
/**
* Reducer
*/
export function i18nReducer(state?: any, options?: any): _Redux.Reducer<I18nState>;
export function i18nReducer(state?: any, options?: any): redux.Reducer<I18nState>;
/**
* Reducer init
*/
export function syncTranslationWithStore(store: _Redux.Store<any>): void;
export function syncTranslationWithStore(store: redux.Store<any>): void;
/**
* Redux Actions

View File

@ -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"
]
}