This commit is contained in:
Zev Spitz
2017-06-29 08:59:59 +02:00
216 changed files with 5472 additions and 2526 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
"scripts": {
"compile-scripts": "tsc -p scripts",
"not-needed": "node scripts/not-needed.js",
"test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 1",
"test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 4",
"lint": "dtslint types"
},
"devDependencies": {
+3 -1
View File
@@ -474,7 +474,9 @@ declare namespace AceAjax {
removeFold(arg: any): void;
expandFold(arg: any): void;
foldAll(startRow?: number, endRow?: number, depth?: number): void
unfold(arg1: any, arg2: boolean): void;
screenToDocumentColumn(row: number, column: number): void;
@@ -64,6 +64,7 @@ app.config(function (localStorageServiceProvider: ng.local.storage.ILocalStorage
localStorageServiceProvider
.setPrefix('myApp')
.setStorageType('sessionStorage')
.setDefaultToCookie(false)
.setNotify(true, true);
});
+9 -3
View File
@@ -1,6 +1,6 @@
// Type definitions for angular-local-storage v0.1.6
// Type definitions for angular-local-storage v0.6.0
// Project: https://github.com/grevory/angular-local-storage
// Definitions by: Ken Fukuyama <https://github.com/kenfdev>
// Definitions by: Ken Fukuyama <https://github.com/kenfdev>, Davide Donadello <https://github.com/dona278>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -27,12 +27,18 @@ declare module 'angular' {
* @param storageType localstorage or sessionStorage. default: localStorage
*/
setStorageType(storageType: string): ILocalStorageServiceProvider;
/**
* If localStorage is not supported, the library will default to cookies instead. This behavior can be disabled
* @param shouldDefault default: true
*/
setDefaultToCookie(shouldDefault: boolean): ILocalStorageServiceProvider;
/**
* Setter for cookie config
* @param exp number of days before cookies expire (0 = does not expire). default: 30
* @param path the web path the cookie represents. default: '/'
* @param secure to store cookies as secure. default: false
*/
setStorageCookie(exp: number, path: string): ILocalStorageServiceProvider;
setStorageCookie(exp: number, path: string, secure: boolean): ILocalStorageServiceProvider;
/**
* Set the cookie domain, since this runs inside a the config() block, only providers and constants can be injected. As a result, $location service can't be used here, use a hardcoded string or window.location.
* No default value
+4 -2
View File
@@ -627,11 +627,13 @@ function test_angular_forEach() {
}
// angular.element() tests
let element = angular.element('div.myApp');
let element = angular.element('<div></div>');
let scope: ng.IScope = element.scope();
let isolateScope: ng.IScope = element.isolateScope();
isolateScope = element.find('div.foo').isolateScope();
isolateScope = element.find('div').isolateScope();
isolateScope = element.children().isolateScope();
let element2 = angular.element(element);
let elementArray = angular.element(document.querySelectorAll('div'));
// $timeout signature tests
namespace TestTimeout {
+4 -1
View File
@@ -1,6 +1,9 @@
// Type definitions for Angular JS 1.6
// Project: http://angularjs.org
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Georgii Dolzhykov <http://github.com/thorn0>, Caleb St-Denis <https://github.com/calebstdenis>
// Definitions by: Diego Vilar <http://github.com/diegovilar>
// Georgii Dolzhykov <http://github.com/thorn0>
// Caleb St-Denis <https://github.com/calebstdenis>
// Leonard Thieu <https://github.com/leonard-thieu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
+10 -4
View File
@@ -1,3 +1,4 @@
// Project: http://jquery.com/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Christian Hoffmeister <https://github.com/choffmeister>
// Steve Fenton <https://github.com/Steve-Fenton>
@@ -19,6 +20,8 @@
// Dick van den Brink <https://github.com/DickvdBrink>
// Thomas Schulz <https://github.com/King2500>
// Leonard Thieu <https://github.com/leonard-thieu>
// Andre Wiggins <https://github.com/andrewiggins>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Definitions copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0480c5ec87fab41aa23047a02b27f0ea71aaf975/types/jquery/v2/index.d.ts
@@ -169,7 +172,7 @@ interface JQuery {
* @param properties An object of property-value pairs to set.
* @see {@link https://api.jquery.com/css/#css-properties}
*/
css(properties: JQueryCssProperties): JQuery;
css(properties: JQLiteCssProperties): JQuery;
/**
* Store arbitrary data associated with the matched elements.
@@ -664,7 +667,7 @@ interface JQuery {
}
interface JQueryStatic {
(element: string | Element): JQuery;
(element: string | Element | Document | JQuery | ArrayLike<Element>): JQuery;
}
/**
@@ -796,7 +799,10 @@ interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObjec
/**
* The interface used to specify the properties parameter in css()
*/
type cssPropertySetter = (index: number, value?: string) => string | number;
interface JQueryCssProperties {
// tslint:disable-next-line:class-name
interface cssPropertySetter {
(index: number, value?: string): string | number;
}
interface JQLiteCssProperties {
[propertyName: string]: string | number | cssPropertySetter;
}
@@ -0,0 +1,11 @@
import {nextTick} from 'async.nexttick';
function calledOnNextTick(a: string): number {
return parseInt(a, 10);
}
const aString = 'Hi!';
nextTick(() => {
calledOnNextTick(aString);
});
+6
View File
@@ -0,0 +1,6 @@
// Type definitions for async.nexttick 0.5
// Project: https://www.npmjs.com/package/async.nexttick
// Definitions by: Damien "pyrho" Rajon <https://github.com/pyrho>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function nextTick(callback: () => void, ...args: any[]): void;
+24
View File
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"async.nexttick-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}
+1 -1
View File
@@ -7,7 +7,7 @@ import { Plugin, Transformer as PostcssTransformer } from 'postcss';
declare namespace autoprefixer {
interface Options {
browsers?: string[];
browsers?: string[] | string;
env?: string;
cascade?: boolean;
add?: boolean;
+8 -8
View File
@@ -1265,17 +1265,17 @@ declare namespace Marionette {
*/
start(options?: any): void;
/** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/
addRegions(regions: any): any;
/** Root region of the application*/
region: string;
/** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/
emptyRegions(): void;
/** Get the root region */
getRegion(): Region;
/** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/
removeRegion(region: Region): void;
/** Show a view in the root region */
showView(view: Backbone.View<Backbone.Model>): void;
/** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/
getRegion(regionName: string): Region;
/** Get the view from the root region*/
getView(): any;
module(moduleNames: any, moduleDefinition: any): Module;
+46
View File
@@ -0,0 +1,46 @@
import * as block from "bem-cn";
// expected 'block'
block("block")();
// expected 'block__elem'
block("block")("elem")();
// expected 'block__elem block__elem_disabled block__elem_size_small'
block("block")("elem", { disabled: true, size: 'small' })();
// expected 'block block_disabled'
block("block")({ disabled: true})();
// expected 'block mix'
block("block").mix("mix");
// expected 'block mix mix2'
block("block").mix(["mix", "mix2"]);
// expected 'block is-hidden'
block("block").state({ hidden: true });
// expected 'block'
block("block").state({ hidden: false });
// expected 'block is-hidden is-error'
block("block").state({ hidden: true, error: true });
// expected 'block is-loading'
block("block").is({ loading: true });
// expected 'block has-content'
block("block").has({ content: true });
block.setup({
el: '~~',
mod: '--',
modValue: '-'
});
// expected 'block~~elem'
block("block")("elem");
// expected 'block block--mod-value'
block("block")({ mod: "value"});
+41
View File
@@ -0,0 +1,41 @@
// Type definitions for bem-cn 2.1
// Project: https://github.com/albburtsev/bem-cn
// Definitions by: Vitaly Selkin <https://github.com/selkinvitaly>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
type StateFn = (states: { [key: string]: boolean }) => Inner;
interface Modifications {
[key: string]: (string | boolean);
}
interface Block {
(name: string): Inner;
reset(): void;
setup(settings?: Settings): void;
}
interface Inner {
(elem: string | Modifications): Inner;
(elem: string, mods: Modifications): Inner;
(): string;
mix(mixes: string | string[]): Inner;
has: StateFn;
state: StateFn;
is: StateFn;
toString(): string;
split(separator: string, limit?: number): string[];
}
interface Settings {
ns?: string;
el?: string;
mod?: string;
modValue?: string;
classMap?: { [className: string]: string } | null;
}
declare const block: Block;
export = block;
+22
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",
"bem-cn-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}
+11 -1
View File
@@ -576,7 +576,6 @@ barProm = fooArrProm.spread<Bar>((one: Foo, two: Bar, twotwo: Foo) => {
//TODO fix collection inference
barArrProm = fooProm.all<Bar>();
objProm = fooProm.props();
fooInspectionPromise = fooProm.reflect();
barProm = fooProm.any<Bar>();
barArrProm = fooProm.some<Bar>(num);
@@ -584,6 +583,17 @@ barProm = fooProm.race<Bar>();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
var propsValue: { num: number, str: string };
Promise.resolve({ num: 1, str: Promise.resolve('a') }).props().then(val => { propsValue = val });
Promise.props({ num: 1, str: Promise.resolve('a') }).then(val => { propsValue = val });
Promise.props(Promise.props({ num: 1, str: Promise.resolve('a') })).then(val => { propsValue = val });
var propsMapValue: Map<number, string>;
Promise.resolve(new Map<number, Promise<string>>()).props().then(val => { propsMapValue = val });
Promise.props(new Map<number, Promise<string>>()).then(val => { propsMapValue = val });
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Promise.all([fooProm, barProm]).then(result => {
result[0].foo();
result[1].bar();
+9 -5
View File
@@ -620,8 +620,8 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
/**
* Same as calling `Promise.props(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
// TODO how to model instance.props()?
props(): Bluebird<Object>;
props<K, V>(this: PromiseLike<Map<K, Bluebird.Thenable<V> | V>>): Bluebird<Map<K, V>>;
props<T>(this: PromiseLike<Bluebird.ResolvableProps<T>>): Bluebird<T>;
/**
* Same as calling `Promise.any(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
@@ -806,11 +806,13 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
*
* *The original object is not modified.*
*/
// TODO verify this is correct
// trusted promise for object
static props(object: Bluebird<Object>): Bluebird<Object>;
static props<K, V>(map: PromiseLike<Map<K, PromiseLike<V> | V>>): Bluebird<Map<K, V>>;
static props<T>(object: PromiseLike<Bluebird.ResolvableProps<T>>): Bluebird<T>;
// map
static props<K, V>(map: Map<K, PromiseLike<V> | V>): Bluebird<Map<K, V>>;
// object
static props(object: Object): Bluebird<Object>;
static props<T>(object: Bluebird.ResolvableProps<T>): Bluebird<T>;
/**
* Like `Promise.some()`, with 1 as `count`. However, if the promise fulfills, the fulfillment value is not an array of 1 but the value directly.
@@ -1074,6 +1076,8 @@ declare namespace Bluebird {
/** @deprecated Use PromiseLike<T> directly. */
export type Thenable<T> = PromiseLike<T>;
export type ResolvableProps<T> = object & { [K in keyof T]: PromiseLike<T[K]> | T[K] };
export interface Resolver<R> {
/**
* Returns a reference to the controlled promise that can be passed to clients.
@@ -0,0 +1,12 @@
import 'browser-report';
function test_sync() {
var browserInfo = window.browserReportSync();
console.log(browserInfo.browser.name);
}
function test_async() {
window.browserReport((error, result) => {
console.log(result.ip + ' ' + result.browser.name);
});
}
+56
View File
@@ -0,0 +1,56 @@
// Type definitions for browser-report v2.2.9
// Project: https://github.com/JTOne123/browser-report
// Definitions by: Paul Datsiuk <https://github.com/JTOne123>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Window {
browserReport(result: (error: ErrorEvent, report: ReportResult) => any): void;
browserReportSync(): ReportResult;
}
interface ReportResult {
"browser": {
"name": string,
"version": string
},
"cookies": boolean,
"flash": {
"version": string
},
"ip": string,
"country": {
"name": string,
"code": string,
"city": string,
"latitude" : string,
"longitude": string,
"timezone": string
},
"java": {
"version": string
},
"lang": Array<string>,
"os": {
"name": string,
"version": string
},
"screen": {
"colors": number,
"dppx": number,
"height": number,
"width": number
},
"scripts": boolean,
"timestamp": string,
"userAgent": string,
"viewport": {
"height": number,
"layout": {
"height": number,
"width": number
}
"width": number,
"zoom": number
}
"websockets": boolean
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"browser-report-tests.ts"
]
}
-1
View File
@@ -1,5 +1,4 @@
import * as Clndr from 'clndr';
import $ = require('jquery');
const options: Clndr.ClndrOptions = {
template: '',
+3
View File
@@ -2,6 +2,9 @@
// Project: https://github.com/kylestetz/CLNDR
// Definitions by: jasperjn <https://github.com/jasperjn>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery" />
import * as moment from 'moment';
-5
View File
@@ -12,11 +12,6 @@
"typeRoots": [
"../"
],
"paths": {
"jquery": [
"jquery/v2"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
+34 -33
View File
@@ -1,48 +1,41 @@
/// <reference types="validator" />
import convict = require('convict');
import validator = require('validator');
// define a schema
// straight from the convict tests
const format : convict.Format = {
const format: convict.Format = {
name: 'float-percent',
validate: function(val) {
validate(val) {
if (val !== 0 && (!val || val > 1 || val < 0)) {
throw new Error('must be a float between 0 and 1, inclusive');
}
},
coerce: function(val) {
return +(<string> val);
coerce(val) {
return parseFloat(val);
}
};
convict.addFormat(format);
convict.addFormats({
prime: {
validate: function(val) {
function isPrime(n: number) {
if (n <= 1) return false; // zero and one are not prime
for (var i=2; i*i <= n; i++) {
if (n % i === 0) return false;
}
return true;
}
if (!isPrime(val)) throw new Error('must be a prime number');
},
coerce: function(val) {
return parseInt(val, 10);
prime: {
validate(val) {
function isPrime(n: number) {
if (n <= 1) return false; // zero and one are not prime
for (let i = 2; i * i <= n; i++) {
if (n % i === 0) return false;
}
return true;
}
});
if (!isPrime(val)) throw new Error('must be a prime number');
},
coerce(val) {
return parseInt(val, 10);
}
}
});
var conf = convict({
let conf = convict({
env: {
doc: 'The applicaton environment.',
format: ['production', 'development', 'test'],
@@ -65,7 +58,11 @@ var conf = convict({
},
key: {
doc: "API key",
format: (val: string) => validator.isUUID(val),
format: (val: string) => {
if (!validator.isUUID(val)) {
throw new Error('must be a valid UUID');
}
},
default: '01527E56-8431-11E4-AF91-47B661C210CA'
},
db: {
@@ -81,7 +78,13 @@ var conf = convict({
default: 0,
env: 'PORT',
arg: 'port',
}
},
password: {
doc: 'The database password.',
default: 'secret',
format: String,
sensitive: true,
},
},
primeNumber: {
format: 'prime',
@@ -91,14 +94,12 @@ var conf = convict({
format: 'float-percent',
default: 0.5
},
});
// load environment dependent configuration
var env = conf.get('env');
var dbip = conf.get('db.ip');
let env = conf.get('env');
let dbip = conf.get('db.ip');
conf.loadFile('./config/' + env + '.json');
conf.loadFile(['./configs/always.json', './configs/sometimes.json']);
@@ -118,7 +119,7 @@ conf
.validate({ allowed: 'warn' })
.toString();
var port: number = conf.default('port');
let port: number = conf.default('port');
if (conf.has('key')) {
conf.set('the.awesome', true);
+14 -18
View File
@@ -1,11 +1,11 @@
// Type definitions for convict 3.0
// Type definitions for convict 4.0
// Project: https://github.com/mozilla/node-convict
// Definitions by: Wim Looman <https://github.com/Nemo157>, Vesa Poikajärvi <https://github.com/vesse>
// Definitions by: Wim Looman <https://github.com/Nemo157>
// Vesa Poikajärvi <https://github.com/vesse>
// Eli Young <https://github.com/elyscape>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace convict {
type ValidationMethod = 'strict' | 'warn';
interface ValidateOptions {
@@ -23,8 +23,8 @@ declare namespace convict {
interface Format {
name?: string;
validate?: (val: any) => void;
coerce?: (val: any) => any;
validate?(val: any): void;
coerce?(val: any): any;
}
interface Schema {
@@ -35,16 +35,18 @@ declare namespace convict {
* From the implementation:
*
* format can be a:
* - predefine type, as seen below
* - predefined type, as seen below
* - an array of enumerated values, e.g. ["production", "development", "testing"]
* - built-in JavaScript type, i.e. Object, Array, String, Number, Boolean
* - or if omitted, the Object.prototype.toString.call of the default value
* - function that performs validation and throws an Error on failure
*
* The docs also state that any function that validates is ok too
* If omitted, format will be set to the value of Object.prototype.toString.call
* for the default value
*/
format?: string | Array<any> | Function;
format?: string | any[] | ((val: any) => void);
env?: string;
arg?: string;
sensitive?: boolean;
};
}
@@ -78,17 +80,11 @@ declare namespace convict {
*/
load(conf: Object): Config;
/**
* Loads and merges one JSON configuration file into config
* Loads and merges JSON configuration file(s) into config
*
* @return {Config} instance
*/
loadFile(file: string): Config;
/**
* Loads and merges multiple JSON configuration files into config
*
* @return {Config} instance
*/
loadFile(files: string[]): Config;
loadFile(files: string | string[]): Config;
/**
* Validates config against the schema used to initialize it
*
+7
View File
@@ -0,0 +1,7 @@
{
"extends": "dtslint/dt.json",
"rules": {
// ban-types needs to be disabled to support TypeScript <2.2
"ban-types": false
}
}
+237 -2
View File
@@ -1,6 +1,6 @@
// Type definitions for core-js 0.9
// Project: https://github.com/zloirock/core-js/
// Definitions by: Ron Buckton <http://github.com/rbuckton>
// Definitions by: Ron Buckton <http://github.com/rbuckton>, Michel Felipe <http://github.com/mfdeveloper>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
@@ -50,7 +50,10 @@ declare function $for<T>(iterable: Iterable<T>): $for<T>;
// ECMAScript 7
// Modules: es7.array.includes, es7.string.at, es7.string.pad-start, es7.string.pad-end,
// es7.object.to-array, es7.object.get-own-property-descriptors, es7.regexp.escape,
// es7.map.to-json, and es7.set.to-json
// es7.map.to-json, es7.set.to-json, es7.reflect.define-metadata, es7.reflect.delete-metadata
// es7.reflect.get-metadata, es7.reflect.get-metadata-keys, es7.reflect.get-own-metadata,
// es7.reflect.get-own-metadata-keys, es7.reflect.has-metadata, es7.reflect.has-own-metadata
// es7.reflect.metadata
// #############################################################################################
interface String {
@@ -473,6 +476,202 @@ declare namespace core {
function preventExtensions(target: any): boolean;
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
function setPrototypeOf(target: any, proto: any): boolean;
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @example
*
* ### Example
*
* ```typescript
* class Example {
* }
*
* // constructor
* Reflect.defineMetadata("custom:annotation", options, Example);
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): ClassDecorator {
* return target => Reflect.defineMetadata("custom:annotation", options, target);
* }
* ```
*/
function defineMetadata(metadataKey: any, metadataValue: any, target: Object, targetKey?: string | symbol): void;
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* ### Example
*
* ```typescript
* class Example {
* }
*
* // constructor
* result = Reflect.deleteMetadata("custom:annotation", Example);
* ```
*/
function deleteMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): boolean;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* ### Example
*
* ```typescript
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadata("custom:annotation", Example);
* ```
*/
function getMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): any;
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* ### Example
*
* ```typescript
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadataKeys(Example);
* ```
*/
function getMetadataKeys(target: Object, targetKey?: string | symbol): any[];
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* ### Example
*
* ```typescript
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadata("custom:annotation", Example);
* ```
*/
function getOwnMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): any;
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* ### Example
*
* ```typescript
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadataKeys(Example);
* ```
*/
function getOwnMetadataKeys(target: Object, targetKey?: string | symbol): any[];
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* ### Example
*
* ```typescript
* class Example {
* }
*
* // constructor
* result = Reflect.hasMetadata("custom:annotation", Example);
* ```
*/
function hasMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* ### Example
*
* ```typescript
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
* ```
*/
function hasOwnMetadata(metadataKey: any, target: Object, targetKey?: string | symbol): boolean;
/**
* A default metadata decorator factory that can be used on a class, class member, or parameter.
* @param metadataKey The key for the metadata entry.
* @param metadataValue The value for the metadata entry.
* @returns A decorator function.
* @remarks
* If `metadataKey` is already defined for the target and target key, the
* metadataValue for that key will be overwritten.
* @example
*
* ### Example
*
* ```typescript
* // constructor
* @Reflect.metadata(key, value)
* class Example {
* }
*
* // property (on constructor, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* static staticProperty;
* }
*
* // property (on prototype, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* property;
* }
*
* // method (on constructor)
* class Example {
* @Reflect.metadata(key, value)
* static staticMethod() { }
* }
*
* // method (on prototype)
* class Example {
* @Reflect.metadata(key, value)
* method() { }
* }
* ```
*/
function metadata(metadataKey: any, metadataValue: any): {
(target: Function): void;
(target: Object, targetKey: string | symbol): void;
};
}
const Object: {
@@ -1991,6 +2190,42 @@ declare module "core-js/library/fn/reflect/set-prototype-of" {
const setPrototypeOf: typeof core.Reflect.setPrototypeOf;
export = setPrototypeOf;
}
declare module "core-js/library/fn/reflect/es7/define-metadata" {
const defineMetadata: typeof core.Reflect.defineMetadata;
export = defineMetadata;
}
declare module "core-js/library/fn/reflect/es7/delete-metadata" {
const deleteMetadata: typeof core.Reflect.deleteMetadata;
export = deleteMetadata;
}
declare module "core-js/library/fn/reflect/es7/get-metadata" {
const getMetadata: typeof core.Reflect.getMetadata;
export = getMetadata;
}
declare module "core-js/library/fn/reflect/es7/get-metadata-keys" {
const getMetadataKeys: typeof core.Reflect.getMetadataKeys;
export = getMetadataKeys;
}
declare module "core-js/library/fn/reflect/es7/get-own-metadata" {
const getOwnMetadata: typeof core.Reflect.getOwnMetadata;
export = getOwnMetadata;
}
declare module "core-js/library/fn/reflect/es7/get-own-metadata-keys'" {
const getOwnMetadataKeys: typeof core.Reflect.getOwnMetadataKeys;
export = getOwnMetadataKeys;
}
declare module "core-js/library/fn/reflect/es7/has-metadata'" {
const hasMetadata: typeof core.Reflect.hasMetadata;
export = hasMetadata;
}
declare module "core-js/library/fn/reflect/es7/has-own-metadata'" {
const hasOwnMetadata: typeof core.Reflect.hasOwnMetadata;
export = hasOwnMetadata;
}
declare module "core-js/library/fn/reflect/es7/metadata'" {
const metadata: typeof core.Reflect.metadata;
export = metadata;
}
declare module "core-js/library/fn/regexp" {
const RegExp: typeof core.RegExp;
export = RegExp;
+1 -1
View File
@@ -7,7 +7,7 @@
// missing:
// - Static methods that are defined in JQueryStatic.fn are not typed.
// - Plugin and extension definitions are not typed.
// - Some return types are not fully wokring
// - Some return types are not fully working
/// <reference types="jquery" />
+33
View File
@@ -145,3 +145,36 @@ secret.remove((err, response) => {
secret.update((err, response) => {
// NOOP
});
const node = docker.getNode('nodeName');
node.inspect((err, reponse) => {
// NOOP
});
node.inspect().then(response => {
// NOOP
});
node.update({}, (err, response) => {
// NOOP
});
node.update((err, response) => {
// NOOP
});
node.update({}).then(response => {
// NOOP;
});
node.remove({}, (err, response) => {
// NOOP
});
node.remove((err, response) => {
// NOOP
});
node.remove({}).then(response => {
// NOOP;
});
+10 -1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/apocas/dockerode
// Definitions by: Carl Winkler <https://github.com/seikho>, Nicolas Laplante <https://github.com/nlaplante>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
@@ -169,6 +170,14 @@ declare namespace Dockerode {
inspect(callback: Callback<any>): void;
inspect(): Promise<any>;
update(options: {}, callback: Callback<any>): void;
update(callback: Callback<any>): void;
update(options?: {}): Promise<any>;
remove(options: {}, callback: Callback<any>): void;
remove(callback: Callback<any>): void;
remove(options?: {}): Promise<any>;
modem: any;
id?: string;
}
@@ -637,7 +646,7 @@ declare namespace Dockerode {
interface DockerOptions {
socketPath?: string;
host?: string;
port?: number;
port?: number | string;
ca?: string;
cert?: string;
key?: string;
+1 -1
View File
@@ -54,7 +54,7 @@ declare namespace Draft {
* These props are analagous to `value` and `onChange` in controlled React
* text inputs.
*/
interface DraftEditorProps {
export interface DraftEditorProps {
editorState: EditorState;
onChange(editorState: EditorState): void;
-2
View File
@@ -1,7 +1,5 @@
/* tslint:disable */
import $ = require('jquery');
module AccordionComponent {
$(function () {
var sample = new ej.Accordion($("#basicAccordion"), {
+4 -1
View File
@@ -2,6 +2,9 @@
// Project: http://help.syncfusion.com/js/typescript
// Definitions by: Syncfusion <https://github.com/syncfusion/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery" />
/*!
* filename: ej.web.all.d.ts
@@ -66684,7 +66687,7 @@ interface JQueryPromise<T> {
*/
cancel?: boolean;
}
interface JQueryDeferred<T> extends JQueryPromise<T> {
interface JQueryDeferred<T> {
/**
* Returns the cancel option value.
*/
-5
View File
@@ -12,11 +12,6 @@
"typeRoots": [
"../"
],
"paths": {
"jquery": [
"jquery/v2"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
+118 -118
View File
@@ -13,75 +13,75 @@ declare module Elasticsearch {
nodes: Nodes;
snapshot: Snapshot;
tasks: Tasks;
bulk(params: BulkIndexDocumentsParams): PromiseLike<any>;
bulk(params: BulkIndexDocumentsParams): Promise<any>;
bulk(params: BulkIndexDocumentsParams, callback: (error: any, response: any) => void): void;
clearScroll(params: ClearScrollParams, callback: (error: any, response: any) => void): void;
clearScroll(params: ClearScrollParams): PromiseLike<any>;
clearScroll(params: ClearScrollParams): Promise<any>;
count(params: CountParams, callback: (error: any, response: CountResponse) => void): void;
count(params: CountParams): PromiseLike<CountResponse>;
create(params: CreateDocumentParams): PromiseLike<CreateDocumentResponse>;
count(params: CountParams): Promise<CountResponse>;
create(params: CreateDocumentParams): Promise<CreateDocumentResponse>;
create(params: CreateDocumentParams, callback: (err: any, response: CreateDocumentResponse, status: any) => void): void;
delete(params: DeleteDocumentParams): PromiseLike<DeleteDocumentResponse>;
delete(params: DeleteDocumentParams): Promise<DeleteDocumentResponse>;
delete(params: DeleteDocumentParams, callback: (error: any, response: DeleteDocumentResponse) => void): void;
deleteByQuery(params: DeleteDocumentByQueryParams): PromiseLike<DeleteDocumentByQueryResponse>;
deleteByQuery(params: DeleteDocumentByQueryParams): Promise<DeleteDocumentByQueryResponse>;
deleteByQuery(params: DeleteDocumentByQueryParams, callback: (error: any, response: DeleteDocumentByQueryResponse) => void): void;
deleteScript(params: DeleteScriptParams): PromiseLike<any>;
deleteScript(params: DeleteScriptParams): Promise<any>;
deleteScript(params: DeleteScriptParams, callback: (error: any, response: any) => void): void;
deleteTemplate(params: DeleteTemplateParams): PromiseLike<any>;
deleteTemplate(params: DeleteTemplateParams): Promise<any>;
deleteTemplate(params: DeleteTemplateParams, callback: (error: any, response: any) => void): void;
exists(params: ExistsParams): PromiseLike<any>;
exists(params: ExistsParams): Promise<any>;
exists(params: ExistsParams, callback: (error: any, response: any, status?: any) => void): void;
explain(params: ExplainParams): PromiseLike<ExplainResponse>;
explain(params: ExplainParams): Promise<ExplainResponse>;
explain(params: ExplainParams, callback: (error: any, response: ExplainResponse) => void): void;
fieldStats(params: FieldStatsParams): PromiseLike<FieldStatsResponse>;
fieldStats(params: FieldStatsParams): Promise<FieldStatsResponse>;
fieldStats(params: FieldStatsParams, callback: (error: any, response: FieldStatsResponse) => void): void;
get<T>(params: GetParams, callback: (error: any, response: GetResponse<T>) => void): void;
get<T>(params: GetParams): PromiseLike<GetResponse<T>>;
getScript(params: GetScriptParams): PromiseLike<any>;
get<T>(params: GetParams): Promise<GetResponse<T>>;
getScript(params: GetScriptParams): Promise<any>;
getScript(params: GetScriptParams, callback: (error: any, response: any) => void): void;
getSource(params: GetSourceParams): PromiseLike<any>;
getSource(params: GetSourceParams): Promise<any>;
getSource(params: GetSourceParams, callback: (error: any, response: any) => void): void;
getTemplate(params: GetTemplateParams): PromiseLike<any>;
getTemplate(params: GetTemplateParams): Promise<any>;
getTemplate(params: GetTemplateParams, callback: (error: any, response: any) => void): void;
index<T>(params: IndexDocumentParams<T>): PromiseLike<any>;
index<T>(params: IndexDocumentParams<T>): Promise<any>;
index<T>(params: IndexDocumentParams<T>, callback: (error: any, response: any) => void): void;
info(params: InfoParams): PromiseLike<any>;
info(params: InfoParams): Promise<any>;
info(params: InfoParams, callback: (error: any, response: any) => void): void;
mget<T>(params: MGetParams, callback: (error: any, response: MGetResponse<T>) => void): void;
mget<T>(params: MGetParams): PromiseLike<MGetResponse<T>>;
mget<T>(params: MGetParams): Promise<MGetResponse<T>>;
msearch<T>(params: MSearchParams, callback: (error: any, response: MSearchResponse<T>) => void): void;
msearch<T>(params: MSearchParams): PromiseLike<MSearchResponse<T>>;
msearch<T>(params: MSearchParams): Promise<MSearchResponse<T>>;
msearchTemplate<T>(params: MSearchTemplateParams, callback: (error: any, response: MSearchResponse<T>) => void): void;
msearchTemplate<T>(params: MSearchTemplateParams): PromiseLike<MSearchResponse<T>>;
mtermvectors(params: MTermVectorsParams): PromiseLike<any>;
msearchTemplate<T>(params: MSearchTemplateParams): Promise<MSearchResponse<T>>;
mtermvectors(params: MTermVectorsParams): Promise<any>;
mtermvectors(params: MTermVectorsParams, callback: (error: any, response: any) => void): void;
ping(params: PingParams): PromiseLike<any>;
ping(params: PingParams): Promise<any>;
ping(params: PingParams, callback: (err: any, response: any, status: any) => void): void;
putScript(params: PutScriptParams): PromiseLike<any>;
putScript(params: PutScriptParams): Promise<any>;
putScript(params: PutScriptParams, callback: (err: any, response: any, status: any) => void): void;
putTemplate(params: PutTemplateParams): PromiseLike<any>;
putTemplate(params: PutTemplateParams): Promise<any>;
putTemplate(params: PutTemplateParams, callback: (err: any, response: any, status: any) => void): void;
reindex(params: ReindexParams): PromiseLike<ReindexResponse>;
reindex(params: ReindexParams): Promise<ReindexResponse>;
reindex(params: ReindexParams, callback: (error: any, response: ReindexResponse) => void): void;
reindexRethrottle(params: ReindexRethrottleParams): PromiseLike<any>;
reindexRethrottle(params: ReindexRethrottleParams): Promise<any>;
reindexRethrottle(params: ReindexRethrottleParams, callback: (error: any, response: any) => void): void;
renderSearchTemplate(params: RenderSearchTemplateParams): PromiseLike<any>;
renderSearchTemplate(params: RenderSearchTemplateParams): Promise<any>;
renderSearchTemplate(params: RenderSearchTemplateParams, callback: (error: any, response: any) => void): void;
scroll(params: ScrollParams): PromiseLike<any>;
scroll(params: ScrollParams, callback: (error: any, response: any) => void): void;
search<T>(params: SearchParams): PromiseLike<SearchResponse<T>>;
scroll<T>(params: ScrollParams): Promise<SearchResponse<T>>;
scroll<T>(params: ScrollParams, callback: (error: any, response: SearchResponse<T>) => void): void;
search<T>(params: SearchParams): Promise<SearchResponse<T>>;
search<T>(params: SearchParams, callback: (error: any, response: SearchResponse<T>) => void): void;
searchShards(params: SearchShardsParams): PromiseLike<SearchShardsResponse>;
searchShards(params: SearchShardsParams): Promise<SearchShardsResponse>;
searchShards(params: SearchShardsParams, callback: (error: any, response: SearchShardsResponse) => void): void;
searchTemplate(params: SearchTemplateParams): PromiseLike<any>;
searchTemplate(params: SearchTemplateParams): Promise<any>;
searchTemplate(params: SearchTemplateParams, callback: (error: any, response: any) => void): void;
suggest(params: SuggestParams): PromiseLike<any>;
suggest(params: SuggestParams): Promise<any>;
suggest(params: SuggestParams, callback: (error: any, response: any) => void): void;
termvectors(params: TermvectorsParams): PromiseLike<any>;
termvectors(params: TermvectorsParams): Promise<any>;
termvectors(params: TermvectorsParams, callback: (error: any, response: any) => void): void;
update(params: UpdateDocumentParams): PromiseLike<any>;
update(params: UpdateDocumentParams): Promise<any>;
update(params: UpdateDocumentParams, callback: (error: any, response: any) => void): void;
updateByQuery(params: UpdateDocumentByQueryParams): PromiseLike<any>;
updateByQuery(params: UpdateDocumentByQueryParams): Promise<any>;
updateByQuery(params: UpdateDocumentByQueryParams, callback: (error: any, response: any) => void): void;
}
@@ -774,43 +774,43 @@ declare module Elasticsearch {
export interface Cat {
aliases(params: CatAliasesParams, callback: (error: any, response: any) => void): void;
aliases(params: CatAliasesParams): PromiseLike<any>;
aliases(params: CatAliasesParams): Promise<any>;
allocation(params: CatAllocationParams, callback: (error: any, response: any) => void): void;
allocation(params: CatAllocationParams): PromiseLike<any>;
allocation(params: CatAllocationParams): Promise<any>;
count(params: CatCountParams, callback: (error: any, response: any) => void): void;
count(params: CatAllocationParams): PromiseLike<any>;
count(params: CatAllocationParams): Promise<any>;
fielddata(params: CatFielddataParams, callback: (error: any, response: any) => void): void;
fielddata(params: CatFielddataParams): PromiseLike<any>;
fielddata(params: CatFielddataParams): Promise<any>;
health(params: CatHealthParams, callback: (error: any, response: any) => void): void;
health(params: CatHealthParams): PromiseLike<any>;
health(params: CatHealthParams): Promise<any>;
help(params: CatHelpParams, callback: (error: any, response: any) => void): void;
help(params: CatHelpParams): PromiseLike<any>;
help(params: CatHelpParams): Promise<any>;
indices(params: CatIndicesParams, callback: (error: any, response: any) => void): void;
indices(params: CatIndicesParams): PromiseLike<any>;
indices(params: CatIndicesParams): Promise<any>;
master(params: CatCommonParams, callback: (error: any, response: any) => void): void;
master(params: CatCommonParams): PromiseLike<any>;
master(params: CatCommonParams): Promise<any>;
nodeattrs(params: CatCommonParams, callback: (error: any, response: any) => void): void;
nodeattrs(params: CatCommonParams): PromiseLike<any>;
nodeattrs(params: CatCommonParams): Promise<any>;
nodes(params: CatCommonParams, callback: (error: any, response: any) => void): void;
nodes(params: CatCommonParams): PromiseLike<any>;
nodes(params: CatCommonParams): Promise<any>;
pendingTasks(params: CatCommonParams, callback: (error: any, response: any) => void): void;
pendingTasks(params: CatCommonParams): PromiseLike<any>;
pendingTasks(params: CatCommonParams): Promise<any>;
plugins(params: CatCommonParams, callback: (error: any, response: any) => void): void;
plugins(params: CatCommonParams): PromiseLike<any>;
plugins(params: CatCommonParams): Promise<any>;
recovery(params: CatRecoveryParams, callback: (error: any, response: any) => void): void;
recovery(params: CatRecoveryParams): PromiseLike<any>;
recovery(params: CatRecoveryParams): Promise<any>;
repositories(params: CatCommonParams, callback: (error: any, response: any) => void): void;
repositories(params: CatCommonParams): PromiseLike<any>;
repositories(params: CatCommonParams): Promise<any>;
segments(params: CatSegmentsParams, callback: (error: any, response: any) => void): void;
segments(params: CatSegmentsParams): PromiseLike<any>;
segments(params: CatSegmentsParams): Promise<any>;
shards(params: CatShardsParams, callback: (error: any, response: any) => void): void;
shards(params: CatShardsParams): PromiseLike<any>;
shards(params: CatShardsParams): Promise<any>;
snapshots(params: CatSnapshotsParams, callback: (error: any, response: any) => void): void;
snapshots(params: CatSnapshotsParams): PromiseLike<any>;
snapshots(params: CatSnapshotsParams): Promise<any>;
tasks(params: CatTasksParams, callback: (error: any, response: any) => void): void;
tasks(params: CatTasksParams): PromiseLike<any>;
tasks(params: CatTasksParams): Promise<any>;
threadPool(params: CatThreadPoolParams, callback: (error: any, response: any) => void): void;
threadPool(params: CatThreadPoolParams): PromiseLike<any>;
threadPool(params: CatThreadPoolParams): Promise<any>;
}
export type CatBytes = "b" | "k" | "kb" | "m" | "mb" | "g" | "gb" | "t" | "tb" | "p" | "pb";
@@ -907,21 +907,21 @@ declare module Elasticsearch {
export interface Cluster {
allocationExplain(params: ClusterAllocationExplainParams, callback: (error: any, response: any) => void): void;
allocationExplain(params: ClusterAllocationExplainParams): PromiseLike<any>;
allocationExplain(params: ClusterAllocationExplainParams): Promise<any>;
getSettings(params: ClusterGetSettingsParams, callback: (error: any, response: any) => void): void;
getSettings(params: ClusterGetSettingsParams): PromiseLike<any>;
getSettings(params: ClusterGetSettingsParams): Promise<any>;
health(params: ClusterHealthParams, callback: (error: any, response: any) => void): void;
health(params: ClusterHealthParams): PromiseLike<any>;
health(params: ClusterHealthParams): Promise<any>;
pendingTasks(params: ClusterPendingTasksParams, callback: (error: any, response: any) => void): void;
pendingTasks(params: ClusterPendingTasksParams): PromiseLike<any>;
pendingTasks(params: ClusterPendingTasksParams): Promise<any>;
putSettings(params: ClusterPutSettingsParams, callback: (error: any, response: any) => void): void;
putSettings(params: ClusterPutSettingsParams): PromiseLike<any>;
putSettings(params: ClusterPutSettingsParams): Promise<any>;
reroute(params: ClusterRerouteParams, callback: (error: any, response: any) => void): void;
reroute(params: ClusterRerouteParams): PromiseLike<any>;
reroute(params: ClusterRerouteParams): Promise<any>;
state(params: ClusterStateParams, callback: (error: any, response: any) => void): void;
state(params: ClusterStateParams): PromiseLike<any>;
state(params: ClusterStateParams): Promise<any>;
stats(params: ClusterStatsParams, callback: (error: any, response: any) => void): void;
stats(params: ClusterStatsParams): PromiseLike<any>;
stats(params: ClusterStatsParams): Promise<any>;
}
export interface ClusterAllocationExplainParams extends GenericParams {
@@ -988,77 +988,77 @@ declare module Elasticsearch {
export class Indices {
analyze(params: IndicesAnalyzeParams, callback: (error: any, response: any, status: any) => void): void;
analyze(params: IndicesAnalyzeParams): PromiseLike<any>;
analyze(params: IndicesAnalyzeParams): Promise<any>;
clearCache(params: IndicesClearCacheParams, callback: (error: any, response: any, status: any) => void): void;
clearCache(params: IndicesClearCacheParams): PromiseLike<any>;
clearCache(params: IndicesClearCacheParams): Promise<any>;
close(params: IndicesCloseParams, callback: (error: any, response: any, status: any) => void): void;
close(params: IndicesCloseParams): PromiseLike<any>;
close(params: IndicesCloseParams): Promise<any>;
create(params: IndicesCreateParams, callback: (error: any, response: any, status: any) => void): void;
create(params: IndicesCreateParams): PromiseLike<any>;
create(params: IndicesCreateParams): Promise<any>;
delete(params: IndicesDeleteParams, callback: (error: any, response: any, status: any) => void): void;
delete(params: IndicesDeleteParams): PromiseLike<any>;
delete(params: IndicesDeleteParams): Promise<any>;
deleteAlias(params: IndicesDeleteAliasParams, callback: (error: any, response: any, status: any) => void): void;
deleteAlias(params: IndicesDeleteAliasParams): PromiseLike<any>;
deleteAlias(params: IndicesDeleteAliasParams): Promise<any>;
deleteTemplate(params: IndicesDeleteTemplateParams, callback: (error: any, response: any, status: any) => void): void;
deleteTemplate(params: IndicesDeleteTemplateParams): PromiseLike<any>;
deleteTemplate(params: IndicesDeleteTemplateParams): Promise<any>;
exists(params: IndicesExistsParams, callback: (error: any, response: any, status: any) => void): void;
exists(params: IndicesExistsParams): PromiseLike<any>;
exists(params: IndicesExistsParams): Promise<any>;
existsAlias(params: IndicesExistsAliasParams, callback: (error: any, response: any, status: any) => void): void;
existsAlias(params: IndicesExistsAliasParams): PromiseLike<any>;
existsAlias(params: IndicesExistsAliasParams): Promise<any>;
existsTemplate(params: IndicesExistsTemplateParams, callback: (error: any, response: any, status: any) => void): void;
existsTemplate(params: IndicesExistsTemplateParams): PromiseLike<any>;
existsTemplate(params: IndicesExistsTemplateParams): Promise<any>;
existsType(params: IndicesExistsTypeParams, callback: (error: any, response: any, status: any) => void): void;
existsType(params: IndicesExistsTypeParams): PromiseLike<any>;
existsType(params: IndicesExistsTypeParams): Promise<any>;
flush(params: IndicesFlushParams, callback: (error: any, response: any, status: any) => void): void;
flush(params: IndicesFlushParams): PromiseLike<any>;
flush(params: IndicesFlushParams): Promise<any>;
flushSynced(params: IndicesFlushSyncedParams, callback: (error: any, response: any, status: any) => void): void;
flushSynced(params: IndicesFlushSyncedParams): PromiseLike<any>;
flushSynced(params: IndicesFlushSyncedParams): Promise<any>;
forcemerge(params: IndicesForcemergeParams, callback: (error: any, response: any, status: any) => void): void;
forcemerge(params: IndicesForcemergeParams): PromiseLike<any>;
forcemerge(params: IndicesForcemergeParams): Promise<any>;
get(params: IndicesGetParams, callback: (error: any, response: any, status: any) => void): void;
get(params: IndicesGetParams): PromiseLike<any>;
get(params: IndicesGetParams): Promise<any>;
getAlias(params: IndicesGetAliasParams, callback: (error: any, response: any, status: any) => void): void;
getAlias(params: IndicesGetAliasParams): PromiseLike<any>;
getAlias(params: IndicesGetAliasParams): Promise<any>;
getFieldMapping(params: IndicesGetFieldMappingParams, callback: (error: any, response: any, status: any) => void): void;
getFieldMapping(params: IndicesGetFieldMappingParams): PromiseLike<any>;
getFieldMapping(params: IndicesGetFieldMappingParams): Promise<any>;
getMapping(params: IndicesGetMappingParams, callback: (error: any, response: any, status: any) => void): void;
getMapping(params: IndicesGetMappingParams): PromiseLike<any>;
getMapping(params: IndicesGetMappingParams): Promise<any>;
getSettings(params: IndicesGetSettingsParams, callback: (error: any, response: any, status: any) => void): void;
getSettings(params: IndicesGetSettingsParams): PromiseLike<any>;
getSettings(params: IndicesGetSettingsParams): Promise<any>;
getTemplate(params: IndicesGetTemplateParams, callback: (error: any, response: any, status: any) => void): void;
getTemplate(params: IndicesGetTemplateParams): PromiseLike<any>;
getTemplate(params: IndicesGetTemplateParams): Promise<any>;
getUpgrade(params: IndicesGetUpgradeParams, callback: (error: any, response: any, status: any) => void): void;
getUpgrade(params: IndicesGetUpgradeParams): PromiseLike<any>;
getUpgrade(params: IndicesGetUpgradeParams): Promise<any>;
open(params: IndicesOpenParams, callback: (error: any, response: any, status: any) => void): void;
open(params: IndicesOpenParams): PromiseLike<any>;
open(params: IndicesOpenParams): Promise<any>;
putAlias(params: IndicesPutAliasParams, callback: (error: any, response: any, status: any) => void): void;
putAlias(params: IndicesPutAliasParams): PromiseLike<any>;
putAlias(params: IndicesPutAliasParams): Promise<any>;
putMapping(params: IndicesPutMappingParams, callback: (error: any, response: any, status: any) => void): void;
putMapping(params: IndicesPutMappingParams): PromiseLike<any>;
putMapping(params: IndicesPutMappingParams): Promise<any>;
putSettings(params: IndicesPutSettingsParams, callback: (error: any, response: any, status: any) => void): void;
putSettings(params: IndicesPutSettingsParams): PromiseLike<any>;
putSettings(params: IndicesPutSettingsParams): Promise<any>;
putTemplate(params: IndicesPutTemplateParams, callback: (error: any, response: any) => void): void;
putTemplate(params: IndicesPutTemplateParams): PromiseLike<any>;
putTemplate(params: IndicesPutTemplateParams): Promise<any>;
recovery(params: IndicesRecoveryParams, callback: (error: any, response: any) => void): void;
recovery(params: IndicesRecoveryParams): PromiseLike<any>;
recovery(params: IndicesRecoveryParams): Promise<any>;
refresh(params: IndicesRefreshParams, callback: (error: any, response: any) => void): void;
refresh(params: IndicesRefreshParams): PromiseLike<any>;
refresh(params: IndicesRefreshParams): Promise<any>;
rollover(params: IndicesRolloverParams, callback: (error: any, response: IndicesRolloverResponse) => void): void;
rollover(params: IndicesRolloverParams): PromiseLike<IndicesRolloverResponse>;
rollover(params: IndicesRolloverParams): Promise<IndicesRolloverResponse>;
segments(params: IndicesSegmentsParams, callback: (error: any, response: any) => void): void;
segments(params: IndicesSegmentsParams): PromiseLike<any>;
segments(params: IndicesSegmentsParams): Promise<any>;
shardStores(params: IndicesShardStoresParams, callback: (error: any, response: any) => void): void;
shardStores(params: IndicesShardStoresParams): PromiseLike<any>;
shardStores(params: IndicesShardStoresParams): Promise<any>;
shrink(params: IndicesShrinkParams, callback: (error: any, response: any) => void): void;
shrink(params: IndicesShrinkParams): PromiseLike<any>;
shrink(params: IndicesShrinkParams): Promise<any>;
stats(params: IndicesStatsParams, callback: (error: any, response: any) => void): void;
stats(params: IndicesStatsParams): PromiseLike<any>;
stats(params: IndicesStatsParams): Promise<any>;
updateAliases(params: IndicesUpdateAliasesParams, callback: (error: any, response: any) => void): void;
updateAliases(params: IndicesUpdateAliasesParams): PromiseLike<any>;
updateAliases(params: IndicesUpdateAliasesParams): Promise<any>;
upgrade(params: IndicesUpgradeParams, callback: (error: any, response: any) => void): void;
upgrade(params: IndicesUpgradeParams): PromiseLike<any>;
upgrade(params: IndicesUpgradeParams): Promise<any>;
validateQuery(params: IndicesValidateQueryParams, callback: (error: any, response: any) => void): void;
validateQuery(params: IndicesValidateQueryParams): PromiseLike<any>;
validateQuery(params: IndicesValidateQueryParams): Promise<any>;
}
export interface IndicesAnalyzeParams extends GenericParams {
@@ -1416,13 +1416,13 @@ declare module Elasticsearch {
export class Ingest {
deletePipeline(params: IngestDeletePipelineParams, callback: (error: any, response: any, status: any) => void): void;
deletePipeline(params: IngestDeletePipelineParams): PromiseLike<any>;
deletePipeline(params: IngestDeletePipelineParams): Promise<any>;
getPipeline(params: IngestGetPipelineParams, callback: (error: any, response: any, status: any) => void): void;
getPipeline(params: IngestGetPipelineParams): PromiseLike<any>;
getPipeline(params: IngestGetPipelineParams): Promise<any>;
putPipeline(params: IngestPutPipelineParams, callback: (error: any, response: any, status: any) => void): void;
putPipeline(params: IngestPutPipelineParams): PromiseLike<any>;
putPipeline(params: IngestPutPipelineParams): Promise<any>;
simulate(params: IngestSimulateParams, callback: (error: any, response: any, status: any) => void): void;
simulate(params: IngestSimulateParams): PromiseLike<any>;
simulate(params: IngestSimulateParams): Promise<any>;
}
export interface IngestDeletePipelineParams extends GenericParams {
@@ -1450,11 +1450,11 @@ declare module Elasticsearch {
export class Nodes {
hotThreads(params: NodesHotThreadsParams, callback: (error: any, response: any, status: any) => void): void;
hotThreads(params: NodesHotThreadsParams): PromiseLike<any>;
hotThreads(params: NodesHotThreadsParams): Promise<any>;
info(params: NodesInfoParams, callback: (error: any, response: any, status: any) => void): void;
info(params: NodesInfoParams): PromiseLike<any>;
info(params: NodesInfoParams): Promise<any>;
stats(params: NodesStatsParams, callback: (error: any, response: any, status: any) => void): void;
stats(params: NodesStatsParams): PromiseLike<any>;
stats(params: NodesStatsParams): Promise<any>;
}
export interface NodesHotThreadsParams extends GenericParams {
@@ -1491,23 +1491,23 @@ declare module Elasticsearch {
export class Snapshot {
create(params: SnapshotCreateParams, callback: (error: any, response: any, status: any) => void): void;
create(params: SnapshotCreateParams): PromiseLike<any>;
create(params: SnapshotCreateParams): Promise<any>;
createRepository(params: SnapshotCreateRepositoryParams, callback: (error: any, response: any, status: any) => void): void;
createRepository(params: SnapshotCreateRepositoryParams): PromiseLike<any>;
createRepository(params: SnapshotCreateRepositoryParams): Promise<any>;
delete(params: SnapshotDeleteParams, callback: (error: any, response: any, status: any) => void): void;
delete(params: SnapshotDeleteParams): PromiseLike<any>;
delete(params: SnapshotDeleteParams): Promise<any>;
deleteRepository(params: SnapshotDeleteRepositoryParams, callback: (error: any, response: any, status: any) => void): void;
deleteRepository(params: SnapshotDeleteRepositoryParams): PromiseLike<any>;
deleteRepository(params: SnapshotDeleteRepositoryParams): Promise<any>;
get(params: SnapshotGetParams, callback: (error: any, response: any, status: any) => void): void;
get(params: SnapshotGetParams): PromiseLike<any>;
get(params: SnapshotGetParams): Promise<any>;
getRepository(params: SnapshotGetRepositoryParams, callback: (error: any, response: any, status: any) => void): void;
getRepository(params: SnapshotGetRepositoryParams): PromiseLike<any>;
getRepository(params: SnapshotGetRepositoryParams): Promise<any>;
restore(params: SnapshotRestoreParams, callback: (error: any, response: any, status: any) => void): void;
restore(params: SnapshotRestoreParams): PromiseLike<any>;
restore(params: SnapshotRestoreParams): Promise<any>;
status(params: SnapshotStatusParams, callback: (error: any, response: any, status: any) => void): void;
status(params: SnapshotStatusParams): PromiseLike<any>;
status(params: SnapshotStatusParams): Promise<any>;
verifyRepository(params: SnapshotVerifyRepositoryParams, callback: (error: any, response: any, status: any) => void): void;
verifyRepository(params: SnapshotVerifyRepositoryParams): PromiseLike<any>;
verifyRepository(params: SnapshotVerifyRepositoryParams): Promise<any>;
}
export interface SnapshotCreateParams extends GenericParams {
@@ -1571,11 +1571,11 @@ declare module Elasticsearch {
export class Tasks {
cancel(params: TasksCancelParams, callback: (error: any, response: any, status: any) => void): void;
cancel(params: TasksCancelParams): PromiseLike<any>;
cancel(params: TasksCancelParams): Promise<any>;
get(params: TasksGetParams, callback: (error: any, response: any, status: any) => void): void;
get(params: TasksGetParams): PromiseLike<any>;
get(params: TasksGetParams): Promise<any>;
list(params: TasksListParams, callback: (error: any, response: any, status: any) => void): void;
list(params: TasksListParams): PromiseLike<any>;
list(params: TasksListParams): Promise<any>;
}
export interface TasksCancelParams extends GenericParams {
@@ -0,0 +1,6 @@
import * as React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
const wrapper = shallow(<strong>Hello World!</strong>);
const result: object = toJson(wrapper);
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for enzyme-to-json 1.5
// Project: https://github.com/adriantoine/enzyme-to-json#readme
// Definitions by: Joscha Feth <https://github.com/joscha>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { ReactWrapper, ShallowWrapper } from 'enzyme';
export default function toJson<P, S>(wrapper: ShallowWrapper<P, S> | ReactWrapper<P, S> | Cheerio): object;
+24
View File
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"dom",
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"jsx": "react",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"enzyme-to-json-tests.tsx"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }
+1 -1
View File
@@ -3086,7 +3086,7 @@ interface ITextOptions extends IObjectOptions {
textBackgroundColor?: string;
path?: string;
useNative?: Boolean;
useNative?: boolean;
text?: string;
}
export interface Text extends ITextOptions {}
+9 -16
View File
@@ -1,21 +1,17 @@
import $ = require('jquery');
// Can also be used with $(document).ready()
$(window).load(function() {
$(function() {
$('.flexslider').flexslider({
animation: "slide"
});
});
// Can also be used with $(document).ready()
$(window).load(function() {
$(function() {
$('.flexslider').flexslider({
animation: "slide",
controlNav: "thumbnails"
});
});
$(window).load(function() {
$(function() {
// The slider being synced must be initialized first
$('#carousel').flexslider({
animation: "slide",
@@ -36,7 +32,7 @@ $(window).load(function() {
});
});
$(window).load(function() {
$(function() {
$('.flexslider').flexslider({
animation: "slide",
animationLoop: false,
@@ -45,8 +41,7 @@ $(window).load(function() {
});
});
// Can also be used with $(document).ready()
$(window).load(function() {
$(function() {
$('.flexslider').flexslider({
animation: "slide",
animationLoop: false,
@@ -57,12 +52,10 @@ $(window).load(function() {
});
});
// Can also be used with $(document).ready()
$(window).load(function() {
$(function() {
// Vimeo API nonsense
var player = document.getElementById('player_1');
$(player).on('ready', ready);
$(ready);
function addEvent(element:any, eventName:any, callback:any) {
if (element.addEventListener) {
@@ -72,8 +65,8 @@ $(window).load(function() {
}
}
function ready(player_id: any) {
var froogaloop = $(player_id);
function ready() {
var froogaloop = $('#player_1');
froogaloop.on('play', function(data) {
$('.flexslider').flexslider({ pauseText: "pause" });
});
+2
View File
@@ -4,6 +4,8 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery" />
interface SliderObject { //Object: The slider element itself
container: Object; //Object: The ul.slides within the slider
slides: Object; //Object: The slides of the slider
-5
View File
@@ -12,11 +12,6 @@
"typeRoots": [
"../"
],
"paths": {
"jquery": [
"jquery/v2"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
@@ -205,7 +205,7 @@ readStream = fs.createReadStream(path, {
writeStream = fs.createWriteStream(path);
writeStream = fs.createWriteStream(path, {
flags: str,
encoding: str
defaultEncoding: str
});
let isDirectoryCallback = (err: Error, isDirectory: boolean) => {
+273 -237
View File
@@ -6,8 +6,24 @@
/// <reference types="gapi" />
declare namespace gapi.client.drive {
export namespace files {
declare namespace gapi.client {
export module drive {
const files: {
get: (parameters: GetParameters) => HttpRequest<FileResource>;
patch: (parameters: PatchParameters) => HttpRequest<FileResource>;
copy: (parameters: CopyParameters) => HttpRequest<FileResource>;
delete: (parameters: DeleteParameters) => HttpRequest<any>;
emptyTrash: () => HttpRequest<any>;
export: (parameters: ExportParameters) => HttpRequest<FileResource>;
generateIds: (parameters: GenerateIdsParameters) => HttpRequest<IdsResource>;
insert: (parameters: InsertParameters) => HttpRequest<FileResource>;
list: (parameters: ListParameters) => HttpRequest<FileListResource>;
touch: (parameters: TouchParameters) => HttpRequest<FileResource>;
trash: (parameters: TrashParameters) => HttpRequest<FileResource>;
untrash: (parameters: UntrashParameters) => HttpRequest<FileResource>;
watch: (parameters: WatchParameters) => HttpRequest<ChannelResource>;
}
interface GetParameters {
fileId: string;
acknowledgeAbuse?: boolean;
@@ -17,8 +33,6 @@ declare namespace gapi.client.drive {
updateViewedDate?: boolean;
}
export function get(parameters: GetParameters): HttpRequest<FileResource>;
interface PatchParameters {
fileId: string;
resource?: FileResource
@@ -37,8 +51,6 @@ declare namespace gapi.client.drive {
useContentAsIndexableText?: boolean;
}
export function patch(parameters: PatchParameters): HttpRequest<FileResource>;
interface CopyParameters {
fileId: string;
resource?: FileResource;
@@ -52,13 +64,39 @@ declare namespace gapi.client.drive {
visibility?: string;
}
export function copy(parameters: CopyParameters): HttpRequest<FileResource>;
interface DeleteParameters {
fileId: string;
supportsTeamDrives?: boolean;
}
interface ExportParameters {
fileId: string;
mimeType: string;
}
interface GenerateIdsParameters {
maxResults?: number;
space?: string;
}
interface InsertParameters {
uploadType: string;
convert?: boolean;
ocr?: boolean;
ocrLanguage?: string;
pinned?: boolean;
supportsTeamDrives?: boolean;
timedTextLanguage?: string;
timedTextTrackName?: string;
usecontentAsIndexableText?: boolean;
visibility?: string;
}
interface ListParameters {
corpora?: string;
corpus?: string;
includeTeamDriveItems?: boolean;
maxResults: number;
maxResults?: number;
orderBy?: string;
pageToken?: string;
projection?: string;
@@ -68,28 +106,22 @@ declare namespace gapi.client.drive {
teamDriveId?: string;
}
export function list(parameters: ListParameters): HttpRequest<FileListResource>;
interface TouchParameters {
fileId: string;
supportsTeamDrives?: boolean;
}
export function touch(parameters: TouchParameters): HttpRequest<FileResource>;
interface TrashParameters {
fileId: string;
supportsTeamDrives?: boolean;
}
export function trash(parameters: TrashParameters): HttpRequest<FileResource>;
interface UntrashParameters {
fileId: string;
supportsTeamDrives?: boolean;
}
export function untrash(parameters: UntrashParameters): HttpRequest<FileResource>;
interface WatchParameters {
fileId: string;
@@ -98,239 +130,243 @@ declare namespace gapi.client.drive {
supportsTeamDrives?: boolean;
}
export function watch(parameters: WatchParameters): HttpRequest<ChannelResource>;
}
export interface FileResource {
kind: 'drive#file';
id?: string;
// etag
selfLink?: string;
webContentLink?: string;
webViewLink?: string;
alternateLink?: string;
embedLink?: string;
// openWithLinks
defaultOpenWithLink?: string;
iconLink?: string;
hasThumbnail?: boolean;
thumbnailLink?: string;
thumbnail?: {
image: Uint8Array;
mimType: string;
};
title?: string;
mimeType?: string;
description?: string;
labels?: {
starred?: boolean;
hidden?: boolean;
trashed?: boolean;
restricted?: boolean;
viewed?: boolean;
modified?: boolean;
};
createdDate?: Date;
modifiedDate?: Date;
modifiedByMeDate?: Date;
lastViewedByMeDate?: Date;
markedViewedByMeDate?: Date;
sharedWithMeDate?: Date;
version?: number;
sharingUser?: {
kind: 'drive#user';
displayName?: string;
picture?: {
url: string;
interface FileResource {
kind: 'drive#file';
id: string;
etag: string;
selfLink: string;
webContentLink: string;
webViewLink: string;
alternateLink: string;
embedLink: string;
// openWithLinks
defaultOpenWithLink: string;
iconLink: string;
hasThumbnail: boolean;
thumbnailLink: string;
thumbnail: {
image: Uint8Array;
mimType: string;
};
isAuthenticatedUser?: boolean;
permissionId?: string;
emailAddress?: string;
};
parents?: ParentResource[];
downloadUrl?: string;
// exportLinks
indexableText?: {
text: string;
};
userPermission?: PermissionResource;
permissions?: PermissionResource[];
hasAugmentedPermissions?: boolean;
originalFilename?: string;
fileExtension?: string;
fullFileExtension?: string;
md5Checksum?: string;
fileSize?: number;
quotaBytesUsed?: number;
ownerNames?: string[];
owners?: {
kind: 'drive#user';
displayName?: string;
picture?: {
url: string;
title: string;
mimeType: string;
description: string;
labels: {
starred: boolean;
hidden: boolean;
trashed: boolean;
restricted: boolean;
viewed: boolean;
modified: boolean;
};
isAuthenticatedUser?: boolean;
permissionId?: string;
emailAddress?: string;
}[];
teamDriveId?: string;
lastModifyingUserName?: string;
lastModifyingUser?: {
kind: 'drive#user';
displayName?: string;
picture?: {
url: string;
createdDate: Date;
modifiedDate: Date;
modifiedByMeDate: Date;
lastViewedByMeDate: Date;
markedViewedByMeDate: Date;
sharedWithMeDate: Date;
version: number;
sharingUser: {
kind: 'drive#user';
displayName: string;
picture: {
url: string;
};
isAuthenticatedUser: boolean;
permissionId: string;
emailAddress: string;
};
isAuthenticatedUser?: boolean;
permissionId?: string;
emailAddress?: string;
};
ownedByMe?: boolean;
capabilities?: {
canAddChildren?: boolean;
canChangeRestrictedDownload?: boolean;
canComment?: boolean;
canCopy?: boolean;
canDelete?: boolean;
canDownload?: boolean;
canEdit?: boolean;
canListChildren?: boolean;
canMoveItemIntoTeamDrive?: boolean;
canMoveTeamDriveItem?: boolean;
canReadRevisions?: boolean;
canReadTeamDrive?: boolean;
canRemoveChildren?: boolean;
canRename?: boolean;
canShare?: boolean;
canTrash?: boolean;
canUntrash?: boolean;
};
editable?: boolean;
canComment?: boolean;
canReadRevisions?: boolean;
shareable?: boolean;
copyable?: boolean;
writersCanShare?: boolean;
shared?: boolean;
explicitlyTrashed?: boolean;
trashingUser?: {
kind: 'drive#user';
displayName?: string;
picture?: {
url: string;
parents: ParentResource[];
downloadUrl: string;
// exportLinks
indexableText: {
text: string;
};
isAuthenticatedUser?: boolean;
permissionId?: string;
emailAddress?: string;
};
trashedDate?: Date;
appDataContents?: boolean;
headRevisionId?: string;
properties?: PropertiesResource[];
folderColorRgb?: string;
imageMediaMetadata?: {
width?: number;
height?: number;
rotation?: number;
location?: {
latitude?: number;
longitude?: number;
altitude?: number;
userPermission: PermissionResource;
permissions: PermissionResource[];
hasAugmentedPermissions: boolean;
originalFilename: string;
fileExtension: string;
fullFileExtension: string;
md5Checksum: string;
fileSize: number;
quotaBytesUsed: number;
ownerNames: string[];
owners: {
kind: 'drive#user';
displayName: string;
picture: {
url: string;
};
isAuthenticatedUser: boolean;
permissionId: string;
emailAddress: string;
}[];
teamDriveId: string;
lastModifyingUserName: string;
lastModifyingUser: {
kind: 'drive#user';
displayName: string;
picture: {
url: string;
};
isAuthenticatedUser: boolean;
permissionId: string;
emailAddress: string;
};
date?: string;
cameraMake?: string;
cameraModel?: string;
exposureTime?: number;
aperture?: number;
flashUsed?: boolean;
focalLength?: number;
isoSpeed?: number;
meteringMode?: string;
sensor?: string;
exposureMode?: string;
colorSpace?: string;
whiteBalance?: string;
exposureBias?: number;
maxApertureValue?: number;
subjectDistance?: number;
lens?: string;
};
videoMediaMetadata?: {
width?: number;
height?: number;
durationMillis?: number;
};
spaces?: string[];
isAppAuthorized?: boolean;
}
ownedByMe: boolean;
capabilities: {
canAddChildren: boolean;
canChangeRestrictedDownload: boolean;
canComment: boolean;
canCopy: boolean;
canDelete: boolean;
canDownload: boolean;
canEdit: boolean;
canListChildren: boolean;
canMoveItemIntoTeamDrive: boolean;
canMoveTeamDriveItem: boolean;
canReadRevisions: boolean;
canReadTeamDrive: boolean;
canRemoveChildren: boolean;
canRename: boolean;
canShare: boolean;
canTrash: boolean;
canUntrash: boolean;
};
editable: boolean;
canComment: boolean;
canReadRevisions: boolean;
shareable: boolean;
copyable: boolean;
writersCanShare: boolean;
shared: boolean;
explicitlyTrashed: boolean;
trashingUser: {
kind: 'drive#user';
displayName: string;
picture: {
url: string;
};
isAuthenticatedUser: boolean;
permissionId: string;
emailAddress: string;
};
trashedDate: Date;
appDataContents: boolean;
headRevisionId: string;
properties: PropertiesResource[];
folderColorRgb: string;
imageMediaMetadata: {
width: number;
height: number;
rotation: number;
location: {
latitude: number;
longitude: number;
altitude: number;
};
date: string;
cameraMake: string;
cameraModel: string;
exposureTime: number;
aperture: number;
flashUsed: boolean;
focalLength: number;
isoSpeed: number;
meteringMode: string;
sensor: string;
exposureMode: string;
colorSpace: string;
whiteBalance: string;
exposureBias: number;
maxApertureValue: number;
subjectDistance: number;
lens: string;
};
videoMediaMetadata: {
width: number;
height: number;
durationMillis: number;
};
spaces: string[];
isAppAuthorized: boolean;
}
export interface FileListResource {
kind: 'drive#fileList';
// etag
selfLink?: string;
nextPageToken?: string;
nextLink?: string;
incompleteSearch?: boolean;
items: FileResource[];
}
interface FileListResource {
kind: 'drive#fileList';
etag: string;
selfLink: string;
nextPageToken: string;
nextLink: string;
incompleteSearch: boolean;
items: FileResource[];
}
export interface ParentResource {
kind: 'drive#parentReference';
id?: string;
selfLink?: string;
parentLink?: string;
isRoot?: boolean;
}
interface ParentResource {
kind: 'drive#parentReference';
id: string;
selfLink: string;
parentLink: string;
isRoot: boolean;
}
export interface PermissionResource {
kind: 'drive#permission';
// etag
id?: string;
selfLink?: string;
name?: string;
emailAddress?: string;
domain?: string;
role?: string;
additionalRoles?: string[];
type?: string;
value?: string;
authKey?: string;
withLink?: boolean;
photoLink?: string;
expirationDate?: Date;
teamDrivePermissionDetails?: {
teamDrivePermissionType?: string;
role?: string;
additionalRoles?: string[];
inheritedFrom?: string;
inherited?: boolean;
}[];
deleted?: boolean;
}
interface PermissionResource {
kind: 'drive#permission';
etag: string;
id: string;
selfLink: string;
name: string;
emailAddress: string;
domain: string;
role: string;
additionalRoles: string[];
type: string;
value: string;
authKey: string;
withLink: boolean;
photoLink: string;
expirationDate: Date;
teamDrivePermissionDetails: {
teamDrivePermissionType: string;
role: string;
additionalRoles: string[];
inheritedFrom: string;
inherited: boolean;
}[];
deleted: boolean;
}
export interface PropertiesResource {
kind: 'drive$property';
// etag
selfLink?: string;
key?: string;
visibility?: string;
value?: string;
}
interface PropertiesResource {
kind: 'drive$property';
etag: string;
selfLink: string;
key: string;
visibility: string;
value: string;
}
export interface WatchResource {
id?: string;
expiration?: number;
token?: string;
type?: string;
address?: string;
}
interface WatchResource {
id: string;
expiration: number;
token: string;
type: string;
address: string;
}
export interface ChannelResource {
kind: 'api#channel';
id?: string;
resourceId?: string;
resourceUri?: string;
token?: string;
expiration?: number;
interface ChannelResource {
kind: 'api#channel';
id: string;
resourceId: string;
resourceUri: string;
token: string;
expiration: number;
}
interface IdsResource {
kind: 'drive#generatedIds';
space: string;
ids: string[];
}
}
}
+24
View File
@@ -0,0 +1,24 @@
import { IOptions } from 'glob';
import * as globby from "globby";
(async () => {
let result: string[];
result = await globby('*.tmp');
result = await globby(['a.tmp', '*.tmp', '!{c,d,e}.tmp']);
result = globby.sync('*.tmp');
result = globby.sync(['a.tmp', '*.tmp', '!{c,d,e}.tmp']);
result = await globby('*.tmp', Object.freeze({ignore: Object.freeze([])}));
result = globby.sync('*.tmp', Object.freeze({ignore: Object.freeze([])}));
})();
const tasks: Array<{
pattern: string,
options: IOptions
}> = globby.generateGlobTasks(['*.tmp', '!b.tmp'], {ignore: ['c.tmp']});
console.log(globby.hasMagic('**') === true);
console.log(globby.hasMagic(['**', 'path1', 'path2']) === true);
console.log(globby.hasMagic(['path1', 'path2']) === false);
+17
View File
@@ -0,0 +1,17 @@
// Type definitions for globby 0.6
// Project: https://github.com/sindresorhus/globby#readme
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { IOptions } from 'glob';
declare function globby(patterns: string | string[], options?: IOptions): Promise<string[]>;
declare namespace globby {
function sync(patterns: string | string[], options?: IOptions): string[];
function generateGlobTasks(patterns: string | string[], options?: IOptions): Array<{pattern: string, options: IOptions}>;
function hasMagic(patterns: string | string[], options?: IOptions): boolean;
}
export = globby;
+22
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",
"globby-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }
@@ -1,6 +1,9 @@
import GoogleMapReact from 'google-map-react';
import GoogleMapReact, { BootstrapURLKeys } from 'google-map-react';
import * as React from 'react';
const center = { lat: 0, lng: 0 };
<GoogleMapReact center={center} zoom={3}/>;
const key: BootstrapURLKeys = { key: 'my-google-maps-key' };
const client: BootstrapURLKeys = { client: 'my-client-identifier', v: '3.28' , language: 'en' };
<GoogleMapReact center={center} zoom={3} bootstrapURLKeys={client}/>;
+1 -4
View File
@@ -6,10 +6,7 @@
import * as React from 'react';
export interface BootstrapURLKeys {
key: string;
language?: string;
}
export type BootstrapURLKeys = ({ key: string; } | { client: string; v: string; }) & { language?: string };
export interface Options {
styles?: any[];
+3 -3
View File
@@ -8,11 +8,11 @@ export function formatError(error: GraphQLError): GraphQLFormattedError;
export type GraphQLFormattedError = {
message: string,
locations: Array<GraphQLErrorLocation>,
path: Array<string | number>
locations?: Array<GraphQLErrorLocation>,
path?: Array<string | number>
};
export type GraphQLErrorLocation = {
line: number,
column: number
};
};
+4 -3
View File
@@ -1935,10 +1935,11 @@ export class Request extends Podium {
/** same as pre but represented as the response object created by the pre method. */
preResponses: Object;
/**
* an object containing the query parameters.
* TODO update with outcome of: https://github.com/hapijs/hapi/pull/3479
* by default the object outputted from [node's URL parse()](https://nodejs.org/docs/latest/api/url.html#url_urlobject_query) method.
* Might also be set indirectly via [request.setUrl](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/17354#requestseturlurl-striptrailingslash) in which case it may be
* a string (if url is set to an object with the query attribute as an unparsed string).
*/
query: Object;
query: any;
/** an object containing the Node HTTP server objects. **Direct interaction with these raw objects is not recommended.** */
raw: {
req: http.IncomingMessage; // Or http.ClientRequest http://www.apetuts.com/tutorial/node-js-http-client-request-class/ ?
+14
View File
@@ -0,0 +1,14 @@
// Added test in addition to docs, for request.query
import * as Hapi from 'hapi';
interface GetThingQuery {
name: string;
}
const handler: Hapi.RouteHandler = function (request, reply) {
const query = request.query as GetThingQuery;
return reply(`You asked for ${query.name}`);
};
+1
View File
@@ -35,6 +35,7 @@
"test/request/generate-response.ts",
"test/request/get-log.ts",
"test/request/log.ts",
"test/request/query.ts",
"test/request/set-method.ts",
"test/request/set-url.ts",
"test/request/tail.ts",
+76 -1
View File
@@ -44,7 +44,7 @@ let map = new H.Map(mapContainer, defaultLayers.normal.map, {
// initial center and zoom level of the map
zoom: 16,
// Champs-Elysees
center: {lat: 48.869145, lng: 2.314298}
center: { lat: 48.869145, lng: 2.314298 }
});
// Step 3: make the map interactive
@@ -85,3 +85,78 @@ let polyline = new H.map.Polyline(new H.geo.Strip());
// tslint:disable-next-line:array-type
let clipArr: Array<Array<number>>;
clipArr = polyline.clip(new H.geo.Rect(5, 5, 5, 5));
let router = platform.getRoutingService();
let calculateRouteParams = {
waypoint0: 'geo!52.5,13.4',
waypoint1: 'geo!52.5,13.45',
mode: 'fastest;car;traffic:disabled'
};
router.calculateRoute(
calculateRouteParams,
(result) => {
console.log(result.response.route[0]);
},
(error) => {
console.log(error);
}
);
let places = platform.getPlacesService();
let entryPoint = H.service.PlacesService.EntryPoint;
places.request(
entryPoint.SEARCH,
{
at: '52.5044,13.3909',
q: 'pizza'
},
(response) => {
console.log(response);
let items = response.results.items;
places.follow(
items[0].href,
(resp) => {
console.log(resp);
},
(resp) => {
console.log('ERROR: ' + resp);
}
);
},
(error) => {
console.log('ERROR: ' + error);
}
);
let geocoder = platform.getGeocodingService();
let geocodingParams: H.service.ServiceParameters = {
searchText: '425 W Randolph Street, Chicago'
};
geocoder.geocode(
geocodingParams,
(result) => {
console.log(result);
console.log(result.Response.View[0].Result[0].Location.DisplayPosition);
},
(error) => {
console.log(error);
}
);
// deprecated but w/e
let enterprieseRouter = platform.getEnterpriseRoutingService();
let calculateIsoline: H.service.ServiceParameters = {
start: 'geo!52.5,13.4',
distance: '1000,2000',
mode: 'fastest;car;traffic:disabled'
};
enterprieseRouter.calculateIsoline(
calculateIsoline,
(result) => {
console.log(result);
console.log(result.Response.isolines[0]);
},
(error) => {
console.log(error);
}
);
+147 -13
View File
@@ -4301,14 +4301,15 @@ declare namespace H {
/**
* This is generic method to query places RestAPI.
* @param entryPoint {string} - can be one of available entry points H.service.PlacesService.EntryPoint i.e value of H.service.PlacesService.EntryPoint.SEARCH
* @param entryPoint {H.service.PlacesService.EntryPoint} - can be one of available entry points H.service.PlacesService.EntryPoint i.e value of H.service.PlacesService.EntryPoint.SEARCH
* @param entryPointParams {Object} - parameter map key value pairs will be transformed into the url key=value parametes. For entry point parameters description please refer to places
* restful api documentation documentation for available parameters for chose entry point
* @param onResult {Function} - callback which is called when result is returned
* @param onError {Function} - callback which is called when error occured (i.e request timeout)
* @returns {H.service.JsonpRequestHandle} - jsonp request handle
*/
request(entryPoint: string, entryPointParams: {}, onResult: () => void, onError: () => void): H.service.JsonpRequestHandle;
request(entryPoint: H.service.PlacesService.EntryPoint, entryPointParams: {}, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void):
H.service.JsonpRequestHandle;
/**
* Function triggers places api 'search' entry point. Please refer to documentation for parameter specification and response handling.
@@ -4317,7 +4318,7 @@ declare namespace H {
* @param onError {Function}
* @returns {H.service.JsonpRequestHandle} - jsonp request handle
*/
search(searchParams: H.service.ServiceParameters, onResult: () => void, onError: () => void): H.service.JsonpRequestHandle;
search(searchParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle;
/**
* Function triggers places api 'suggestions' entry point. Please refer to documentation for parameter specification and response handling.
@@ -4326,7 +4327,7 @@ declare namespace H {
* @param onError {Function}
* @returns {H.service.JsonpRequestHandle} - jsonp request handle
*/
suggest(suggestParams: H.service.ServiceParameters, onResult: () => void, onError: () => void): H.service.JsonpRequestHandle;
suggest(suggestParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle;
/**
* Function triggers places api 'explore' entry point. Please refer to documentation for parameter specification and response handling.
@@ -4335,7 +4336,7 @@ declare namespace H {
* @param onError {Function}
* @returns {H.service.JsonpRequestHandle} - jsonp request handle
*/
explore(exploreParams: H.service.ServiceParameters, onResult: () => void, onError: () => void): H.service.JsonpRequestHandle;
explore(exploreParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle;
/**
* Function triggers places api 'around' entry point. Please refer to documentation for parameter specification and response handling.
@@ -4344,7 +4345,7 @@ declare namespace H {
* @param onError {Function}
* @returns {H.service.JsonpRequestHandle} - jsonp request handle
*/
around(aroundParams: H.service.ServiceParameters, onResult: () => void, onError: () => void): H.service.JsonpRequestHandle;
around(aroundParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle;
/**
* Function triggers places api 'here' entry point. Please refer to documentation for parameter specification and response handling.
@@ -4353,7 +4354,7 @@ declare namespace H {
* @param onError {Function}
* @returns {H.service.JsonpRequestHandle} - jsonp request handle
*/
here(hereParams: H.service.ServiceParameters, onResult: () => void, onError: () => void): H.service.JsonpRequestHandle;
here(hereParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle;
/**
* Function triggers places api 'categories' entry point. Please refer to documentation for parameter specification and response handling.
@@ -4362,7 +4363,7 @@ declare namespace H {
* @param onError {Function}
* @returns {H.service.JsonpRequestHandle} - jsonp request handle
*/
categories(categoriesParams: H.service.ServiceParameters, onResult: () => void, onError: () => void): H.service.JsonpRequestHandle;
categories(categoriesParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle;
/**
* This method should be used to follow hyperlinks available in results returned by dicovery queries.
@@ -4372,7 +4373,7 @@ declare namespace H {
* @param opt_additionalParameters {Object=} - additional parameters to send with request
* @returns {H.service.JsonpRequestHandle} - jsonp resquest handle
*/
follow(hyperlink: string, onResult: () => void, onError: () => void, opt_additionalParameters?: {}): H.service.JsonpRequestHandle;
follow(hyperlink: string, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void, opt_additionalParameters?: {}): H.service.JsonpRequestHandle;
}
namespace PlacesService {
@@ -4605,7 +4606,140 @@ declare namespace H {
* This type encapsulates a response object provider by a HERE platform service.
*/
interface ServiceResult {
[key: string]: string;
[key: string]: any;
response?: {
language?: string,
route?: Array<{
leg: Array<{
maneuver: Array<{
id: string,
instruction: string,
length: number,
note: string[],
position: {
latitude: number,
longitude: number
},
shape: string[],
travelTime: number,
_type: string
}>
}>,
mode: {
feature: any[],
trafficMode: string,
transportModes: string[],
type: string
}
shape: string[],
summary: {
baseTime: number,
distance: number,
flags: string[],
text: string,
trafficTime: number,
travelTime: number
}
waypoint: Array<{
label: string,
linkId: string,
mappedPosition: {
latitude: number,
longitude: number
},
mappedRoadName: string,
originalPosition: {
latitude: number,
longitude: number
},
shapeIndex: number,
sideOfStreet: string,
spot: number,
type: string
}>
}>,
metaInfo: {}
};
results?: {
items?: any[],
next?: string
};
search?: {
context: {
href: string,
location: {
address: {
city: string,
country: string,
countryCode: string,
county: string,
district: string,
house: string,
postalCode: string,
stateCode: string,
street: string,
text: string
},
position: number[]
},
type: string
}
};
Response?: {
MetaInfo: {
Timestamp: string
},
View: Array<{
Result: Array<{
Location: {
Address: {
AdditionalData: Array<{
key: string,
value: string
}>,
City: string,
Country: string,
County: string,
District: string,
HouseNumber: string,
Label: string,
PostalCode: string,
State: string,
Street: string
},
DisplayPosition: {
Latitude: number,
Longitude: number
},
LocationId: string,
LocationType: string,
MapView: {
BottomRight: {
Latitude: number,
Longitude: number
},
TopLeft: {
Latitude: number,
Longitude: number
}
},
NavigationPosition: Array<{
Latitude: number,
Longitude: number
}>
},
MatchLevel: string,
MatchQuality: {
City: number,
HouseNumber: number,
Street: number[]
},
MatchType: string,
Relevance: number
}>
}>,
isolines: any[]
};
}
/**
@@ -4634,7 +4768,7 @@ declare namespace H {
* @param onError {function()}
* @returns {H.service.JsonpRequestHandle}
*/
requestIncidents(serviceParams: H.service.ServiceParameters, onResponse: (result: H.service.ServiceResult) => void, onError: () => void): H.service.JsonpRequestHandle;
requestIncidents(serviceParams: H.service.ServiceParameters, onResponse: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle;
/**
* This method requests traffic incident information by tile coordinates
@@ -4646,8 +4780,8 @@ declare namespace H {
* @param opt_serviceParams {H.service.ServiceParameters=} - optional service parameters to be added to the request
* @returns {H.service.JsonpRequestHandle}
*/
requestIncidentsByTile(x: number, y: number, z: number, onResponse: (result: H.service.ServiceResult) => void, onError: () => void, opt_serviceParams?: H.service.ServiceParameters):
H.service.JsonpRequestHandle;
requestIncidentsByTile(x: number, y: number, z: number, onResponse: (result: H.service.ServiceResult) => void, onError: (error: Error) => void,
opt_serviceParams?: H.service.ServiceParameters): H.service.JsonpRequestHandle;
}
namespace TrafficIncidentsService {
@@ -0,0 +1,32 @@
import {IFrameComponent, IFrameOptions, iframeResizer} from "iframe-resizer";
function testOne(): void {
let iframe: HTMLIFrameElement = document.createElement('iframe');
let options: IFrameOptions = {log: true};
let components: IFrameComponent[] = iframeResizer(options, iframe);
if (components) {
components.forEach(component => console.log(component.iFrameResizer));
} else {
console.log("No components");
}
}
function testTwo(): void {
let iframe: HTMLIFrameElement = document.createElement('iframe');
let components: IFrameComponent[] = iframeResizer({
initCallback: () => {
console.log('Init');
},
closedCallback: () => {
console.log('Closed');
}
}, iframe);
if (components) {
components.forEach(component => console.log(component.iFrameResizer));
} else {
console.log("No components");
}
}
testOne();
testTwo();
+196
View File
@@ -0,0 +1,196 @@
// Type definitions for iframe-resizer 3.5
// Project: https://github.com/davidjbradshaw/iframe-resizer
// Definitions by: Armin Baljic <https://github.com/arminbaljic>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// tslint:disable:prefer-method-signature
// tslint:disable-next-line:no-single-declare-module
declare module 'iframe-resizer' {
// tslint:disable-next-line:interface-name
interface IFrameObject {
close(): void;
moveToAnchor(anchor: string): void;
resize(): void;
sendMessage(message: any): void;
}
// tslint:disable-next-line:interface-name
interface IFrameComponent extends HTMLIFrameElement {
iFrameResizer: IFrameObject;
}
// tslint:disable-next-line:interface-name
interface IFrameOptions {
/**
* When enabled changes to the Window size or the DOM will cause the iFrame to resize to the new content size.
* Disable if using size method with custom dimensions.
*/
autoResize?: boolean;
/**
* Override the body background style in the iFrame.
*/
bodyBackground?: string;
/**
* Override the default body margin style in the iFrame. A string can be any valid value for the
* CSS margin attribute, for example '8px 3em'. A number value is converted into px.
*/
bodyMargin?: number;
/**
* When set to true, only allow incoming messages from the domain listed in the src property of the iFrame tag.
* If your iFrame navigates between different domains, ports or protocols; then you will need to
* provide an array of URLs or disable this option.
*/
checkOrigin?: boolean;
/**
* When enabled in page linking inside the iFrame and from the iFrame to the parent page will be enabled.
*/
inPageLinks?: boolean;
/**
* Height calculation method.
*/
heightCalculationMethod?: string;
/**
* Set iFrame Id
*/
id?: string;
/**
* In browsers that don't support mutationObserver, such as IE10, the library falls back to using
* setInterval, to check for changes to the page size.
*/
interval?: number;
/**
* Setting the log option to true will make the scripts in both the host page and the iFrame output
* everything they do to the JavaScript console so you can see the communication between the two scripts.
*/
log?: boolean;
/**
* Set maximum height of iFrame.
*/
maxHeight?: number;
/**
* Set maximum width of iFrame.
*/
maxWidth?: number;
/**
* Set minimum height of iFrame.
*/
minHeight?: number;
/**
* Set minimum width of iFrame.
*/
minWidth?: number;
/**
* Listen for resize events from the parent page, or the iFrame. Select the 'child' value if the iFrame
* can be resized independently of the browser window. Selecting this value can cause issues with some
* height calculation methods on mobile devices.
*/
resizeFrom?: string;
/**
* Enable scroll bars in iFrame.
*/
scrolling?: boolean;
/**
* Resize iFrame to content height.
*/
sizeHeight?: boolean;
/**
* Resize iFrame to content width.
*/
sizeWidth?: boolean;
/**
* Set the number of pixels the iFrame content size has to change by, before triggering a resize of the iFrame.
*/
tolerance?: number;
/**
* Width calculation method.
*/
widthCalculationMethod?: string;
/**
* Called when iFrame is closed via parentIFrame.close() or iframe.iframeResizer.close() methods.
*/
closedCallback?: (iframeId?: string) => void;
/**
* Initial setup callback function.
*/
initCallback?: (iframe?: IFrameComponent) => void;
/**
* Receive message posted from iFrame with the parentIFrame.sendMessage() method.
*/
messageCallback?: (data: IFrameMessageData) => void;
/**
* Function called after iFrame resized. Passes in messageData object containing the iFrame, height, width
* and the type of event that triggered the iFrame to resize.
*/
resizedCallback?: (data: IFrameResizedData) => void;
/**
* Called before the page is repositioned after a request from the iFrame, due to either an in page link,
* or a direct request from either parentIFrame.scrollTo() or parentIFrame.scrollToOffset().
* If this callback function returns false, it will stop the library from repositioning the page, so that
* you can implement your own animated page scrolling instead.
*/
scrollCallback?: (data: IFrameScrollData) => boolean;
}
// tslint:disable-next-line:interface-name
interface IFramePageOptions {
/**
* This option allows you to restrict the domain of the parent page,
* to prevent other sites mimicking your parent page.
*/
targetOrigin?: string;
/**
* Receive message posted from the parent page with the iframe.iFrameResizer.sendMessage() method.
*/
messageCallback?: (message: any) => void;
/**
* This function is called once iFrame-Resizer has been initialized after receiving a call from the parent page.
*/
readyCallback?: () => void;
/**
* These option can be used to override the option set in the parent page
*/
heightCalculationMethod?: string;
/**
* These option can be used to override the option set in the parent page
*/
widthCalculationMethod?: string;
}
// tslint:disable-next-line:interface-name
interface IFramePage {
autoResize(resize?: boolean): boolean;
close(): void;
getId(): string;
getPageInfo(callback: (data: any) => void | false): void;
scrollTo(x: number, y: number): void;
scrollToOffset(x: number, y: number): void;
sendMessage(message: any, targetOrigin: string): void;
setHeightCalculationMethod(method: string): void;
setWidthCalculationMethod(method: string): void;
setTargetOrigin(targetOrigin: string): void;
size(customHeight: string, customWidth: string): void;
}
// tslint:disable-next-line:interface-name
interface IFrameResizedData {
iframe: IFrameComponent;
height: number;
width: number;
type: string;
}
// tslint:disable-next-line:interface-name
interface IFrameMessageData {
iframe: IFrameComponent;
message: string;
}
// tslint:disable-next-line:interface-name
interface IFrameScrollData {
x: number;
y: number;
}
function iframeResizer(options: IFrameOptions, target: HTMLElement): IFrameComponent[];
}
// tslint:enable:prefer-method-signature
+26
View File
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"exclude": [
"node_modules"
],
"files": [
"index.d.ts",
"iframe-resizer-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}
-2
View File
@@ -1,5 +1,3 @@
import $ = require('jquery');
const areaOptions: ImageMapster.AreaRenderingOptions = {
key: "foo",
includeKeys: "foo",
+910 -906
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/mde/jake
// Definitions by: Kon <http://phyzkit.net/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
+3
View File
@@ -2,6 +2,9 @@
// Project: http://carlosbonetti.github.io/jquery-loading/
// Definitions by: delphinus <https://github.com/delphinus35/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery" />
declare namespace JQueryEasyLoading {
@@ -35,7 +35,6 @@ function test_commands() {
.loading("toggle");
}
import * as jQuery from "jquery";
import * as factory from "jquery-easy-loading";
function test_factory() {
-5
View File
@@ -12,11 +12,6 @@
"typeRoots": [
"../"
],
"paths": {
"jquery": [
"jquery/v2"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
+3
View File
@@ -2,6 +2,9 @@
// Project: https://github.com/jakerella/jquery-mockjax
// Definitions by: Laszlo Jakab <https://github.com/laszlojakab/>, Vladimir Đokić <https://github.com/vladeck/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery" />
interface MockJaxSettingsHeaders {
[key: string]: string;
@@ -1,7 +1,5 @@
/// <reference types="qunit" />
import $ = require('jquery');
class Tests {
private _noErrorCallbackExpected: (jqXHR: JQueryXHR, textStatus: string, errorThrown: string) => any;
private _defaultMockjaxSettings: MockJaxSettings;
-5
View File
@@ -12,11 +12,6 @@
"typeRoots": [
"../"
],
"paths": {
"jquery": [
"jquery/v2"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
+150 -146
View File
@@ -3,156 +3,160 @@
// Definitions by: Adam R. Smith <https://github.com/sunetos>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace JQueryBbq {
import $ = require('jquery');
declare global {
namespace JQueryBbq {
interface JQuery {
/**
* Adds a 'state' into the browser history at the current position, setting
* location.hash and triggering any bound <hashchange event> callbacks
* (provided the new state is different than the previous state).
*
* @name params A serialized params string or a hash string beginning with # to merge into location.hash.
* @name merge_mode Merge behavior defaults to 0 if merge_mode is not specified (unless a hash string beginning with # is specified, in which case merge behavior defaults to 2)
*/
pushState(params?: string, merge_mode?: number): void;
pushState(params?: any, merge_mode?: number): void;
/**
* Retrieves the current 'state' from the browser history, parsing
* location.hash for a specific key or returning an object containing the
* entire state, optionally coercing numbers, booleans, null and undefined
* values.
*
* @name key An optional state key for which to return a value.
* @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false
*/
getState(key?: string, coerce?: boolean): any;
getState(coerce?: boolean): any;
/**
* Remove one or more keys from the current browser history 'state', creating
* a new state, setting location.hash and triggering any bound
* <hashchange event> callbacks (provided the new state is different than
* the previous state).
*
* @name key One or more key values to remove from the current state.
*/
removeState(...key: any[]): void;
}
interface ParamFragment {
(url?: string): string;
(url: string, params: any, merge_mode?: number): string;
/**
* Specify characters that will be left unescaped when fragments are created
* or merged using <jQuery.param.fragment>, or when the fragment is modified
* using <jQuery.bbq.pushState>. This option only applies to serialized data
* object fragments, and not set-as-string fragments. Does not affect the
* query string. Defaults to ",/" (comma, forward slash).
*
* @name chars The characters to not escape in the fragment. If unspecified, defaults to empty string (escape all characters).
*/
noEscape: (chars?: string) => void;
/**
* TODO: DESCRIBE
*
* @name state TODO: DESCRIBE
*/
ajaxCrawlable(state?: boolean): boolean;
}
interface JQueryDeparam {
/**
* Deserialize a params string into an object, optionally coercing numbers,
* booleans, null and undefined values; this method is the counterpart to the
* internal jQuery.param method.
*
* @name params A params string to be parsed.
* @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted.
*/
(params: string, coerce?: boolean): any;
/**
* Parse the query string from a URL or the current window.location.href,
* deserializing it into an object, optionally coercing numbers, booleans,
* null and undefined values.
*
* @name url An optional params string or URL containing query string params to be parsed. If url is omitted, the current window.location.href is used.
* @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted.
*/
querystring(url?: string, coerce?: boolean): any;
/**
* Parse the fragment (hash) from a URL or the current window.location.href,
* deserializing it into an object, optionally coercing numbers, booleans,
* null and undefined values.
*
* @name url An optional params string or URL containing fragment (hash) params to be parsed. If url is omitted, the current window.location.href is used.
* @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted.
*/
fragment(url?: string, coerce?: boolean): any;
}
interface EventObject extends JQueryEventObject {
fragment: string;
getState(key?: string, coerce?: boolean);
}
}
interface JQueryParam {
/**
* Parse the query string from a URL or the current window.location.href,
* deserializing it into an object, optionally coercing numbers, booleans,
* null and undefined values.
*
* @name url An optional params string or URL containing query string params to be parsed. If url is omitted, the current window.location.href is used.
* @name coerce (Boolean) If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted.
* @name merge_mode An object representing the deserialized params string.
*/
querystring(url?: string, coerce?: boolean, merge_mode?: number): string;
querystring(url?: string, coerce?: any, merge_mode?: number): string;
fragment: JQueryBbq.ParamFragment;
/**
* Returns a params string equivalent to that returned by the internal
* jQuery.param method, but sorted, which makes it suitable for use as a
* cache key.
*
* @name obj An object to be serialized.
* @name traditional Params deep/shallow serialization mode. See the documentation at http://api.jquery.com/jQuery.param/ for more detail.
*/
sorted(obj: any, traditional?: boolean): string;
}
interface JQueryStatic {
bbq: JQueryBbq.JQuery;
deparam: JQueryBbq.JQueryDeparam;
/**
* Get the internal "Default URL attribute per tag" list, or augment the list
* with additional tag-attribute pairs, in case the defaults are insufficient.
*
* @name tag_attr An object containing a list of tag names and their associated default attribute names in the format { tag: 'attr', ... } to be merged into the internal tag-attribute list.
*/
elemUrlAttr(tag_attr?: any): any;
}
interface JQuery {
/**
* Adds a 'state' into the browser history at the current position, setting
* location.hash and triggering any bound <hashchange event> callbacks
* (provided the new state is different than the previous state).
*
* @name params A serialized params string or a hash string beginning with # to merge into location.hash.
* @name merge_mode Merge behavior defaults to 0 if merge_mode is not specified (unless a hash string beginning with # is specified, in which case merge behavior defaults to 2)
*/
pushState(params?: string, merge_mode?: number): void;
querystring(attr?: any, params?: any, merge_mode?: number): JQuery;
pushState(params?: any, merge_mode?: number): void;
fragment(attr?: any, params?: any, merge_mode?: number): JQuery;
/**
* Retrieves the current 'state' from the browser history, parsing
* location.hash for a specific key or returning an object containing the
* entire state, optionally coercing numbers, booleans, null and undefined
* values.
*
* @name key An optional state key for which to return a value.
* @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false
*/
getState(key?: string, coerce?: boolean): any;
hashchange(eventData?: any, handler?: (eventObject: JQueryBbq.EventObject) => any): JQuery;
getState(coerce?: boolean): any;
/**
* Remove one or more keys from the current browser history 'state', creating
* a new state, setting location.hash and triggering any bound
* <hashchange event> callbacks (provided the new state is different than
* the previous state).
*
* @name key One or more key values to remove from the current state.
*/
removeState(...key: any[]): void;
}
interface ParamFragment {
(url?: string): string;
(url: string, params: any, merge_mode?: number): string;
/**
* Specify characters that will be left unescaped when fragments are created
* or merged using <jQuery.param.fragment>, or when the fragment is modified
* using <jQuery.bbq.pushState>. This option only applies to serialized data
* object fragments, and not set-as-string fragments. Does not affect the
* query string. Defaults to ",/" (comma, forward slash).
*
* @name chars The characters to not escape in the fragment. If unspecified, defaults to empty string (escape all characters).
*/
noEscape: (chars?: string) => void;
/**
* TODO: DESCRIBE
*
* @name state TODO: DESCRIBE
*/
ajaxCrawlable(state?: boolean): boolean;
}
interface JQueryDeparam {
/**
* Deserialize a params string into an object, optionally coercing numbers,
* booleans, null and undefined values; this method is the counterpart to the
* internal jQuery.param method.
*
* @name params A params string to be parsed.
* @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted.
*/
(params: string, coerce?: boolean): any;
/**
* Parse the query string from a URL or the current window.location.href,
* deserializing it into an object, optionally coercing numbers, booleans,
* null and undefined values.
*
* @name url An optional params string or URL containing query string params to be parsed. If url is omitted, the current window.location.href is used.
* @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted.
*/
querystring(url?: string, coerce?: boolean): any;
/**
* Parse the fragment (hash) from a URL or the current window.location.href,
* deserializing it into an object, optionally coercing numbers, booleans,
* null and undefined values.
*
* @name url An optional params string or URL containing fragment (hash) params to be parsed. If url is omitted, the current window.location.href is used.
* @name coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted.
*/
fragment(url?: string, coerce?: boolean): any;
}
interface EventObject extends JQueryEventObject {
fragment: string;
getState(key?: string, coerce?: boolean);
hashchange(handler: (eventObject: JQueryBbq.EventObject) => any): JQuery;
}
}
interface JQueryParam {
/**
* Parse the query string from a URL or the current window.location.href,
* deserializing it into an object, optionally coercing numbers, booleans,
* null and undefined values.
*
* @name url An optional params string or URL containing query string params to be parsed. If url is omitted, the current window.location.href is used.
* @name coerce (Boolean) If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false if omitted.
* @name merge_mode An object representing the deserialized params string.
*/
querystring(url?: string, coerce?: boolean, merge_mode?: number): string;
querystring(url?: string, coerce?: any, merge_mode?: number): string;
fragment: JQueryBbq.ParamFragment;
/**
* Returns a params string equivalent to that returned by the internal
* jQuery.param method, but sorted, which makes it suitable for use as a
* cache key.
*
* @name obj An object to be serialized.
* @name traditional Params deep/shallow serialization mode. See the documentation at http://api.jquery.com/jQuery.param/ for more detail.
*/
sorted(obj: any, traditional?: boolean): string;
}
interface JQueryStatic {
bbq: JQueryBbq.JQuery;
deparam: JQueryBbq.JQueryDeparam;
/**
* Get the internal "Default URL attribute per tag" list, or augment the list
* with additional tag-attribute pairs, in case the defaults are insufficient.
*
* @name tag_attr An object containing a list of tag names and their associated default attribute names in the format { tag: 'attr', ... } to be merged into the internal tag-attribute list.
*/
elemUrlAttr(tag_attr?: any): any;
}
interface JQuery {
querystring(attr?: any, params?: any, merge_mode?: number): JQuery;
fragment(attr?: any, params?: any, merge_mode?: number): JQuery;
hashchange(eventData?: any, handler?: (eventObject: JQueryBbq.EventObject) => any): JQuery;
hashchange(handler: (eventObject: JQueryBbq.EventObject) => any): JQuery;
}
+4
View File
@@ -2,6 +2,9 @@
// Project: https://github.com/remybach/jQuery.clientSideLogging
// Definitions by: Diullei Gomes <https://github.com/diullei>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery" />
interface ClientSideLoggingClientInfoObject {
location?: boolean; // The url to the page on which the error occurred.
@@ -23,6 +26,7 @@ interface ClientSideLoggingObject {
interface JQueryStatic {
info: (what?: any) => any;
error(what?: any): any;
log: (what?: any) => any;
clientSideLogging: (options: ClientSideLoggingObject) => any;
}
@@ -1,5 +1,3 @@
import $ = require('jquery');
$.clientSideLogging({
log_level: 3,
client_info: {
@@ -12,11 +12,6 @@
"typeRoots": [
"../"
],
"paths": {
"jquery": [
"jquery/v2"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
+3
View File
@@ -1,6 +1,7 @@
// Type definitions for jquery.fancytree 2.7.0
// Project: https://github.com/mar10/fancytree
// Definitions by: Peter Palotas <https://github.com/alphaleonis>
// Mahdi Abedi <https://github.com/abedi-ir>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -721,6 +722,8 @@ declare namespace Fancytree {
restore?(event: JQueryEventObject, data: EventData): void;
/** `data.node` was selected */
select?(event: JQueryEventObject, data: EventData): void;
/** Enable RTL version, default is false */
rtl?: boolean;
}
interface FancytreeOptions extends FancytreeEvents {
+261 -258
View File
@@ -3,269 +3,272 @@
// Definitions by: Vincent Bortone <https://github.com/vbortone/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* HTML segments for tip layout
*/
interface JoyrideTemplate {
/**
* Link template
* @member {string}
*/
link?: string;
import $ = require('jquery');
declare global {
/**
* Timer template
* @member {string}
*/
timer?: string;
* HTML segments for tip layout
*/
interface JoyrideTemplate {
/**
* Link template
* @member {string}
*/
link?: string;
/**
* Tip template
* @member {string}
*/
tip?: string;
/**
* Timer template
* @member {string}
*/
timer?: string;
/**
* Wrapper template
* @member {string}
*/
wrapper?: string;
/**
* Tip template
* @member {string}
*/
tip?: string;
/**
* Button template
* @member {string}
*/
button?: string;
/**
* Wrapper template
* @member {string}
*/
wrapper?: string;
/**
* Modal template
* @member {string}
*/
modal?: string;
/**
* Button template
* @member {string}
*/
button?: string;
/**
* Exposed Cover template
* @member {string}
*/
exposeCover?: string;
}
interface JoyrideOptions {
/**
* Version
* @member {string}
*/
version?: string;
/**
* 'top' or 'bottom' in relation to parent
* @member {string}
*/
tipLocation?: string;
/**
* override on a per tooltip bases
* @member {any}
*/
nubPosition?: any;
/**
* whether to scroll to tips
* @member {boolean}
*/
scroll?: boolean;
/**
* Page scrolling speed in ms
* @member {number}
*/
scrollSpeed?: number;
/**
* 0 = off, all other numbers = time(ms)
* @member {number}
*/
timer?: number;
/**
* true or false - false tour starts when restart called
* @member {boolean}
*/
autoStart?: boolean;
/**
* true/false to start timer on first click
* @member {boolean}
*/
startTimerOnClick?: boolean;
/**
* the index of the tooltip you want to start on (index of the li)
* @member {number}
*/
startOffset?: number;
/**
* true/false for next button visibility
* @member {boolean}
*/
nextButton?: boolean;
/**
* 'pop' or 'fade' in each tip
* @member {string}
*/
tipAnimation?: string;
/**
* array of indexes where to pause the tour after
* @member {any[]}
*/
pauseAfter?: any[];
/**
* if 'fade'- speed in ms of transition
* @member {number}
*/
tipAnimationFadeSpeed?: number;
/**
* true/false for whether cookies are used
* @member {boolean}
*/
cookieMonster?: boolean;
/**
* choose your own cookie name
* member {string}
*/
cookieName?: string;
/**
* Will this cookie be attached to a domain, ie. '.notableapp.com'
* @member {any}
*/
cookieDomain?: any;
/**
* Set to '/' if you want the cookie for the whole website
* @member {any}
*/
cookiePath?: any;
/**
* true or false to control whether localstorage is used
* @member {boolean}
*/
localStorage?: boolean;
/**
* Keyname in localstorage
@member {string}
*/
localStorageKey?: string;
/**
* Where the tip be attached if not inline
* @member {HTMLElement}
*/
tipContainer?: HTMLElement;
/**
* Whether to cover page with modal during the tour
* @member {boolean}
*/
modal?: boolean;
/**
* Whether to expose the elements at each step in the tour (requires modal:true)
* @member {boolean}
*/
expose?: boolean;
/**
* A method to call after an element has been exposed
* @method
* @param {number} index Tip Index
* @param {JQuery} nextTip Tip object
* @param {JQuery} el Element
*/
postExposeCallback?: (index: number, nextTip: JQuery, el?: JQuery) => void;
/**
* A method to call before the tour starts (passed index, tip, and cloned exposed element)
* @method
* @param {number} index Current Tip Index
* @param {JQuery} currentTip Current Tip object
* @param {JQuery} el Element
*/
preRideCallback?: (index: number, currentTip: JQuery, el?: JQuery) => void;
/**
* a method to call once the tour closes
* @method
* @param {number} index Current Tip Index
* @param {JQuery} currentTip Current Tip object
* @param {boolean} isAborted Is Aborted?
*/
postRideCallback?: (index: number, currentTip: JQuery, isAborted?: boolean) => void;
/**
* A method to call after each step
* @method
* @param {number} index Current Tip Index
* @param {JQuery} currentTip Current Tip object
* @param {boolean} isAborted Is Aborted?
*/
postStepCallback?: (index: number, currentTip: JQuery, isAborted?: boolean) => void;
/**
* A method to call before each step
* @method
* @param {number} index Tip Index
* @param {JQuery} nextTip Tip object
* @param {JQuery} el Element
*/
preStepCallback?: (index: number, nextTip: JQuery, el?: JQuery) => void;
/**
* HTML segments for tip layout
* @member {JoyrideTemplate}
*/
template?: JoyrideTemplate;
}
interface Joyride
{
/**
* Default function, no options
* @method
* @return {JQuery} JQuery instance
*/
(): JQuery;
/**
* Function with options
* @method
* @param {JoyrideOptions} options An object with all the joyride options you want to overwrite.
* @return {JQuery} JQuery instance
*/
(options: JoyrideOptions): JQuery;
/**
* Function with method name and params
* @method
* @param {string} methodName Name of method to call.
* @param {any[]} params parameters for method
* @return {JQuery} JQuery instance
*/
(methodName: string, ...params: any[]): JQuery;
}
interface JQuery {
/**
* joyride function
* @return {Joyride} Joyride instance.
*/
joyride: Joyride;
/**
* Modal template
* @member {string}
*/
modal?: string;
/**
* Exposed Cover template
* @member {string}
*/
exposeCover?: string;
}
interface JoyrideOptions {
/**
* Version
* @member {string}
*/
version?: string;
/**
* 'top' or 'bottom' in relation to parent
* @member {string}
*/
tipLocation?: string;
/**
* override on a per tooltip bases
* @member {any}
*/
nubPosition?: any;
/**
* whether to scroll to tips
* @member {boolean}
*/
scroll?: boolean;
/**
* Page scrolling speed in ms
* @member {number}
*/
scrollSpeed?: number;
/**
* 0 = off, all other numbers = time(ms)
* @member {number}
*/
timer?: number;
/**
* true or false - false tour starts when restart called
* @member {boolean}
*/
autoStart?: boolean;
/**
* true/false to start timer on first click
* @member {boolean}
*/
startTimerOnClick?: boolean;
/**
* the index of the tooltip you want to start on (index of the li)
* @member {number}
*/
startOffset?: number;
/**
* true/false for next button visibility
* @member {boolean}
*/
nextButton?: boolean;
/**
* 'pop' or 'fade' in each tip
* @member {string}
*/
tipAnimation?: string;
/**
* array of indexes where to pause the tour after
* @member {any[]}
*/
pauseAfter?: any[];
/**
* if 'fade'- speed in ms of transition
* @member {number}
*/
tipAnimationFadeSpeed?: number;
/**
* true/false for whether cookies are used
* @member {boolean}
*/
cookieMonster?: boolean;
/**
* choose your own cookie name
* member {string}
*/
cookieName?: string;
/**
* Will this cookie be attached to a domain, ie. '.notableapp.com'
* @member {any}
*/
cookieDomain?: any;
/**
* Set to '/' if you want the cookie for the whole website
* @member {any}
*/
cookiePath?: any;
/**
* true or false to control whether localstorage is used
* @member {boolean}
*/
localStorage?: boolean;
/**
* Keyname in localstorage
@member {string}
*/
localStorageKey?: string;
/**
* Where the tip be attached if not inline
* @member {HTMLElement}
*/
tipContainer?: HTMLElement;
/**
* Whether to cover page with modal during the tour
* @member {boolean}
*/
modal?: boolean;
/**
* Whether to expose the elements at each step in the tour (requires modal:true)
* @member {boolean}
*/
expose?: boolean;
/**
* A method to call after an element has been exposed
* @method
* @param {number} index Tip Index
* @param {JQuery} nextTip Tip object
* @param {JQuery} el Element
*/
postExposeCallback?: (index: number, nextTip: JQuery, el?: JQuery) => void;
/**
* A method to call before the tour starts (passed index, tip, and cloned exposed element)
* @method
* @param {number} index Current Tip Index
* @param {JQuery} currentTip Current Tip object
* @param {JQuery} el Element
*/
preRideCallback?: (index: number, currentTip: JQuery, el?: JQuery) => void;
/**
* a method to call once the tour closes
* @method
* @param {number} index Current Tip Index
* @param {JQuery} currentTip Current Tip object
* @param {boolean} isAborted Is Aborted?
*/
postRideCallback?: (index: number, currentTip: JQuery, isAborted?: boolean) => void;
/**
* A method to call after each step
* @method
* @param {number} index Current Tip Index
* @param {JQuery} currentTip Current Tip object
* @param {boolean} isAborted Is Aborted?
*/
postStepCallback?: (index: number, currentTip: JQuery, isAborted?: boolean) => void;
/**
* A method to call before each step
* @method
* @param {number} index Tip Index
* @param {JQuery} nextTip Tip object
* @param {JQuery} el Element
*/
preStepCallback?: (index: number, nextTip: JQuery, el?: JQuery) => void;
/**
* HTML segments for tip layout
* @member {JoyrideTemplate}
*/
template?: JoyrideTemplate;
}
interface Joyride {
/**
* Default function, no options
* @method
* @return {JQuery} JQuery instance
*/
(): JQuery;
/**
* Function with options
* @method
* @param {JoyrideOptions} options An object with all the joyride options you want to overwrite.
* @return {JQuery} JQuery instance
*/
(options: JoyrideOptions): JQuery;
/**
* Function with method name and params
* @method
* @param {string} methodName Name of method to call.
* @param {any[]} params parameters for method
* @return {JQuery} JQuery instance
*/
(methodName: string, ...params: any[]): JQuery;
}
interface JQuery {
/**
* joyride function
* @return {Joyride} Joyride instance.
*/
joyride: Joyride;
}
}
+1 -1
View File
@@ -2329,7 +2329,7 @@ interface JQuery<TElement extends Node = HTMLElement> {
* @see {@link https://api.jquery.com/val/}
* @since 1.0
*/
val(): string | number | string[] | undefined;
val(): string | number | string[] | null | undefined;
/**
* Set the CSS width of each element in the set of matched elements.
*
+1 -1
View File
@@ -3025,7 +3025,7 @@ function JQuery() {
return 'myVal';
});
// $ExpectType string | number | string[] | undefined
// $ExpectType string | number | string[] | null | undefined
$('p').val();
}
}
+3 -1
View File
@@ -702,7 +702,9 @@ interface JQueryCoordinates {
/**
* The interface used to specify the properties parameter in css()
*/
type cssPropertySetter = (index: number, value?: string) => string | number;
interface cssPropertySetter {
(index: number, value?: string): string | number;
}
interface JQueryCssProperties {
[propertyName: string]: string | number | cssPropertySetter;
}
+3 -1
View File
@@ -702,7 +702,9 @@ interface JQueryCoordinates {
/**
* The interface used to specify the properties parameter in css()
*/
type cssPropertySetter = (index: number, value?: string) => string | number;
interface cssPropertySetter {
(index: number, value?: string): string | number;
}
interface JQueryCssProperties {
[propertyName: string]: string | number | cssPropertySetter;
}
+97 -75
View File
@@ -3,79 +3,101 @@
// Definitions by: Daisuke Mino <https://github.com/minodisk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Loop {
begin?: number;
end?: number;
step?: number;
import $ = require('jquery');
declare global {
interface Loop {
begin?: number;
end?: number;
step?: number;
}
interface ConnectOption {
target: any;
args?: any[];
ok?: number;
ng?: number;
}
interface RetryOption {
wait: number;
}
interface DeferredizedFunction { (...arg: any[]): Deferred; }
interface DeferredizedFunctionWithNumber { (n: number): Deferred; }
interface FunctionWithNumber { (i: number, o?: any): any; }
interface ErrorCallback { (d: Deferred, ...args: any[]): any; }
class Deferred {
static methods: string[];
static isDeferred(obj: any): boolean;
static next(fun: Function): Deferred;
static chain(...args: any[]): Deferred;
static wait(n: number): Deferred;
static call(fun?: Function, ...args: any[]): Deferred;
static parallel(dl: any): Deferred;
static earlier(dl: any): Deferred;
static loop(n: number, fun: FunctionWithNumber): Deferred;
static loop(n: Loop, fun: FunctionWithNumber): Deferred;
static repeat(n: number, fun: FunctionWithNumber): Deferred;
static register(name: string, fun: DeferredizedFunction): void;
static connect(funo: any, options: string): DeferredizedFunction;
static connect(funo: Function, options?: ConnectOption): DeferredizedFunction;
static retry(retryCount: number, funcDeferred: DeferredizedFunctionWithNumber, options?: RetryOption): Deferred;
static define(obj?: any, list?: string[]): any;
constructor();
next(fun: Function): Deferred;
wait(n: number): Deferred;
error(fun: ErrorCallback): Deferred;
call(val?: any): Deferred;
fail(err: any): Deferred;
cancel(): Deferred;
parallel(dl: any): Deferred;
loop(n: number, fun: FunctionWithNumber): Deferred;
loop(n: Loop, fun: FunctionWithNumber): Deferred;
}
interface JQueryXHR {
next(fun: Function): Deferred;
}
function chain(...args: any[]): Deferred;
function wait(n: number): Deferred;
function call(fun?: Function, ...args: any[]): Deferred;
function parallel(dl: any): Deferred;
function earlier(dl: any): Deferred;
function loop(n: number, fun: FunctionWithNumber): Deferred;
function loop(n: Loop, fun: FunctionWithNumber): Deferred;
function repeat(n: number, fun: FunctionWithNumber): Deferred;
function next(fun: Function): Deferred;
}
interface ConnectOption {
target: any;
args?: any[];
ok?: number;
ng?: number;
}
interface RetryOption {
wait: number;
}
interface DeferredizedFunction { (...arg: any[]): Deferred; }
interface DeferredizedFunctionWithNumber { (n: number): Deferred; }
interface FunctionWithNumber { (i: number, o?: any): any; }
interface ErrorCallback { (d: Deferred, ...args: any[]): any; }
declare class Deferred {
static methods: string[];
static isDeferred(obj: any): boolean;
static next(fun: Function): Deferred;
static chain(...args: any[]): Deferred;
static wait(n: number): Deferred;
static call(fun?: Function, ...args: any[]): Deferred;
static parallel(dl: any): Deferred;
static earlier(dl: any): Deferred;
static loop(n: number, fun: FunctionWithNumber): Deferred;
static loop(n: Loop, fun: FunctionWithNumber): Deferred;
static repeat(n: number, fun: FunctionWithNumber): Deferred;
static register(name: string, fun: DeferredizedFunction): void;
static connect(funo: any, options: string): DeferredizedFunction;
static connect(funo: Function, options?: ConnectOption): DeferredizedFunction;
static retry(retryCount: number, funcDeferred: DeferredizedFunctionWithNumber, options?: RetryOption): Deferred;
static define(obj?: any, list?: string[]): any;
constructor();
next(fun: Function): Deferred;
wait(n: number): Deferred;
error(fun: ErrorCallback): Deferred;
call(val?: any): Deferred;
fail(err: any): Deferred;
cancel(): Deferred;
parallel(dl: any): Deferred;
loop(n: number, fun: FunctionWithNumber): Deferred;
loop(n: Loop, fun: FunctionWithNumber): Deferred;
}
interface JQueryXHR {
next(fun: Function): Deferred;
}
declare function chain(...args: any[]): Deferred;
declare function wait(n: number): Deferred;
declare function call(fun?: Function, ...args: any[]): Deferred;
declare function parallel(dl: any): Deferred;
declare function earlier(dl: any): Deferred;
declare function loop(n: number, fun: FunctionWithNumber): Deferred;
declare function loop(n: Loop, fun: FunctionWithNumber): Deferred;
declare function repeat(n: number, fun: FunctionWithNumber): Deferred;
declare function next(fun: Function): Deferred;
+1 -1
View File
@@ -16,8 +16,8 @@ declare namespace kendo {
names: string[];
namesAbbr: string[];
namesShort: string[];
firstDay: number;
};
firstDay: number;
months: {
names: string[];
namesAbbr: string[];
+2 -3
View File
@@ -177,9 +177,8 @@ declare namespace Knex {
interface Join {
(raw: Raw): QueryBuilder;
(builder: QueryBuilder, clause: (this: JoinClause) => void): QueryBuilder;
(tableName: string, columns: { [key: string]: string | number | Raw }): QueryBuilder;
(tableName: string, callback: Function): QueryBuilder;
(tableName: TableName, clause: (this: JoinClause) => void): QueryBuilder;
(tableName: TableName, columns: { [key: string]: string | number | Raw }): QueryBuilder;
(tableName: TableName, raw: Raw): QueryBuilder;
(tableName: TableName, column1: string, column2: string): QueryBuilder;
(tableName: TableName, column1: string, raw: Raw): QueryBuilder;
+8
View File
@@ -213,6 +213,14 @@ knex('users')
.join(knex('contacts').select('user_id', 'phone').as('contacts'), 'users.id', 'contacts.user_id')
.select('users.id', 'contacts.phone');
knex('users')
.join(knex('contacts').select('user_id', 'phone').as('contacts'), { 'users.id': 'contacts.user_id' })
.select('users.id', 'contacts.phone');
knex.select('*').from('users').join(knex('accounts').select('id', 'owner_id').as('accounts'), function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').join('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/brianc/node-libpq#readme
// Definitions by: Vlad Rindevich <https://github.com/Lodin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
// TypeScript Version: 2.2
/// <reference types="node" />
+2
View File
@@ -0,0 +1,2 @@
import { divide } from "../index";
export = divide;
+79 -1
View File
@@ -187,7 +187,7 @@ Misc:
- [ ] _.extendWith as an alias of _.assignInWith
- [ ] Added clear method to _.memoize.Cache
- [ ] Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray
- [ ] Enabled _.flow & _.flowRight to accept an array of functions
- [x] Enabled _.flow & _.flowRight to accept an array of functions
- [ ] Ensured “Collection” methods treat functions as objects
- [ ] Ensured _.assign, _.defaults, & _.merge coerce object values to objects
- [ ] Ensured _.bindKey bound functions call object[key] when called with the new operator
@@ -10799,6 +10799,7 @@ declare namespace _ {
flow<A1, A2, A3, A4, R1, R2, R3, R4, R5, R6, R7>(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4) => R7;
// generic function
flow<TResult extends Function>(...funcs: Function[]): TResult;
flow<TResult extends Function>(funcs: Function[]): TResult;
}
interface LoDashImplicitObjectWrapper<T> {
@@ -10806,6 +10807,10 @@ declare namespace _ {
* @see _.flow
*/
flow<TResult extends Function>(...funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.flow
*/
flow<TResult extends Function>(funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
}
interface LoDashExplicitObjectWrapper<T> {
@@ -10813,6 +10818,10 @@ declare namespace _ {
* @see _.flow
*/
flow<TResult extends Function>(...funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.flow
*/
flow<TResult extends Function>(funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
}
//_.flowRight
@@ -10825,6 +10834,10 @@ declare namespace _ {
* @return Returns the new function.
*/
flowRight<TResult extends Function>(...funcs: Function[]): TResult;
/**
* @see _.flowRight
*/
flowRight<TResult extends Function>(funcs: Function[]): TResult;
}
interface LoDashImplicitObjectWrapper<T> {
@@ -10832,6 +10845,10 @@ declare namespace _ {
* @see _.flowRight
*/
flowRight<TResult extends Function>(...funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.flowRight
*/
flowRight<TResult extends Function>(funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
}
interface LoDashExplicitObjectWrapper<T> {
@@ -10839,6 +10856,10 @@ declare namespace _ {
* @see _.flowRight
*/
flowRight<TResult extends Function>(...funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.flowRight
*/
flowRight<TResult extends Function>(funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
}
//_.memoize
@@ -13519,6 +13540,35 @@ declare namespace _ {
ceil(precision?: number): LoDashExplicitWrapper<number>;
}
//_.divide
interface LoDashStatic {
/**
* Divide two numbers.
*
* @param dividend The first number in a division.
* @param divisor The second number in a division.
* @returns Returns the quotient.
*/
divide(
dividend: number,
divisor: number
): number;
}
interface LoDashImplicitWrapper<T> {
/**
* @see _.divide
*/
divide(divisor: number): number;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.divide
*/
divide(divisor: number): LoDashExplicitWrapper<number>;
}
//_.floor
interface LoDashStatic {
/**
@@ -13864,6 +13914,34 @@ declare namespace _ {
): T | undefined;
}
//_.multiply
interface LoDashStatic {
/**
* Multiply two numbers.
* @param multiplier The first number in a multiplication.
* @param multiplicand The second number in a multiplication.
* @returns Returns the product.
*/
multiply(
multiplier: number,
multiplicand: number
): number;
}
interface LoDashImplicitWrapper<T> {
/**
* @see _.multiply
*/
multiply(multiplicand: number): number;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.multiply
*/
multiply(multiplicand: number): LoDashExplicitWrapper<number>;
}
//_.round
interface LoDashStatic {
/**
+41
View File
@@ -6090,6 +6090,7 @@ namespace TestFlow {
result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1, Fn1);
result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1, Fn1, Fn1);
result = _.flow(Fn2, Fn1, Fn3, Fn4);
result = _.flow<(m: number, n: number) => number>([Fn2, Fn1, Fn3, Fn4]);
}
{
@@ -6098,6 +6099,7 @@ namespace TestFlow {
result = _.flow<(m: number, n: number) => number>(Fn1, Fn2);
result = _.flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
result = _.flow<(m: number, n: number) => number>(Fn1, Fn1, Fn1, Fn2);
result = _.flow<(m: number, n: number) => number>([Fn1, Fn1, Fn1, Fn2]);
}
{
@@ -6106,6 +6108,7 @@ namespace TestFlow {
result = _(Fn1).flow<(m: number, n: number) => number>(Fn2);
result = _(Fn1).flow<(m: number, n: number) => number>(Fn1, Fn2);
result = _(Fn1).flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
result = _(Fn1).flow<(m: number, n: number) => number>([Fn1, Fn1, Fn2]);
}
{
@@ -6114,6 +6117,7 @@ namespace TestFlow {
result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn2);
result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn1, Fn2);
result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
result = _(Fn1).chain().flow<(m: number, n: number) => number>([Fn1, Fn1, Fn2]);
}
}
@@ -6128,6 +6132,7 @@ namespace TestFlowRight {
result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn2);
result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn1, Fn2);
result = _.flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn1, Fn2]);
}
{
@@ -6136,6 +6141,7 @@ namespace TestFlowRight {
result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn2);
result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn1, Fn2);
result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
result = _(Fn1).flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn2]);
}
{
@@ -6144,6 +6150,7 @@ namespace TestFlowRight {
result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn2);
result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn1, Fn2);
result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
result = _(Fn1).chain().flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn2]);
}
}
@@ -8058,6 +8065,23 @@ namespace TestCeil {
}
}
// _.divide
namespace TestDivide {
{
let result: number;
result = _.divide(6, 4);
result = _(6).divide(4);
}
{
let result: _.LoDashExplicitWrapper<number>;
result = _(6).chain().floor(4);
}
}
// _.floor
namespace TestFloor {
{
@@ -8204,6 +8228,23 @@ namespace TestMinBy {
result = _(dictionary).minBy<{a: number}, number>({a: 42});
}
// _.multiply
namespace TestMultiply {
{
let result: number;
result = _.multiply(6, 4);
result = _(6).multiply(4);
}
{
let result: _.LoDashExplicitWrapper<number>;
result = _(6).chain().multiply(4);
}
}
// _.round
namespace TestRound {
{
+1
View File
@@ -19,6 +19,7 @@
"capitalize/index.d.ts",
"castArray/index.d.ts",
"ceil/index.d.ts",
"divide/index.d.ts",
"chain/index.d.ts",
"chunk/index.d.ts",
"clamp/index.d.ts",
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/ck86/main-bower-files
// Definitions by: Keita Kagurazaka <https://github.com/k-kagurazaka>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
+5 -2
View File
@@ -1,4 +1,4 @@
// Type definitions for Mapbox GL JS v0.38.0
// Type definitions for Mapbox GL JS v0.39.0
// Project: https://github.com/mapbox/mapbox-gl-js
// Definitions by: Dominik Bruderer <https://github.com/dobrud>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -173,7 +173,7 @@ declare namespace mapboxgl {
keyboard: KeyboardHandler;
doublClickZoom: DoubleClickZoomHandler;
doubleClickZoom: DoubleClickZoomHandler;
touchZoomRotate: TouchZoomRotateHandler;
}
@@ -254,6 +254,9 @@ declare namespace mapboxgl {
/** Initial zoom level */
zoom?: number;
/** Maximum tile cache size for each layer. */
maxTileCacheSize?: number;
}
export interface PaddingOptions {
+59
View File
@@ -0,0 +1,59 @@
// Type definitions for @mapbox/shelf-pack 3.0
// Project: https://github.com/mapbox/shelf-pack
// Definitions by: Gyusun Yeom <https://github.com/Perlmint>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// tslint:disable-next-line no-single-declare-module
declare module "@mapbox/shelf-pack" {
export = ShelfPack;
class ShelfPack {
constructor(width?: number, height?: number, options?: ShelfPack.CreateOption);
pack(bins: Array<ShelfPack.RequestShort | ShelfPack.RequestLong>, options?: ShelfPack.PackOption): ShelfPack.Bin[];
packOne(w: number, h: number, id?: ShelfPack.ID): ShelfPack.Bin;
getBin(id: ShelfPack.ID): ShelfPack.Bin;
ref(bin: ShelfPack.Bin): number;
unref(bin: ShelfPack.Bin): number;
clear(): void;
resize(w: number, h: number): boolean;
w: number;
h: number;
}
namespace ShelfPack {
class Bin {
constructor(id: ID, x: number, y: number, w: number, h: number, maxw?: number, maxh?: number);
id: ID;
x: number;
y: number;
w: number;
h: number;
}
type ID = number | string;
interface Request {
id?: ID;
}
interface RequestShort extends Request {
w: number;
h: number;
}
interface RequestLong extends Request {
width: number;
height: number;
}
interface PackOption {
/// If true , the supplied bin objects will be updated inplace with x and y properties
inPlace?: boolean;
}
interface CreateOption {
/// If true , the sprite will automatically grow
autoResize?: boolean;
}
}
}
@@ -0,0 +1,30 @@
import * as ShelfPack from '@mapbox/shelf-pack';
let sprite = new ShelfPack(64, 64);
for (let i = 0; i < 5; i++) {
const bin = sprite.packOne(32, 32);
}
sprite.clear();
sprite.resize(128, 128);
sprite = new ShelfPack(64, 64);
[100, 101, 102].forEach(id => {
const bin = sprite.packOne(16, 16, id);
});
const bin102 = sprite.packOne(16, 16, 102);
const bin101 = sprite.getBin(101);
sprite.ref(bin101);
const bin100 = sprite.getBin(100);
sprite.unref(bin100);
const bin103 = sprite.packOne(16, 15, 103);
sprite.unref(bin103);
const bin104 = sprite.packOne(16, 16, 104);
+22
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",
"mapbox__shelf-pack-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }
+3 -3
View File
@@ -50,9 +50,9 @@ declare namespace massive {
count(criteria: object): Promise<string>;
where(query: string, params: any[] | object): Promise<T[]>;
search(criteria: SearchCriteria, queryOptions?: QueryOptions): Promise<any>;
save(data: object): Promise<T[]>;
insert(data: object): Promise<T[]>;
update(dataOrCriteria: object, changesMap?: object): Promise<T[]>;
save(data: object | object[]): Promise<T> | Promise<T[]>;
insert(data: object | object[]): Promise<T> | Promise<T[]>;
update(dataOrCriteria: object | object[], changesMap?: object): Promise<T> | Promise<T[]>;
destroy(criteria: object): Promise<T[]>;
}
+2
View File
@@ -942,6 +942,8 @@ declare namespace __MaterialUI {
utils?: propTypes.utils;
}
export class DatePicker extends React.Component<DatePickerProps> {
focus(): void;
openDialog(): void;
}
interface DatePickerDialogProps {
+13
View File
@@ -0,0 +1,13 @@
// Type definitions for mongoose-simple-random 0.4
// Project: https://github.com/larryprice/mongoose-simple-random
// Definitions by: My Self <https://github.com/me>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="mongoose" />
// tslint:disable-next-line no-single-declare-module
declare module "mongoose" {
interface Model<T extends Document> extends NodeJS.EventEmitter, ModelProperties {
findRandom(conditions: Object, projection?: Object | null, options?: Object | null, callback?: (err: any, res: T[]) => void)
: void;
}
}

Some files were not shown because too many files have changed in this diff Show More