Merge branch 'master' into activex-libreoffice

This commit is contained in:
Zev Spitz
2017-09-11 08:19:51 +03:00
committed by GitHub
25 changed files with 6567 additions and 82 deletions

View File

@@ -4,6 +4,11 @@ import * as util from 'util';
var client = new cassandra.Client({ contactPoints: ['h1', 'h2'], keyspace: 'ks1'});
var query = 'SELECT email, last_name FROM user_profiles WHERE key=?';
client.execute(query, ['guy'], function(err: any, result: any) {
client.execute(query, ['guy'], function(err, result) {
console.log('got user profile with email ' + result.rows[0].email);
});
});
client.execute(query, [ 'guy' ], { prepare: true }).then(
(result) => console.log(result.first().email),
(error) => console.log(error)
);

View File

@@ -1,7 +1,8 @@
// Type definitions for nodejs-driver v0.8.2
// Type definitions for cassandra-driver v3.2.2
// Project: https://github.com/datastax/nodejs-driver
// Definitions by: Marc Fisher <https://github.com/Svjard>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
/// <reference types="long" />
@@ -378,6 +379,7 @@ export namespace types {
values(): Array<{ [key: string]: any; }>;
keys(): Array<string>;
forEach(callback: Callback): void;
[key: string]: any;
}
interface TimeUuidStatic {
@@ -506,10 +508,15 @@ export interface Client extends events.EventEmitter {
metadata: metadata.Metadata;
batch(queries: Array<string> | Array<{ query: string, params?: any }>, options: QueryOptions, callback: ResultCallback): void;
batch(queries: Array<string> | Array<{ query: string, params?: any }>, callback: ResultCallback): void;
batch(queries: Array<string> | Array<{ query: string, params?: any }>, options?: QueryOptions): Promise<types.ResultSet>;
connect(callback: Callback): void;
eachRow(query: string, params?: any, options?: QueryOptions, rowCallback?: Callback, callback?: Callback): void;
execute(query: string, params?: any, callback?: ResultCallback): void;
execute(query: string, params?: any, options?: QueryOptions, callback?: ResultCallback): void;
execute(query: string, params: any, options: QueryOptions, callback: ResultCallback): void;
execute(query: string, params: any, callback: ResultCallback): void;
execute(query: string, callback: ResultCallback): void;
execute(query: string, params?: any, options?: QueryOptions): Promise<types.ResultSet>;
getReplicas(keyspace: string, token: Buffer): Array<any>; // TODO: Should this be a more explicit return?
shutdown(callback?: Callback): void;
stream(query: string, params?: any, options?: QueryOptions, callback?: Callback): NodeJS.ReadableStream;

View File

@@ -1,4 +1,5 @@
import * as Docker from 'dockerode';
import * as fs from 'fs';
// Code samples from Dockerode 'Getting started'
const docker = new Docker();
@@ -25,6 +26,24 @@ const docker6 = new Docker({
});
const docker7 = new Docker({
host: '192.168.1.10',
port: process.env.DOCKER_PORT || 2375,
ca: fs.readFileSync('ca.pem'),
cert: fs.readFileSync('cert.pem'),
key: fs.readFileSync('key.pem'),
version: 'v1.25' // required when Docker >= v1.13, https://docs.docker.com/engine/api/version-history/
});
const docker8 = new Docker({
protocol: 'https', // you can enforce a protocol
host: '192.168.1.10',
port: process.env.DOCKER_PORT || 2375,
ca: fs.readFileSync('ca.pem'),
cert: fs.readFileSync('cert.pem'),
key: fs.readFileSync('key.pem')
});
const docker9 = new Docker({
Promise
});

View File

@@ -1,8 +1,9 @@
// Type definitions for dockerode 2.4
// Type definitions for dockerode 2.5
// Project: https://github.com/apocas/dockerode
// Definitions by: Carl Winkler <https://github.com/seikho>
// Nicolas Laplante <https://github.com/nlaplante>
// ByeongHun Yoo <https://github.com/isac322>
// Ray Fang <https://github.com/lazarusx>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -655,15 +656,21 @@ declare namespace Dockerode {
};
}
interface KeyObject {
pem: string | Buffer;
passphrase?: string;
}
interface DockerOptions {
socketPath?: string;
host?: string;
port?: number | string;
ca?: string;
cert?: string;
key?: string;
ca?: string | string[] | Buffer | Buffer[];
cert?: string | string[] | Buffer | Buffer[];
key?: string | string[] | Buffer | Buffer[] | KeyObject[];
protocol?: "https" | "http";
timeout?: number;
version?: string;
Promise?: typeof Promise;
}

