mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Fix failing packages (#13624)
* Use correct cases for type reference * Add missing dependency on jquery * Switch to module and add tslint * Fix failing test * Fix triple-slash reference * Remove reference to `__React` * Add import for react-native * Add missing react import * Switch to module * Switch to module, add react import * Make sure test is resilient to lib changes
This commit is contained in:
2
angular-localforage/index.d.ts
vendored
2
angular-localforage/index.d.ts
vendored
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Stefan Steinhart <https://github.com/reppners>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="localForage" />
|
||||
/// <reference types="localforage" />
|
||||
/// <reference types="angular" />
|
||||
|
||||
import * as angular from 'angular';
|
||||
|
||||
2
datatables-buttons/index.d.ts
vendored
2
datatables-buttons/index.d.ts
vendored
@@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="jquery" />
|
||||
/// <reference types="jquery.dataTables"/>
|
||||
/// <reference types="jquery.datatables"/>
|
||||
|
||||
declare namespace DataTables {
|
||||
export interface Settings {
|
||||
|
||||
2
ej.web.all/index.d.ts
vendored
2
ej.web.all/index.d.ts
vendored
@@ -3,6 +3,8 @@
|
||||
// Definitions by: Syncfusion <https://github.com/syncfusion/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="jquery" />
|
||||
|
||||
/*!
|
||||
* filename: ej.web.all.d.ts
|
||||
* version : 14.4.0.20
|
||||
|
||||
8
localforage-cordovasqlitedriver/index.d.ts
vendored
8
localforage-cordovasqlitedriver/index.d.ts
vendored
@@ -3,9 +3,7 @@
|
||||
// Definitions by: Thodoris Greasidis <https://github.com/thgreasi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="localForage" />
|
||||
/// <reference types="localforage" />
|
||||
|
||||
declare module "localforage-cordovasqlitedriver" {
|
||||
var cordovaSQLiteDriver: LocalForageDriver;
|
||||
export = cordovaSQLiteDriver;
|
||||
}
|
||||
declare var cordovaSQLiteDriver: LocalForageDriver;
|
||||
export = cordovaSQLiteDriver;
|
||||
|
||||
1
localforage-cordovasqlitedriver/tslint.json
Normal file
1
localforage-cordovasqlitedriver/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
@@ -97,7 +97,7 @@ let eventTarget: EventTarget = {
|
||||
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean) { return; }
|
||||
}
|
||||
|
||||
let ndefTagEvent: NdefTagEvent = {
|
||||
let ndefTagEvent = {
|
||||
bubbles: false,
|
||||
cancelBubble: false,
|
||||
cancelable: false,
|
||||
@@ -117,6 +117,9 @@ let ndefTagEvent: NdefTagEvent = {
|
||||
AT_TARGET: 0,
|
||||
BUBBLING_PHASE: 0,
|
||||
CAPTURING_PHASE: 0,
|
||||
|
||||
scoped: false,
|
||||
deepPath(): any { },
|
||||
tag: ndefTag
|
||||
};
|
||||
|
||||
let event: NdefTagEvent = ndefTagEvent;
|
||||
2
react-flexr/index.d.ts
vendored
2
react-flexr/index.d.ts
vendored
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Jeffery Grajkowski <https://github.com/pushplay>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// <reference types="react" />
|
||||
/// <reference types="react" />
|
||||
|
||||
declare namespace __ReactFlexr {
|
||||
interface GridProps extends React.Props<Grid> {
|
||||
|
||||
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
|
||||
import React = __React;
|
||||
|
||||
interface Locale {
|
||||
locale: string;
|
||||
|
||||
5
react-native-sortable-list/index.d.ts
vendored
5
react-native-sortable-list/index.d.ts
vendored
@@ -4,6 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as React from 'react';
|
||||
import { ViewStyle } from 'react-native';
|
||||
|
||||
type DataKey = string | number;
|
||||
|
||||
@@ -42,12 +43,12 @@ interface SortableListProps {
|
||||
/**
|
||||
* style of HOC
|
||||
*/
|
||||
style?: React.ViewStyle
|
||||
style?: ViewStyle
|
||||
|
||||
/**
|
||||
* these styles will be applied to the inner scroll view content container
|
||||
*/
|
||||
contentContainerStyle?: React.ViewStyle
|
||||
contentContainerStyle?: ViewStyle
|
||||
|
||||
/**
|
||||
* when false, rows are not sortable. The default value is true.
|
||||
|
||||
2
react-onclickoutside/index.d.ts
vendored
2
react-onclickoutside/index.d.ts
vendored
@@ -3,6 +3,8 @@
|
||||
// Definitions by: Karol Janyst <https://github.com/LKay>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
declare namespace ReactOnClickOutside {
|
||||
interface OnClickOutsideComponent {
|
||||
handleClickOutside(e: React.MouseEvent<any>): void
|
||||
|
||||
164
react-paginate/index.d.ts
vendored
164
react-paginate/index.d.ts
vendored
@@ -3,106 +3,104 @@
|
||||
// Definitions by: Simon Hartcher <https://github.com/deevus>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module "react-paginate" {
|
||||
import * as React from "react";
|
||||
import * as React from "react";
|
||||
|
||||
interface ReactPaginateProps {
|
||||
/**
|
||||
* The total number of pages.
|
||||
*/
|
||||
pageNum: number;
|
||||
interface ReactPaginateProps {
|
||||
/**
|
||||
* The total number of pages.
|
||||
*/
|
||||
pageNum: number;
|
||||
|
||||
/**
|
||||
* The range of pages displayed.
|
||||
*/
|
||||
pageRangeDisplayed: number;
|
||||
/**
|
||||
* The range of pages displayed.
|
||||
*/
|
||||
pageRangeDisplayed: number;
|
||||
|
||||
/**
|
||||
* The number of pages to display for margins.
|
||||
*/
|
||||
marginPagesDisplayed: number;
|
||||
/**
|
||||
* The number of pages to display for margins.
|
||||
*/
|
||||
marginPagesDisplayed: number;
|
||||
|
||||
/**
|
||||
* Label for the `previous` button.
|
||||
*/
|
||||
previousLabel?: string | JSX.Element;
|
||||
/**
|
||||
* Label for the `previous` button.
|
||||
*/
|
||||
previousLabel?: string | JSX.Element;
|
||||
|
||||
/**
|
||||
* Label for the `next` button.
|
||||
*/
|
||||
nextLabel?: string | JSX.Element;
|
||||
/**
|
||||
* Label for the `next` button.
|
||||
*/
|
||||
nextLabel?: string | JSX.Element;
|
||||
|
||||
/**
|
||||
* Label for ellipsis.
|
||||
*/
|
||||
breakLabel?: string | JSX.Element;
|
||||
/**
|
||||
* Label for ellipsis.
|
||||
*/
|
||||
breakLabel?: string | JSX.Element;
|
||||
|
||||
/**
|
||||
* The classname on tag `li` of the ellipsis element.
|
||||
*/
|
||||
breakClassName?: string | JSX.Element;
|
||||
/**
|
||||
* The classname on tag `li` of the ellipsis element.
|
||||
*/
|
||||
breakClassName?: string | JSX.Element;
|
||||
|
||||
/**
|
||||
* The method to call when a page is clicked.
|
||||
*/
|
||||
clickCallback?: Function;
|
||||
/**
|
||||
* The method to call when a page is clicked.
|
||||
*/
|
||||
clickCallback?: Function;
|
||||
|
||||
/**
|
||||
* The initial page selected.
|
||||
*/
|
||||
initialSelected?: number;
|
||||
/**
|
||||
* The initial page selected.
|
||||
*/
|
||||
initialSelected?: number;
|
||||
|
||||
/**
|
||||
* To override selected page with parent prop.
|
||||
*/
|
||||
forceSelected?: number;
|
||||
/**
|
||||
* To override selected page with parent prop.
|
||||
*/
|
||||
forceSelected?: number;
|
||||
|
||||
/**
|
||||
* The classname of the pagination container.
|
||||
*/
|
||||
containerClassName?: string;
|
||||
/**
|
||||
* The classname of the pagination container.
|
||||
*/
|
||||
containerClassName?: string;
|
||||
|
||||
/**
|
||||
* The classname on tag `li` of each page element.
|
||||
*/
|
||||
pageClassName?: string;
|
||||
/**
|
||||
* The classname on tag `li` of each page element.
|
||||
*/
|
||||
pageClassName?: string;
|
||||
|
||||
/**
|
||||
* The classname on tag `a` of each page element.
|
||||
*/
|
||||
pageLinkClassName?: string;
|
||||
/**
|
||||
* The classname on tag `a` of each page element.
|
||||
*/
|
||||
pageLinkClassName?: string;
|
||||
|
||||
/**
|
||||
* The classname for the active page.
|
||||
*/
|
||||
activeClassName?: string;
|
||||
/**
|
||||
* The classname for the active page.
|
||||
*/
|
||||
activeClassName?: string;
|
||||
|
||||
/**
|
||||
* The classname on tag `li` of the `previous` button.
|
||||
*/
|
||||
previousClassName?: string;
|
||||
/**
|
||||
* The classname on tag `li` of the `previous` button.
|
||||
*/
|
||||
previousClassName?: string;
|
||||
|
||||
/**
|
||||
* The classname on tag `li` of the `next` button.
|
||||
*/
|
||||
nextClassName?: string;
|
||||
/**
|
||||
* The classname on tag `li` of the `next` button.
|
||||
*/
|
||||
nextClassName?: string;
|
||||
|
||||
/**
|
||||
* The classname on tag `a` of the `previous` button.
|
||||
*/
|
||||
previousLinkClassName?: string;
|
||||
/**
|
||||
* The classname on tag `a` of the `previous` button.
|
||||
*/
|
||||
previousLinkClassName?: string;
|
||||
|
||||
/**
|
||||
* The classname on tag `a` of the `next` button.
|
||||
*/
|
||||
nextLinkClassName?: string;
|
||||
/**
|
||||
* The classname on tag `a` of the `next` button.
|
||||
*/
|
||||
nextLinkClassName?: string;
|
||||
|
||||
/**
|
||||
* The classname for disabled `previous` and `next` buttons.
|
||||
*/
|
||||
disabledClassName?: string;
|
||||
}
|
||||
|
||||
const ReactPaginate: React.ComponentClass<ReactPaginateProps>;
|
||||
export = ReactPaginate;
|
||||
/**
|
||||
* The classname for disabled `previous` and `next` buttons.
|
||||
*/
|
||||
disabledClassName?: string;
|
||||
}
|
||||
|
||||
declare const ReactPaginate: React.ComponentClass<ReactPaginateProps>;
|
||||
export = ReactPaginate;
|
||||
|
||||
38
reactcss/index.d.ts
vendored
38
reactcss/index.d.ts
vendored
@@ -3,28 +3,26 @@
|
||||
// Definitions by: Karol Janyst <https://github.com/LKay>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace ReactCSS {
|
||||
interface LoopableProps {
|
||||
"first-child"?: boolean
|
||||
"last-child"?: boolean
|
||||
even?: boolean
|
||||
odd?: boolean
|
||||
[nthChild: string]: boolean
|
||||
}
|
||||
import * as React from "react"
|
||||
|
||||
interface HoverProps {
|
||||
hover?: boolean
|
||||
}
|
||||
|
||||
interface Classes {
|
||||
default: any
|
||||
[scope: string]: any
|
||||
}
|
||||
interface LoopableProps {
|
||||
"first-child"?: boolean
|
||||
"last-child"?: boolean
|
||||
even?: boolean
|
||||
odd?: boolean
|
||||
[nthChild: string]: boolean
|
||||
}
|
||||
|
||||
declare module "reactcss" {
|
||||
export type LoopableProps = ReactCSS.LoopableProps
|
||||
export function hover<A>(component: React.ComponentClass<A> | React.StatelessComponent<A>): React.ComponentClass<A>
|
||||
export function loop(i: number, length: number): ReactCSS.LoopableProps
|
||||
export default function reactCSS (classes: ReactCSS.Classes, ...activations: Array<any>): any
|
||||
interface HoverProps {
|
||||
hover?: boolean
|
||||
}
|
||||
|
||||
interface Classes {
|
||||
default: any
|
||||
[scope: string]: any
|
||||
}
|
||||
|
||||
export function hover<A>(component: React.ComponentClass<A> | React.StatelessComponent<A>): React.ComponentClass<A>
|
||||
export function loop(i: number, length: number): LoopableProps
|
||||
export default function reactCSS(classes: Classes, ...activations: Array<any>): any
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import * as React from "react"
|
||||
import { StatelessComponent } from "react"
|
||||
import { render } from "react-dom"
|
||||
import { default as reactCSS, hover, loop } from "reactcss"
|
||||
import { default as reactCSS, hover, loop, LoopableProps, HoverProps } from "reactcss"
|
||||
|
||||
interface TestProps extends ReactCSS.HoverProps {}
|
||||
interface TestProps extends HoverProps { }
|
||||
|
||||
var styles: any = reactCSS({
|
||||
default : {},
|
||||
hover : {}
|
||||
}, { hover : true })
|
||||
default: {},
|
||||
hover: {}
|
||||
}, { hover: true })
|
||||
|
||||
var loopProps: ReactCSS.LoopableProps = loop(1, 10)
|
||||
var loopProps: LoopableProps = loop(1, 10)
|
||||
|
||||
var TestComponent: StatelessComponent<TestProps>
|
||||
var Test = hover(TestComponent)
|
||||
|
||||
Reference in New Issue
Block a user