This commit is contained in:
Jeongho Nam
2016-07-27 14:39:14 +09:00
10 changed files with 67 additions and 37 deletions
+1 -1
View File
@@ -5686,7 +5686,7 @@ declare namespace dojo {
* @param dest The object to which to copy/add all properties contained in source. If dest is falsy, thena new object is manufactured before copying/adding properties begins.
* @param sources One of more objects from which to draw all properties to copy into dest. sources are processedleft-to-right and if more than one of these objects contain the same property name, the right-mostvalue "wins".
*/
mixin(dest: Object, sources: Object[]): Object;
mixin(dest: Object, source: Object, sources?: Object[]): Object;
/**
* similar to hitch() except that the scope object is left to be
* whatever the execution context eventually becomes.
+10 -1
View File
@@ -46,7 +46,16 @@ declare module "nodemailer" {
* @param pluginFunc is a function that takes two arguments: the mail object and a callback function
*/
use(step: string, plugin: Plugin): void;
/**
* Verifies connection with server
*/
verify(callback: (error: Error, success?: boolean) => void): void;
/**
* Verifies connection with server
*/
verify(): Promise<void>;
/**
* Close all connections
+4
View File
@@ -3349,3 +3349,7 @@ id(value: number|string): this;
}
}
declare var nv : nv.Nvd3Static;
declare module "nvd3" {
export = nv;
}
@@ -23,7 +23,7 @@ function priceFormatter(cell: any, row: any) {
render(
<BootstrapTable data={products} striped={true} hover={true}>
<TableHeaderColumn dataField="id" isKey={true} dataAlign="center" dataSort={true}>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField="name" dataSort={true}>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField="name" dataSort={true} editable={{ type: 'textarea', rows: 10 }}>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField="price" dataFormat={priceFormatter}>Product Price</TableHeaderColumn>
</BootstrapTable>,
document.getElementById("app")
+7 -1
View File
@@ -1,6 +1,6 @@
// Type definitions for react-bootstrap-table v2.3.0
// Project: https://github.com/AllenFang/react-bootstrap-table
// Definitions by: Frank Laub <https://github.com/flaub>, Michael Scharf <https://github.com/scharf>
// Definitions by: Frank Laub <https://github.com/flaub>, Michael Scharf <https://github.com/scharf>, Ian Ker-Seymer <https://github.com/ianks>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../react/react.d.ts" />
@@ -556,6 +556,12 @@ declare module "react-bootstrap-table" {
*/
options?: any;
/**
Configuration for the textarea editable type
*/
cols?: number;
rows?: number;
}
export type FilterType = 'TextFilter' | 'RegexFilter' | 'SelectFilter' | 'NumberFilter' | 'DateFilter' | 'CustomFilter';
@@ -14,8 +14,6 @@ import DropTarget = ReactDnd.DropTarget;
import DragLayer = ReactDnd.DragLayer;
import DragDropContext = ReactDnd.DragDropContext;
import HTML5Backend, { getEmptyImage } from 'react-dnd-html5-backend';
import TestBackend = require('react-dnd/modules/backends/Test');
// Game Component
// ----------------------------------------------------------------------
@@ -285,7 +283,6 @@ namespace Board {
}
export var createWithHTMLBackend = React.createFactory(DragDropContext(HTML5Backend)(Board));
export var createWithTestBackend = React.createFactory(DragDropContext(TestBackend)(Board));
}
// Render the Board Component
@@ -294,8 +291,3 @@ namespace Board {
Board.createWithHTMLBackend({
knightPosition: [0, 0]
});
Board.createWithTestBackend({
knightPosition: [0, 0]
});
+16
View File
@@ -0,0 +1,16 @@
// Type definitions for React DnD HTML 5 Backend v2.0.0
// Project: https://github.com/gaearon/react-dnd
// Definitions by: Asana <https://asana.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path='./react-dnd.d.ts' />
declare module "react-dnd-html5-backend" {
export namespace NativeTypes {
export const FILE: string;
export const URL: string;
export const TEXT: string;
}
export function getEmptyImage(): any; // Image
export default class HTML5Backend implements __ReactDnd.Backend { }
}
+22
View File
@@ -0,0 +1,22 @@
// Type definitions for React DnD HTML 5 Backend v2.0.0
// Project: https://github.com/gaearon/react-dnd
// Definitions by: Asana <https://asana.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path='./react-dnd.d.ts' />
declare module "react-dnd-test-backend" {
class TestBackend {
setup(): void;
teardown(): void;
connectDragSource(): void;
connectDropTarget(): void;
simulateBeginDrag(sourceIds: __ReactDnd.Identifier[], options?: {}): void;
simulatePublishDragSource(): void;
simulateHover(targetIds: __ReactDnd.Identifier[], options?: {}): void;
simulateDrop(): void;
simulateEndDrag(): void;
}
export { TestBackend as default };
}
+5 -2
View File
@@ -1,4 +1,6 @@
///<reference path="react-dnd.d.ts" />
///<reference path="react-dnd-html5-backend.d.ts" />
///<reference path="react-dnd-test-backend.d.ts" />
"use strict";
// Test adapted from the ReactDnD chess game tutorial:
@@ -13,8 +15,8 @@ import DragSource = ReactDnd.DragSource;
import DropTarget = ReactDnd.DropTarget;
import DragLayer = ReactDnd.DragLayer;
import DragDropContext = ReactDnd.DragDropContext;
import HTML5Backend, { getEmptyImage } from 'react-dnd/modules/backends/HTML5';
import TestBackend = require('react-dnd/modules/backends/Test');
import HTML5Backend, { getEmptyImage, NativeTypes } from "react-dnd-html5-backend";
import TestBackend from "react-dnd-test-backend";
// Game Component
// ----------------------------------------------------------------------
@@ -199,6 +201,7 @@ namespace BoardSquare {
}
export var DndBoardSquare = DropTarget(ItemTypes.KNIGHT, boardSquareTarget, boardSquareCollect)(BoardSquare);
export var fileDropTarget = DropTarget(NativeTypes.FILE, boardSquareTarget, boardSquareCollect)(BoardSquare);
export var create = React.createFactory(DndBoardSquare);
}
+1 -23
View File
@@ -1,4 +1,4 @@
// Type definitions for React DnD v1.1.4
// Type definitions for React DnD v2.0.2
// Project: https://github.com/gaearon/react-dnd
// Definitions by: Asana <https://asana.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -178,25 +178,3 @@ declare module __ReactDnd {
declare module "react-dnd" {
export = __ReactDnd;
}
declare module "react-dnd/modules/backends/HTML5" {
export enum NativeTypes { FILE, URL, TEXT }
export function getEmptyImage(): any; // Image
export default class HTML5Backend implements __ReactDnd.Backend {}
}
declare module "react-dnd/modules/backends/Test" {
class TestBackend {
setup(): void;
teardown(): void;
connectDragSource(): void;
connectDropTarget(): void;
simulateBeginDrag(sourceIds: __ReactDnd.Identifier[], options?: {}): void;
simulatePublishDragSource(): void;
simulateHover(targetIds: __ReactDnd.Identifier[], options?: {}): void;
simulateDrop(): void;
simulateEndDrag(): void;
}
export = TestBackend;
}