View File

@@ -23,7 +23,7 @@ $.fancybox.update();
$.fancybox.toggle();
$.fancybox.showLoading();
$.fancybox.hideLoading();
$(".selector").fancybox({ 'type': 'image' });
$(".selector").fancybox({ type: 'image' });
$("#single_1").fancybox({
helpers: {
title: {
@@ -114,7 +114,7 @@ $(".fancybox").fancybox({
});
$(".fancybox").fancybox({
beforeLoad: () => {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
this.title = this.title ? `Image ${this.index + 1} of ${this.group.length} - ${this.title}` : `Image ${this.index + 1} of ${this.group.length}`;
}
});
$.fancybox('<div><h1>Lorem Lipsum</h1><p>Lorem lipsum</p></div>', {
@@ -142,4 +142,4 @@ $.fancybox([
$(".fancybox").fancybox({
margin: [20, 60, 20, 60]
});
});

View File

@@ -4,7 +4,6 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery" />
interface FancyboxOptions extends FancyboxCallback {
@@ -79,18 +78,18 @@ interface FancyboxOptions extends FancyboxCallback {
}
interface FancyboxMethods {
open(group?: any[], options?: FancyboxOptions);
cancel();
close(force?: boolean);
play();
next();
prev();
jumpto(index?: number);
reposition();
update();
toggle();
showLoading();
hideLoading();
open(group?: any[], options?: FancyboxOptions): void;
cancel(): void;
close(force?: boolean): void;
play(): void;
next(): void;
prev(): void;
jumpto(index?: number): void;
reposition(): void;
update(): void;
toggle(): void;
showLoading(): void;
hideLoading(): void;
(options: FancyboxOptions): void;
(selector: string, options?: FancyboxOptions): void;

View File

@@ -0,0 +1,7 @@
{
"extends": "dtslint/dt.json",
"rules": {
"ban-types": false,
"unified-signatures": false
}
}

View File

@@ -1,4 +1,14 @@
import {
ScalarTypeDefinitionNode,
ObjectTypeDefinitionNode,
FieldDefinitionNode,
InputValueDefinitionNode,
InterfaceTypeDefinitionNode,
UnionTypeDefinitionNode,
EnumTypeDefinitionNode,
EnumValueDefinitionNode,
InputObjectTypeDefinitionNode,
TypeExtensionDefinitionNode,
OperationDefinitionNode,
FieldNode,
FragmentDefinitionNode,
@@ -156,6 +166,7 @@ export type Thunk<T> = (() => T) | T;
export class GraphQLScalarType {
name: string;
description: string;
astNode?: ScalarTypeDefinitionNode;
constructor(config: GraphQLScalarTypeConfig<any, any>);
// Serializes an internal value to include in a response.
@@ -173,6 +184,7 @@ export class GraphQLScalarType {
export interface GraphQLScalarTypeConfig<TInternal, TExternal> {
name: string;
description?: string;
astNode?: ScalarTypeDefinitionNode;
serialize(value: any): TExternal | null | undefined;
parseValue?(value: any): TInternal | null | undefined;
parseLiteral?(valueNode: ValueNode): TInternal | null | undefined;
@@ -218,6 +230,8 @@ export interface GraphQLScalarTypeConfig<TInternal, TExternal> {
export class GraphQLObjectType {
name: string;
description: string;
astNode?: ObjectTypeDefinitionNode;
extensionASTNodes: Array<TypeExtensionDefinitionNode>;
isTypeOf: GraphQLIsTypeOfFn<any, any>;
constructor(config: GraphQLObjectTypeConfig<any, any>);
@@ -232,6 +246,8 @@ export interface GraphQLObjectTypeConfig<TSource, TContext> {
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext>>;
isTypeOf?: GraphQLIsTypeOfFn<TSource, TContext>;
description?: string;
astNode?: ObjectTypeDefinitionNode;
extensionASTNodes?: Array<TypeExtensionDefinitionNode>;
}
export type GraphQLTypeResolver<TSource, TContext> = (
@@ -274,6 +290,7 @@ export interface GraphQLFieldConfig<TSource, TContext> {
resolve?: GraphQLFieldResolver<TSource, TContext>;
deprecationReason?: string;
description?: string;
astNode?: FieldDefinitionNode;
}
export interface GraphQLFieldConfigArgumentMap {
@@ -284,6 +301,7 @@ export interface GraphQLArgumentConfig {
type: GraphQLInputType;
defaultValue?: any;
description?: string;
astNode?: InputValueDefinitionNode;
}
export interface GraphQLFieldConfigMap<TSource, TContext> {
@@ -298,6 +316,7 @@ export interface GraphQLField<TSource, TContext> {
resolve?: GraphQLFieldResolver<TSource, TContext>;
isDeprecated?: boolean;
deprecationReason?: string;
astNode?: FieldDefinitionNode;
}
export interface GraphQLArgument {
@@ -305,6 +324,7 @@ export interface GraphQLArgument {
type: GraphQLInputType;
defaultValue?: any;
description?: string;
astNode?: InputValueDefinitionNode;
}
export interface GraphQLFieldMap<TSource, TContext> {
@@ -332,6 +352,7 @@ export interface GraphQLFieldMap<TSource, TContext> {
export class GraphQLInterfaceType {
name: string;
description: string;
astNode?: InterfaceTypeDefinitionNode;
resolveType: GraphQLTypeResolver<any, any>;
constructor(config: GraphQLInterfaceTypeConfig<any, any>);
@@ -351,6 +372,7 @@ export interface GraphQLInterfaceTypeConfig<TSource, TContext> {
*/
resolveType?: GraphQLTypeResolver<TSource, TContext>;
description?: string;
astNode?: InterfaceTypeDefinitionNode;
}
/**
@@ -379,6 +401,7 @@ export interface GraphQLInterfaceTypeConfig<TSource, TContext> {
export class GraphQLUnionType {
name: string;
description: string;
astNode?: UnionTypeDefinitionNode;
resolveType: GraphQLTypeResolver<any, any>;
constructor(config: GraphQLUnionTypeConfig<any, any>);
@@ -398,6 +421,7 @@ export interface GraphQLUnionTypeConfig<TSource, TContext> {
*/
resolveType?: GraphQLTypeResolver<TSource, TContext>;
description?: string;
astNode?: UnionTypeDefinitionNode;
}
/**
@@ -424,6 +448,7 @@ export interface GraphQLUnionTypeConfig<TSource, TContext> {
export class GraphQLEnumType {
name: string;
description: string;
astNode?: EnumTypeDefinitionNode;
constructor(config: GraphQLEnumTypeConfig);
getValues(): GraphQLEnumValue[];
@@ -438,6 +463,7 @@ export interface GraphQLEnumTypeConfig {
name: string;
values: GraphQLEnumValueConfigMap;
description?: string;
astNode?: EnumTypeDefinitionNode;
}
export interface GraphQLEnumValueConfigMap {
@@ -448,6 +474,7 @@ export interface GraphQLEnumValueConfig {
value?: any;
deprecationReason?: string;
description?: string;
astNode?: EnumValueDefinitionNode;
}
export interface GraphQLEnumValue {
@@ -455,6 +482,7 @@ export interface GraphQLEnumValue {
description: string;
isDeprecated?: boolean;
deprecationReason: string;
astNode?: EnumValueDefinitionNode;
value: any;
}
@@ -481,6 +509,7 @@ export interface GraphQLEnumValue {
export class GraphQLInputObjectType {
name: string;
description: string;
astNode?: InputObjectTypeDefinitionNode;
constructor(config: GraphQLInputObjectTypeConfig);
getFields(): GraphQLInputFieldMap;
toString(): string;
@@ -490,12 +519,14 @@ export interface GraphQLInputObjectTypeConfig {
name: string;
fields: Thunk<GraphQLInputFieldConfigMap>;
description?: string;
astNode?: InputObjectTypeDefinitionNode;
}
export interface GraphQLInputFieldConfig {
type: GraphQLInputType;
defaultValue?: any;
description?: string;
astNode?: InputValueDefinitionNode;
}
export interface GraphQLInputFieldConfigMap {
@@ -507,6 +538,7 @@ export interface GraphQLInputField {
type: GraphQLInputType;
defaultValue?: any;
description?: string;
astNode?: InputValueDefinitionNode;
}
export interface GraphQLInputFieldMap {

View File

@@ -2,6 +2,7 @@ import {
GraphQLFieldConfigArgumentMap,
GraphQLArgument
} from './definition';
import { DirectiveDefinitionNode } from '../language/ast';
export const DirectiveLocation: {
// Operations
@@ -34,9 +35,10 @@ export type DirectiveLocationEnum = keyof typeof DirectiveLocation;
*/
export class GraphQLDirective {
name: string;
description: string;
description?: string;
locations: DirectiveLocationEnum[];
args: GraphQLArgument[];
astNode?: DirectiveDefinitionNode;
constructor(config: GraphQLDirectiveConfig);
}
@@ -46,6 +48,7 @@ export interface GraphQLDirectiveConfig {
description?: string;
locations: DirectiveLocationEnum[];
args?: GraphQLFieldConfigArgumentMap;
astNode?: DirectiveDefinitionNode;
}
/**

View File

@@ -6,6 +6,9 @@ import {
GraphQLNamedType,
GraphQLAbstractType
} from './definition';
import {
SchemaDefinitionNode
} from '../language/ast';
import {
GraphQLDirective,
} from './directives';
@@ -37,6 +40,7 @@ import {
*
*/
export class GraphQLSchema {
astNode?: SchemaDefinitionNode;
// private _queryType: GraphQLObjectType;
// private _mutationType: GraphQLObjectType;
// private _subscriptionType: GraphQLObjectType;
@@ -69,4 +73,5 @@ export interface GraphQLSchemaConfig {
subscription?: GraphQLObjectType;
types?: GraphQLNamedType[];
directives?: GraphQLDirective[];
astNode?: SchemaDefinitionNode;
}

14
types/jest-docblock/index.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
// Type definitions for jest-docblock 21.0
// Project: https://github.com/facebook/jest/tree/master/packages/jest-docblock
// Definitions by: Ika <https://github.com/ikatyang>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* extract the "first" docblock from code, return empty string if not found.
*/
export function extract(code: string): string;
/**
* parse @pragma from docblock.
*/
export function parse(docblock: string): { [pragma: string]: string };

View File

@@ -0,0 +1,8 @@
import * as docblock from 'jest-docblock';
docblock.extract(`
/** @pragma */
const abc = 123;
`); // => "/** @pragma */"
docblock.parse(`/** @pragma 123 */`); // => { pragma: "123" }

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"jest-docblock-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@@ -19,6 +19,7 @@ import * as Koa from "koa";
declare module "koa" {
interface Request {
body: any;
rawBody: any;
}
}

View File

@@ -1,8 +1,13 @@
import * as Koa from "koa";
import bodyParser = require("koa-bodyparser");
import * as bodyParser from "koa-bodyparser";
const app = new Koa();
app.use(bodyParser({ strict: false }));
app.listen(80)
app.use((ctx) => {
console.log(ctx.request.body);
console.log(ctx.request.rawBody);
})
app.listen(80);

6192
types/mfiles/index.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,94 @@
// Source: http://www.m-files.com/UI_Extensibility_Framework/examples.htm
function setTheme(shellFrame: IShellFrame) {
if (shellFrame.TaskPane.Available) {
shellFrame.TaskPane.SetTheme({
groupHeader_TextColor: '#000000',
groupHeader_BackgroundColor: '#a0a0a0',
groupHeader_HighlightTextColor: '#ffffff',
item_TextColor: '#000000',
item_BackgroundColor: '#909090',
item_HighlightTextColor: '#FFFFFF',
item_HighlightBackgroundColor: '#000000',
dividerColor: '#808080',
last: 0
});
shellFrame.TaskPane.SetLogo('logo.png');
}
if (shellFrame.SearchPane.Available) {
shellFrame.SearchPane.SetTheme({
backgroundColor: '#808080',
searchButton_BackgroundColor: '#000000',
vaultName_TextColor: '#000000',
goOnlineButton_TextColor: '#000000',
userName_TextColor: '#000000',
advancedSearchButton_TextColor: '#000000',
resetAllButton_TextColor: '#000000',
additionalConditionsButton_TextColor: '#000000',
last: 0
});
}
shellFrame.Listing.SetTheme({
item_TextColor_Hot: '#ffffff',
item_TextColor_Selected: '#ffffff',
item_TextColor_HotSelected: '#ffffff',
item_TextColor_SelectedNoFocus: '#ffffff',
item_BackgroundColor_Hot: '#000000',
item_BackgroundColor_Selected: '#000000',
item_BackgroundColor_HotSelected: '#000000',
item_BackgroundColor_SelectedNoFocus: '#000000',
groupHeader_LabelColor: '#ffffff',
groupHeader_LineColor: '#ffffff',
groupHeader_ButtonTextColor: 'default',
groupHeader_ButtonEdgeHighlightColor: 'default',
groupHeader_ButtonHighlightColor: 'default',
groupHeader_BackgroundColor: '#000000',
groupHeader_BackgroundColor_Hot: '#000000',
groupHeader_BackgroundColor_Selected: '#000000',
groupHeader_BackgroundColor_HotSelected: '#000000',
sortableHeader_DividerColor_Inactive: '#000000',
sortableHeader_DividerColor_Active: '#000000',
sortableHeader_BackgroundColor_Inactive: '#707070',
rtableHeader_BackgroundColor_Active: '#000000',
backgroundImage: '',
last: 0
});
shellFrame.SetTheme({
background_TaskPane_BottomRightBitmapFile: 'TaskPaneBottomRight.png',
background_TaskPane_BottomMiddleBitmapFile: 'TaskPaneBottomMiddle.png',
background_TaskPane_BottomLeftBitmapFile: 'TaskPaneBottomLeftTile.png',
background_TaskPane_MidRightBitmapFile: 'TaskPaneMidRight.png',
background_TaskPane_MidLeftBitmapFile: 'TaskPaneMidLeftTile.png',
background_TaskPane_TopRightBitmapFile: 'TaskPaneTopRight.png',
background_TaskPane_TopLeftBitmapFile: 'TaskPaneTopLeftTile.png',
background_SearchPane_TopBitmapFile: 'SearchPaneTopTile.png',
background_SearchPane_DownAndRightBitmapFile: 'SearchPaneDownAndRightTile.png',
background_LoginPane_TopBitmapFile: 'LoginPaneTopTile.png',
background_LoginPane_DownAndRightBitmapFile: 'LoginPaneDownAndRightTile.png',
last: 0
});
}
function OnNewShellUI(shellUI: IShellUI) {
shellUI.Events.Register(MFiles.Event.NewShellFrame, newShellFrameHandler);
shellUI.Events.Register(MFiles.Event.NewNormalShellFrame, newShellFrameHandler);
}
function newShellFrameHandler(shellFrame: IShellFrame) {
shellFrame.Events.Register(MFiles.Event.Started, () => {
setTheme(shellFrame);
});
shellFrame.Events.Register(MFiles.Event.Started, getShellFrameStartedHandler(shellFrame));
}
function getShellFrameStartedHandler(shellFrame: IShellFrame) {
return () => {
if (shellFrame.CurrentPath === "") {
shellFrame.ShowDashboard("home", null);
const homeTab = shellFrame.RightPane.AddTab("_home", MFiles.GetStringResource(27664), "_last");
homeTab.ShowDashboard("home_right", null);
homeTab.Visible = true;
homeTab.Select();
}
};
}

View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es5", "scripthost"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"mfiles-tests.ts"
]
}

9
types/mfiles/tslint.json Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "dtslint/dt.json",
"rules": {
// The definitions need to use the same naming as the original typelib, see http://www.m-files.com/UI_Extensibility_Framework/#MFClientScript_P.html
"interface-name": false,
// The definition file is generated by a tool and not edited manually, thus long lines may be created
"max-line-length": false
}
}

View File

@@ -6559,7 +6559,7 @@ export type ShareContent = {
export type ShareOptions = {
dialogTitle?: string
excludeActivityTypes?: Array<string>
excludedActivityTypes?: Array<string>
tintColor?: string
}

View File

@@ -62,7 +62,7 @@ connect<ICounterStateProps, ICounterDispatchProps>(
() => mapDispatchToProps
)(Counter);
// with higher order functions using parameters
connect<ICounterStateProps, ICounterDispatchProps>(
connect<ICounterStateProps, ICounterDispatchProps, {}>(
(initialState: CounterState, ownProps) => mapStateToProps,
(dispatch: Dispatch<CounterState>, ownProps) => mapDispatchToProps
)(Counter);

View File

@@ -51,7 +51,8 @@ export interface AreaProps extends Partial<CSSStyleDeclaration> {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Area extends React.Component<AreaProps> {}
export class Area extends React.Component<AreaProps> { }
export interface AreaChartProps {
layout?: LayoutType;
@@ -67,7 +68,8 @@ export interface AreaChartProps {
onMouseMove?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class AreaChart extends React.Component<AreaChartProps> {}
export class AreaChart extends React.Component<AreaChartProps> { }
export interface BarProps extends Partial<CSSStyleDeclaration> {
layout?: LayoutType;
@@ -96,7 +98,8 @@ export interface BarProps extends Partial<CSSStyleDeclaration> {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Bar extends React.Component<BarProps> {}
export class Bar extends React.Component<BarProps> { }
export interface BarChartProps {
layout?: LayoutType;
@@ -115,7 +118,8 @@ export interface BarChartProps {
onMouseMove?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class BarChart extends React.Component<BarChartProps> {}
export class BarChart extends React.Component<BarChartProps> { }
export interface BrushProps {
dataKey: number | string;
@@ -130,7 +134,8 @@ export interface BrushProps {
tickFormatter?: RechartsFunction;
onChange?: RechartsFunction;
}
export class Brush extends React.Component<BrushProps> {}
export class Brush extends React.Component<BrushProps> { }
export interface CartesianAxisProps {
x?: number;
@@ -148,7 +153,8 @@ export interface CartesianAxisProps {
label?: string | number | React.ReactElement<any> | RechartsFunction;
mirror?: boolean;
}
export class CartesianAxis extends React.Component<CartesianAxisProps> {}
export class CartesianAxis extends React.Component<CartesianAxisProps> { }
export interface CartesianGridProps extends Partial<CSSStyleDeclaration> {
x?: number;
@@ -158,13 +164,15 @@ export interface CartesianGridProps extends Partial<CSSStyleDeclaration> {
horizontalPoints?: any[];
verticalPoints?: any[];
}
export class CartesianGrid extends React.Component<CartesianGridProps> {}
export class CartesianGrid extends React.Component<CartesianGridProps> { }
export interface CellProps {
fill?: string;
stroke?: string;
}
export class Cell extends React.Component<CellProps> {}
export class Cell extends React.Component<CellProps> { }
export interface ComposedChartProps {
layout?: LayoutType;
@@ -181,7 +189,8 @@ export interface ComposedChartProps {
onMouseMove?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class ComposedChart extends React.Component<ComposedChartProps> {}
export class ComposedChart extends React.Component<ComposedChartProps> { }
export interface CrossProps {
x?: number;
@@ -191,7 +200,8 @@ export interface CrossProps {
width?: number;
height?: number;
}
export class Cross extends React.Component<CrossProps> {}
export class Cross extends React.Component<CrossProps> { }
export interface CurveProps extends Partial<CSSStyleDeclaration> {
type?: 'basis' | 'basisClosed' | 'basisOpen' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' | RechartsFunction;
@@ -208,7 +218,8 @@ export interface CurveProps extends Partial<CSSStyleDeclaration> {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Curve extends React.Component<CurveProps> {}
export class Curve extends React.Component<CurveProps> { }
export interface DotProps {
cx: number;
@@ -223,7 +234,8 @@ export interface DotProps {
onMouseMove?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Dot extends React.Component<DotProps> {}
export class Dot extends React.Component<DotProps> { }
export interface ErrorBarProps extends Partial<CSSStyleDeclaration> {
dataKey?: string | number;
@@ -231,7 +243,8 @@ export interface ErrorBarProps extends Partial<CSSStyleDeclaration> {
stroke?: string;
direction?: string;
}
export class ErrorBar extends React.Component<ErrorBarProps> {}
export class ErrorBar extends React.Component<ErrorBarProps> { }
export interface LegendProps {
width?: number;
@@ -256,7 +269,8 @@ export interface LegendProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Legend extends React.Component<LegendProps> {}
export class Legend extends React.Component<LegendProps> { }
export interface LineProps extends Partial<CSSStyleDeclaration> {
type?: 'basis' | 'basisClosed' | 'basisOpen' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' | RechartsFunction;
@@ -284,7 +298,8 @@ export interface LineProps extends Partial<CSSStyleDeclaration> {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Line extends React.Component<LineProps> {}
export class Line extends React.Component<LineProps> { }
export interface LineChartProps {
layout?: LayoutType;
@@ -298,7 +313,8 @@ export interface LineChartProps {
onMouseMove?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class LineChart extends React.Component<LineChartProps> {}
export class LineChart extends React.Component<LineChartProps> { }
export interface PieProps extends Partial<CSSStyleDeclaration> {
cx?: Percentage | number;
@@ -310,6 +326,7 @@ export interface PieProps extends Partial<CSSStyleDeclaration> {
minAngle?: number;
paddingAngle?: number;
nameKey?: string;
dataKey?: string;
valueKey?: string;
legendType?: LegendType;
label?: boolean | any | React.ReactElement<any> | RechartsFunction;
@@ -329,7 +346,8 @@ export interface PieProps extends Partial<CSSStyleDeclaration> {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Pie extends React.Component<PieProps> {}
export class Pie extends React.Component<PieProps> { }
export interface PieChartProps {
width: number;
@@ -339,7 +357,8 @@ export interface PieChartProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class PieChart extends React.Component<PieChartProps> {}
export class PieChart extends React.Component<PieChartProps> { }
export interface PolarAngleAxisProps {
dataKey: string | number;
@@ -362,7 +381,8 @@ export interface PolarAngleAxisProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class PolarAngleAxis extends React.Component<PolarAngleAxisProps> {}
export class PolarAngleAxis extends React.Component<PolarAngleAxisProps> { }
export interface PolarGridProps extends Partial<CSSStyleDeclaration> {
cx: number;
@@ -373,7 +393,8 @@ export interface PolarGridProps extends Partial<CSSStyleDeclaration> {
polarRadius: any[];
gridType?: 'polygon' | 'circle';
}
export class PolarGrid extends React.Component<PolarGridProps> {}
export class PolarGrid extends React.Component<PolarGridProps> { }
export interface PolarRadiusAxisProps {
angle?: number;
@@ -396,7 +417,8 @@ export interface PolarRadiusAxisProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class PolarRadiusAxis extends React.Component<PolarRadiusAxisProps> {}
export class PolarRadiusAxis extends React.Component<PolarRadiusAxisProps> { }
export interface PolygonProps {
points: any[];
@@ -409,7 +431,8 @@ export interface PolygonProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Polygon extends React.Component<PolygonProps> {}
export class Polygon extends React.Component<PolygonProps> { }
export interface RadarProps extends Partial<CSSStyleDeclaration> {
dataKey: string | number;
@@ -422,7 +445,8 @@ export interface RadarProps extends Partial<CSSStyleDeclaration> {
animationBegin?: number;
animationEasing?: AnimationEasingType;
}
export class Radar extends React.Component<RadarProps> {}
export class Radar extends React.Component<RadarProps> { }
export interface RadarChartProps {
width: number;
@@ -438,7 +462,8 @@ export interface RadarChartProps {
onMouseLeave?: RechartsFunction;
onClick?: RechartsFunction;
}
export class RadarChart extends React.Component<RadarChartProps> {}
export class RadarChart extends React.Component<RadarChartProps> { }
export interface RadialBarProps extends Partial<CSSStyleDeclaration> {
cx?: number;
@@ -463,7 +488,8 @@ export interface RadialBarProps extends Partial<CSSStyleDeclaration> {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class RadialBar extends React.Component<RadialBarProps> {}
export class RadialBar extends React.Component<RadialBarProps> { }
export interface RadialBarChartProps {
width?: number;
@@ -481,7 +507,8 @@ export interface RadialBarChartProps {
onMouseLeave?: RechartsFunction;
onClick?: RechartsFunction;
}
export class RadialBarChart extends React.Component<RadialBarChartProps> {}
export class RadialBarChart extends React.Component<RadialBarChartProps> { }
export interface RectangleProps extends Partial<CSSStyleDeclaration> {
x?: number;
@@ -496,7 +523,8 @@ export interface RectangleProps extends Partial<CSSStyleDeclaration> {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Rectangle extends React.Component<RectangleProps> {}
export class Rectangle extends React.Component<RectangleProps> { }
export interface ReferenceAreaProps {
xAxisId?: string | number;
@@ -512,7 +540,8 @@ export interface ReferenceAreaProps {
label?: string | number | React.ReactElement<any> | RechartsFunction;
isFront?: boolean;
}
export class ReferenceArea extends React.Component<ReferenceAreaProps> {}
export class ReferenceArea extends React.Component<ReferenceAreaProps> { }
export interface ReferenceDotProps {
xAxisId?: string | number;
@@ -533,7 +562,8 @@ export interface ReferenceDotProps {
onMouseMove?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class ReferenceDot extends React.Component<ReferenceDotProps> {}
export class ReferenceDot extends React.Component<ReferenceDotProps> { }
export interface ReferenceLineProps {
xAxisId?: string | number;
@@ -547,7 +577,8 @@ export interface ReferenceLineProps {
label?: string | number | React.ReactElement<any> | RechartsFunction;
isFront?: boolean;
}
export class ReferenceLine extends React.Component<ReferenceLineProps> {}
export class ReferenceLine extends React.Component<ReferenceLineProps> { }
export interface ResponsiveContainerProps {
aspect?: number;
@@ -557,7 +588,8 @@ export interface ResponsiveContainerProps {
minHeight?: number;
debounce?: number;
}
export class ResponsiveContainer extends React.Component<ResponsiveContainerProps> {}
export class ResponsiveContainer extends React.Component<ResponsiveContainerProps> { }
export interface ScatterProps extends Partial<CSSStyleDeclaration> {
legendType?: LegendType;
@@ -580,7 +612,8 @@ export interface ScatterProps extends Partial<CSSStyleDeclaration> {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Scatter extends React.Component<ScatterProps> {}
export class Scatter extends React.Component<ScatterProps> { }
export interface ScatterChartProps {
width: number;
@@ -595,7 +628,8 @@ export interface ScatterChartProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class ScatterChart extends React.Component<ScatterChartProps> {}
export class ScatterChart extends React.Component<ScatterChartProps> { }
export interface SectorProps {
cx?: number;
@@ -614,7 +648,8 @@ export interface SectorProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class Sector extends React.Component<SectorProps> {}
export class Sector extends React.Component<SectorProps> { }
export interface TextProps extends Partial<CSSStyleDeclaration> {
scaleToFit?: boolean;
@@ -622,7 +657,8 @@ export interface TextProps extends Partial<CSSStyleDeclaration> {
textAnchor?: 'start' | 'middle' | 'end' | 'inherit';
verticalAnchor?: 'start' | 'middle' | 'end';
}
export class Text extends React.Component<TextProps> {}
export class Text extends React.Component<TextProps> { }
export interface ViewBox {
x: number;
@@ -645,13 +681,13 @@ export interface TooltipProps {
itemStyle?: any;
wrapperStyle?: any;
labelStyle?: any;
cursor?: boolean | any | React.ReactElement<any>;
cursor?: boolean | any | React.ReactElement<any> | React.StatelessComponent<any>;
viewBox: ViewBox;
active?: boolean;
coordinate?: Coordinate;
payload?: TooltipPayload[];
label?: string | number;
content?: React.ReactElement<any> | RechartsFunction;
content?: React.ReactElement<any> | React.StatelessComponent<any> | RechartsFunction;
formatter?: RechartsFunction;
labelFormatter?: RechartsFunction;
itemSorter?: RechartsFunction;
@@ -659,7 +695,8 @@ export interface TooltipProps {
animationBegin?: number;
animationEasing?: AnimationEasingType;
}
export class Tooltip extends React.Component<TooltipProps> {}
export class Tooltip extends React.Component<TooltipProps> { }
export interface TreemapProps {
width: number;
@@ -670,7 +707,8 @@ export interface TreemapProps {
animationBegin?: number;
animationEasing?: AnimationEasingType;
}
export class Treemap extends React.Component<TreemapProps> {}
export class Treemap extends React.Component<TreemapProps> { }
export interface XPadding {
left: number;
@@ -712,7 +750,8 @@ export interface XAxisProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class XAxis extends React.Component<XAxisProps> {}
export class XAxis extends React.Component<XAxisProps> { }
export interface YPadding {
top: number;
@@ -754,7 +793,8 @@ export interface YAxisProps {
onMouseEnter?: RechartsFunction;
onMouseLeave?: RechartsFunction;
}
export class YAxis extends React.Component<YAxisProps> {}
export class YAxis extends React.Component<YAxisProps> { }
export interface ZAxisProps {
dataKey: string | number;
@@ -764,4 +804,5 @@ export interface ZAxisProps {
name?: string | number;
scale?: ScaleType | RechartsFunction;
}
export class ZAxis extends React.Component<ZAxisProps> {}
export class ZAxis extends React.Component<ZAxisProps> { }

View File

@@ -919,15 +919,6 @@ export interface Response extends http.ServerResponse {
*/
toString(): string;
/**
* pass through to native response.writeHead().
* @public
* @function writeHead
* @emits header
* @returns {undefined}
*/
writeHead(): void;
/** redirect is sugar method for redirecting.
* res.redirect(301, 'www.foo.com', next);
* `next` is mandatory, to complete the response and trigger audit logger.

View File

@@ -95,7 +95,10 @@ function send(req: restify.Request, res: restify.Response, next: restify.Next) {
res.id === 'test';
res.send('hello ' + req.params.name);
res.writeHead();
res.writeHead(200);
res.writeHead(200, {
"Content-Type": "application/json"
});
return next();
}