mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-25 13:45:48 +08:00
More fixes around __React
This commit is contained in:
2
flux/index.d.ts
vendored
2
flux/index.d.ts
vendored
@@ -69,8 +69,6 @@ declare module "flux" {
|
||||
}
|
||||
|
||||
declare namespace FluxUtils {
|
||||
|
||||
import React = __React;
|
||||
export class Container {
|
||||
constructor();
|
||||
/**
|
||||
|
||||
8
fluxxor/index.d.ts
vendored
8
fluxxor/index.d.ts
vendored
@@ -3,8 +3,8 @@
|
||||
// Definitions by: Yuichi Murata <https://github.com/mrk21>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
///<reference types="react" />
|
||||
///<reference types="eventemitter3" />
|
||||
/// <reference types="react" />
|
||||
/// <reference types="eventemitter3" />
|
||||
|
||||
declare namespace Fluxxor {
|
||||
class Dispatcher {
|
||||
@@ -58,8 +58,8 @@ declare namespace Fluxxor {
|
||||
getStateFromFlux(): StoreState;
|
||||
}
|
||||
|
||||
function FluxMixin(React: typeof __React): FluxMixin;
|
||||
function FluxChildMixin(React: typeof __React): FluxChildMixin;
|
||||
function FluxMixin(react: typeof React): FluxMixin;
|
||||
function FluxChildMixin(react: typeof React): FluxChildMixin;
|
||||
function StoreWatchMixin<StoreState>(...storeNames: string[]): StoreWatchMixin<StoreState>;
|
||||
function createStore(spec: StoreSpec): StoreClass;
|
||||
var version: string;
|
||||
|
||||
2
history/index.d.ts
vendored
2
history/index.d.ts
vendored
@@ -5,6 +5,8 @@
|
||||
|
||||
// types based on https://github.com/rackt/history/blob/master/docs/Terms.md
|
||||
|
||||
export as namespace History;
|
||||
|
||||
export type Action = string;
|
||||
export type BeforeUnloadHook = () => string | boolean;
|
||||
export type CreateHistory<T> = (options?: HistoryOptions) => T;
|
||||
|
||||
1
rc-select/index.d.ts
vendored
1
rc-select/index.d.ts
vendored
@@ -6,7 +6,6 @@
|
||||
/// <reference types="react" />
|
||||
|
||||
declare namespace RcSelect {
|
||||
import React = __React;
|
||||
interface SelectProps {
|
||||
className?: string;
|
||||
prefixCls?: string;
|
||||
|
||||
7
react-addons-update/index.d.ts
vendored
7
react-addons-update/index.d.ts
vendored
@@ -3,9 +3,11 @@
|
||||
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
export = React.__Addons.update;
|
||||
|
||||
declare namespace __React {
|
||||
declare module 'react' {
|
||||
interface UpdateSpecCommand {
|
||||
$set?: any;
|
||||
$merge?: {};
|
||||
@@ -30,6 +32,3 @@ declare namespace __React {
|
||||
}
|
||||
}
|
||||
|
||||
declare module "react-addons-update" {
|
||||
export = __React.__Addons.update;
|
||||
}
|
||||
|
||||
2
react-bootstrap-daterangepicker/index.d.ts
vendored
2
react-bootstrap-daterangepicker/index.d.ts
vendored
@@ -19,7 +19,7 @@ declare namespace ReactBootstrapDaterangepicker {
|
||||
onEvent?: EventHandler;
|
||||
}
|
||||
|
||||
export class DateRangePicker extends __React.Component<Props, {}> {}
|
||||
export class DateRangePicker extends React.Component<Props, {}> {}
|
||||
}
|
||||
|
||||
declare var DateRangePicker: typeof ReactBootstrapDaterangepicker.DateRangePicker;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/// <reference path="./react-bootstrap-daterangepicker.d.tsx" />
|
||||
|
||||
|
||||
import * as DateRangePicker from "react-bootstrap-daterangepicker";
|
||||
import * as React from "react";
|
||||
|
||||
|
||||
4
react-cropper/index.d.ts
vendored
4
react-cropper/index.d.ts
vendored
@@ -13,9 +13,9 @@ import ImageData = cropperjs.ImageData;
|
||||
import CanvasData = cropperjs.CanvasData;
|
||||
import CropBoxData = cropperjs.CropBoxData;
|
||||
import CroppedCanvasOptions = cropperjs.CroppedCanvasOptions;
|
||||
type ReactCropperProps = cropperjs.CropperOptions & __React.HTMLProps<HTMLImageElement>;
|
||||
type ReactCropperProps = cropperjs.CropperOptions & React.HTMLProps<HTMLImageElement>;
|
||||
|
||||
declare class ReactCropper extends __React.Component<ReactCropperProps, {}> implements cropperjs.Cropper {
|
||||
declare class ReactCropper extends React.Component<ReactCropperProps, {}> implements cropperjs.Cropper {
|
||||
|
||||
/**
|
||||
* Show the crop box manually.
|
||||
|
||||
10
react-datagrid/index.d.ts
vendored
10
react-datagrid/index.d.ts
vendored
@@ -11,8 +11,6 @@ declare module "react-datagrid" {
|
||||
}
|
||||
|
||||
declare namespace ReactDataGrid {
|
||||
import React = __React;
|
||||
|
||||
interface DataGridProps extends React.Props<DataGrid> {
|
||||
/**
|
||||
* Array/String/Function/Promise - for local data, an array of object
|
||||
@@ -46,7 +44,7 @@ declare namespace ReactDataGrid {
|
||||
*/
|
||||
sortInfo?: SortInfo[];
|
||||
|
||||
style?: __React.CSSProperties;
|
||||
style?: React.CSSProperties;
|
||||
|
||||
/**
|
||||
* Object/Function - you can specify either a style object to be
|
||||
@@ -54,7 +52,7 @@ declare namespace ReactDataGrid {
|
||||
* (data, props) (so you have access to props.index for example) and
|
||||
* is expected to return a style object.
|
||||
*/
|
||||
rowStyle?: __React.CSSProperties | ((data: any, props: RowProps) => React.CSSProperties);
|
||||
rowStyle?: React.CSSProperties | ((data: any, props: RowProps) => React.CSSProperties);
|
||||
|
||||
/**
|
||||
* Boolean - show a column menu to show/hide columns.
|
||||
@@ -202,7 +200,7 @@ declare namespace ReactDataGrid {
|
||||
* Object - if you want cells in this column to be have a custom
|
||||
* style.
|
||||
*/
|
||||
style?: __React.CSSProperties;
|
||||
style?: React.CSSProperties;
|
||||
|
||||
/**
|
||||
* String - one of 'left', 'right', 'center'.
|
||||
@@ -305,6 +303,6 @@ declare namespace ReactDataGrid {
|
||||
}
|
||||
}
|
||||
|
||||
export class DataGrid extends __React.Component<DataGridProps, {}> {
|
||||
export class DataGrid extends React.Component<DataGridProps, {}> {
|
||||
}
|
||||
}
|
||||
|
||||
2
react-day-picker/index.d.ts
vendored
2
react-day-picker/index.d.ts
vendored
@@ -13,8 +13,6 @@ declare module "react-day-picker" {
|
||||
declare var DayPicker: typeof ReactDayPicker.DayPicker;
|
||||
|
||||
declare namespace ReactDayPicker {
|
||||
import React = __React;
|
||||
|
||||
interface LocaleUtils {
|
||||
formatMonthTitle: (month: Date, locale: string) => string;
|
||||
formatWeekdayShort: (weekday: number, locale: string) => string;
|
||||
|
||||
2
react-dnd/index.d.ts
vendored
2
react-dnd/index.d.ts
vendored
@@ -6,8 +6,6 @@
|
||||
///<reference types="react" />
|
||||
|
||||
declare module __ReactDnd {
|
||||
import React = __React;
|
||||
|
||||
// Decorated React Components
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
1
react-dropzone/index.d.ts
vendored
1
react-dropzone/index.d.ts
vendored
@@ -6,7 +6,6 @@
|
||||
///<reference types="react" />
|
||||
|
||||
declare namespace ReactDropzone {
|
||||
import React = __React;
|
||||
interface DropzoneProps {
|
||||
onDrop?: Function;
|
||||
onDropAccepted?: Function;
|
||||
|
||||
2
react-helmet/index.d.ts
vendored
2
react-helmet/index.d.ts
vendored
@@ -6,8 +6,6 @@
|
||||
/// <reference types="react" />
|
||||
|
||||
declare namespace ReactHelmet {
|
||||
import React = __React;
|
||||
|
||||
interface HelmetProps {
|
||||
title?: string;
|
||||
titleTemplate?: string;
|
||||
|
||||
4
react-holder/index.d.ts
vendored
4
react-holder/index.d.ts
vendored
@@ -5,10 +5,6 @@
|
||||
|
||||
///<reference types="react"/>
|
||||
|
||||
|
||||
|
||||
import React = __React;
|
||||
|
||||
interface ReactHolderProp extends React.HTMLAttributes {
|
||||
width: string | number;
|
||||
height: string | number;
|
||||
|
||||
2
react-infinite/index.d.ts
vendored
2
react-infinite/index.d.ts
vendored
@@ -11,8 +11,6 @@ declare module "react-infinite" {
|
||||
}
|
||||
|
||||
declare namespace ReactInfinite {
|
||||
import React = __React;
|
||||
|
||||
interface InfiniteProps extends React.Props<Infinite> {
|
||||
elementHeight: number | number[];
|
||||
containerHeight?: number;
|
||||
|
||||
4
react-input-calendar/index.d.ts
vendored
4
react-input-calendar/index.d.ts
vendored
@@ -48,7 +48,7 @@ declare namespace reactInputCalendar {
|
||||
/**
|
||||
* Set a function that will be triggered the when input field is blurred. It will return the event and the date in the props.computableFormat format.
|
||||
*/
|
||||
onBlur?: (event: __React.SyntheticEvent, computableDate: string) => void;
|
||||
onBlur?: (event: React.SyntheticEvent, computableDate: string) => void;
|
||||
/**
|
||||
* Define state when date picker would close once the user has clicked on a date.
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ declare namespace reactInputCalendar {
|
||||
disabled?: boolean;
|
||||
}
|
||||
interface ReactInputCalendarState { }
|
||||
export class ReactInputCalendar extends __React.Component<ReactInputCalendarProps, ReactInputCalendarState> {
|
||||
export class ReactInputCalendar extends React.Component<ReactInputCalendarProps, ReactInputCalendarState> {
|
||||
}
|
||||
}
|
||||
declare var ReactInputCalendar: typeof reactInputCalendar.ReactInputCalendar
|
||||
|
||||
2
react-intl/index.d.ts
vendored
2
react-intl/index.d.ts
vendored
@@ -6,8 +6,6 @@
|
||||
///<reference types="react" />
|
||||
|
||||
declare namespace ReactIntl {
|
||||
import React = __React;
|
||||
|
||||
interface Locale {
|
||||
locale: string;
|
||||
fields?: { [key: string]: string },
|
||||
|
||||
3
react-motion/index.d.ts
vendored
3
react-motion/index.d.ts
vendored
@@ -5,7 +5,6 @@
|
||||
|
||||
/// <reference types="react" />
|
||||
|
||||
|
||||
import { Component } from 'react';
|
||||
|
||||
// your typical style object given in props. Maps to a number or a spring config
|
||||
@@ -58,7 +57,7 @@ type Styles = Array<TransitionStyle> | InterpolateFunction;
|
||||
interface TransitionProps {
|
||||
defaultStyles?: Array<TransitionPlainStyle>;
|
||||
styles: Styles;
|
||||
children: (interpolatedStyles: Array<TransitionPlainStyle>) => __React.ReactElement<any>;
|
||||
children: (interpolatedStyles: Array<TransitionPlainStyle>) => React.ReactElement<any>;
|
||||
willEnter?: (styleThatEntered: TransitionStyle) => PlainStyle;
|
||||
willLeave?: (styleThatLeft: TransitionStyle) => Style;
|
||||
}
|
||||
|
||||
3
react-native/index.d.ts
vendored
3
react-native/index.d.ts
vendored
@@ -18,9 +18,6 @@
|
||||
|
||||
/// <reference types="react" />
|
||||
|
||||
//so we know what is "original" React
|
||||
import React = __React;
|
||||
|
||||
//react-native "extends" react
|
||||
declare module "react-native" {
|
||||
|
||||
|
||||
4
react-notification-system/index.d.ts
vendored
4
react-notification-system/index.d.ts
vendored
@@ -7,8 +7,6 @@
|
||||
|
||||
declare namespace NotificationSystem {
|
||||
|
||||
import React = __React;
|
||||
|
||||
export interface System extends React.Component<any, any> {
|
||||
addNotification(notification: Notification): Notification;
|
||||
removeNotification(notification: Notification): void;
|
||||
@@ -79,6 +77,6 @@ declare namespace NotificationSystem {
|
||||
|
||||
|
||||
declare module 'react-notification-system' {
|
||||
var component: __React.ClassicComponentClass<NotificationSystem.Attributes>;
|
||||
var component: React.ClassicComponentClass<NotificationSystem.Attributes>;
|
||||
export = component;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ ReactDOM.render((
|
||||
//
|
||||
declare var store: Store;
|
||||
declare var routerState: RouterState;
|
||||
declare var history: HistoryModule.History;
|
||||
declare var history: History.History;
|
||||
class MyRootComponent extends Component<any, any> {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-redux-2.1.2-tests.tsx"
|
||||
"react-redux-tests.tsx"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
|
||||
7
react-router-bootstrap/index.d.ts
vendored
7
react-router-bootstrap/index.d.ts
vendored
@@ -3,13 +3,10 @@
|
||||
// Definitions by: Vincent Lesierse <https://github.com/vlesierse>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
///<reference types="react"/>
|
||||
///<reference types="react-router"/>
|
||||
/// <reference types="react"/>
|
||||
/// <reference types="react-router"/>
|
||||
|
||||
declare namespace ReactRouterBootstrap {
|
||||
// Import React
|
||||
import React = __React;
|
||||
|
||||
interface LinkContainerProps extends ReactRouter.LinkProps {
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
/// <reference types="redux" />
|
||||
/// <reference types="react-router" />
|
||||
|
||||
|
||||
|
||||
import { createStore, combineReducers, applyMiddleware } from 'redux';
|
||||
import { browserHistory } from 'react-router';
|
||||
import { syncHistoryWithStore, routerReducer, routerMiddleware, push, replace, go, goForward, goBack } from 'react-router-redux';
|
||||
|
||||
1
react-router/index.d.ts
vendored
1
react-router/index.d.ts
vendored
@@ -47,6 +47,7 @@ export type RouterListener = Router.RouterListener;
|
||||
export type RouterState = Router.RouterState;
|
||||
export type HistoryBase = History.HistoryBase;
|
||||
export type RouterOnContext = Router.RouterOnContext;
|
||||
export type LinkProps = Link.LinkProps;
|
||||
|
||||
export {
|
||||
Router,
|
||||
|
||||
4
react-tagcloud/index.d.ts
vendored
4
react-tagcloud/index.d.ts
vendored
@@ -6,7 +6,7 @@
|
||||
///<reference types="react"/>
|
||||
|
||||
declare namespace ReactTagCloud {
|
||||
interface TagCloudProps extends __React.Props<void> {
|
||||
interface TagCloudProps extends React.Props<void> {
|
||||
tags: any[];
|
||||
maxSize: number;
|
||||
minSize: number;
|
||||
@@ -15,7 +15,7 @@ declare namespace ReactTagCloud {
|
||||
className?: string;
|
||||
onClick?: Function;
|
||||
}
|
||||
interface TagCloudClass extends __React.ComponentClass<TagCloudProps> { }
|
||||
interface TagCloudClass extends React.ComponentClass<TagCloudProps> { }
|
||||
|
||||
interface DefaultRendererFactoryOptions {
|
||||
tagRenderer?: Function;
|
||||
|
||||
3
rebass/index.d.ts
vendored
3
rebass/index.d.ts
vendored
@@ -5,9 +5,6 @@
|
||||
|
||||
///<reference types="react" />
|
||||
|
||||
|
||||
export import React = __React;
|
||||
|
||||
export interface BaseProps<C> extends React.Props<C> {
|
||||
tagName?: string;
|
||||
className?: string;
|
||||
|
||||
Reference in New Issue
Block a user