Merge branch 'master' into feature/lint-any-union

This commit is contained in:
Olivier Sechet
2018-03-08 12:11:48 -08:00
committed by GitHub
14 changed files with 1735 additions and 3582 deletions
@@ -266,6 +266,30 @@ client.search({
}
});
client.updateByQuery({
index: 'myIndex',
type: 'mytype',
}, (error, response) => {
const {
took,
timed_out,
updated,
deleted,
batches,
version_conflicts,
noops,
retries,
throttled_millis,
throttled_until_millis,
total,
failures
} = response;
const { bulk, search } = retries;
// ...
});
client.indices.updateAliases({
body: {
actions: [
+21 -2
View File
@@ -89,8 +89,8 @@ export class Client {
termvectors(params: TermvectorsParams, callback: (error: any, response: any) => void): void;
update(params: UpdateDocumentParams): Promise<any>;
update(params: UpdateDocumentParams, callback: (error: any, response: any) => void): void;
updateByQuery(params: UpdateDocumentByQueryParams): Promise<any>;
updateByQuery(params: UpdateDocumentByQueryParams, callback: (error: any, response: any) => void): void;
updateByQuery(params: UpdateDocumentByQueryParams): Promise<UpdateDocumentByQueryResponse>;
updateByQuery(params: UpdateDocumentByQueryParams, callback: (error: any, response: UpdateDocumentByQueryResponse) => void): void;
close(): void;
}
@@ -785,6 +785,25 @@ export interface UpdateDocumentByQueryParams extends GenericParams {
type: NameList;
}
export interface UpdateDocumentByQueryResponse {
took: number;
timed_out: boolean;
updated: number;
deleted: number;
batches: number;
version_conflicts: number;
noops: number;
retries: {
bulk: number;
search: number;
};
throttled_millis: number;
requests_per_second: number;
throttled_until_millis: number;
total: number;
failures: any[];
}
export interface Cat {
aliases(params: CatAliasesParams, callback: (error: any, response: any) => void): void;
aliases(params: CatAliasesParams): Promise<any>;
+7 -7
View File
@@ -372,7 +372,7 @@ declare module NWJS_Helpers {
* The paper size spec
* example: 'mediaSize':{'name': 'CUSTOM', 'width_microns': 279400, 'height_microns': 215900, 'custom_display_name':'Letter', 'is_default': true}
*/
mediaSize: JSON;
mediaSize: any;
/**
* Whether to print CSS backgrounds
@@ -1072,9 +1072,9 @@ declare module NWJS_Helpers {
* Enumerate the printers in the system.
*
* @param callback {function(dev_win?)} callback with the native window of the DevTools window.
* - (optional) printers {JSON[]} An array of JSON objects for the printer information.
* - (optional) printers {any[]} An array of json objects for the printer information.
*/
getPrinters( callback: ( printers?: JSON[] ) => void ): void;
getPrinters( callback: ( printers?: any[] ) => void ): void;
/**
* Query the status of devtools window.
@@ -1084,9 +1084,9 @@ declare module NWJS_Helpers {
/**
* Print the web contents in the window without the need for user’s interaction.
*
* @param options {Object} Specify whether to close the window forcely and bypass close event.
* @param options {any | PrintOption} Specify whether to close the window forcely and bypass close event.
*/
print( options: JSON | PrintOption ): void;
print( options: any | PrintOption ): void;
/**
* Set window's maximum size.
@@ -1381,9 +1381,9 @@ declare namespace nw {
dataPath: string;
/**
* Get the JSON object of the manifest file.
* Get the json object of the manifest file.
*/
manifest: JSON;
manifest: any;
/**
* Clear the HTTP cache in memory and the one on disk. This method call is synchronized.
+1583 -3566
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -6,7 +6,6 @@
// Not sure how to work around this, or if it's necessary to
"no-declare-current-package": false,
"no-internal-module": false,
"no-redundant-jsdoc-2": false,
"no-single-declare-module": false,
"no-unnecessary-class": false,
"no-unnecessary-generics": false,
+3 -3
View File
@@ -3136,11 +3136,11 @@ declare namespace sequelize {
$ilike: string | WherePGStatement;
$notLike: string | WherePGStatement;
$notILike: string | WherePGStatement;
$between: [number, number];
$between: [number, number] | [Date, Date];
"..": [number, number];
$notBetween: [number, number];
"!..": [number, number];
$overlap: [number, number];
$overlap: [number, number] | [string, string];
"&&": [number, number];
$contains: any;
"@>": any;
@@ -3155,7 +3155,7 @@ declare namespace sequelize {
* typesafety, but there is no way to pass the tests if we just remove it.
*/
type WhereOptions<T> = {
[P in keyof T]?: string | number | boolean | WhereLogic | WhereOptions<T[P]> | col | and | or | WhereGeometryOptions | Array<string | number> | null;
[P in keyof T]?: string | number | boolean | WhereLogic | WhereOptions<T[P]> | col | and | or | WhereGeometryOptions | WhereNested | Array<string | number> | null;
};
/**
+7
View File
@@ -915,6 +915,8 @@ User.findAll( { where : { intVal : { '!..' : [8, 10] } } } );
User.findAll( { where : { theDate : { between : ['2013-01-02', '2013-01-11'] } } } );
User.findAll( { where : { theDate : { between : ['2013-01-02', '2013-01-11'] }, intVal : 10 } } );
User.findAll( { where : { theDate : { between : ['2012-12-10', '2013-01-02'] } } } );
User.findAll( { where : { theDate : { between : [1, 3] } } } );
User.findAll( { where : { theDate : { between : [new Date(0), new Date(1000)] } } } );
User.findAll( { where : { theDate : { nbetween : ['2013-01-04', '2013-01-20'] } } } );
User.findAll( { order : [s.col( 'name' )] } );
User.findAll( { order : [['theDate', 'DESC']] } );
@@ -948,6 +950,11 @@ User.findAll( { where: s.where(s.fn('lower', s.col('email')), s.fn('lower', 'TES
User.findAll( { subQuery: false, include : [User], order : [[User, User, 'numYears', 'c']] } );
User.findAll( { rejectOnEmpty: true });
User.findAll( { where: { $and:[ { username: "user" }, { theDate: new Date() } ] } } );
User.findAll( { where: { $or:[ { username: "user" }, { theDate: new Date() } ] } } );
User.findAll( { where: { $and:[ { username: { $not: "user" } }, { theDate: new Date() } ] } } );
User.findAll( { where: { $or:[ { username: { $not: "user" } }, { theDate: new Date() } ] } } );
User.findAll( { where: { emails: { $overlap: ["me@mail.com", "you@mail.com"] } } } );
User.findById( 'a string' );
+25
View File
@@ -0,0 +1,25 @@
// Type definitions for winston-syslog 1.0
// Project: https://github.com/indexzero/winston-syslog#readme
// Definitions by: Chris Barth <https://github.com/cjbarth>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as winston from "winston";
export interface SyslogTransportOptions extends winston.GenericTextTransportOptions {
host?: string;
port?: number;
path?: string;
protocol?: string;
pid?: number;
facility?: string;
localhost?: string;
type?: string;
app_name?: string;
eol?: string;
}
export class Syslog extends winston.Transport implements winston.TransportInstance {
}
declare module "winston" {
interface Transports {
Syslog: Syslog;
}
}
+24
View File
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"winston-syslog-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}
@@ -0,0 +1,35 @@
import winston = require('winston');
import { SyslogTransportOptions } from 'winston-syslog';
const str = "";
const bool = true;
const num = 1;
const obj: any = {};
const syslogOptions: SyslogTransportOptions = {
host: str,
port: num,
path: str,
protocol: str,
pid: num,
facility: str,
localhost: str,
type: str,
app_name: str,
eol: str,
json: bool,
colorize: bool,
colors: str,
prettyPrint: bool,
showLevel: bool,
label: str,
depth: num,
};
winston.add(winston.transports.Syslog, syslogOptions);
const logger: winston.LoggerInstance = new (winston.Logger)({
transports: [
new (winston.transports.Syslog)(syslogOptions),
]
});
+1 -1
View File
@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"zipkin": "^0.11.2"
"zipkin": ">=0.11.0"
}
}
@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"zipkin": "^0.11.2"
"zipkin": ">=0.11.0"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"zipkin": "^0.11.2"
"zipkin": ">=0.11.0"
}
}