mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-27 11:40:08 +08:00
Merge branch 'master' of github.com:borisyankov/DefinitelyTyped
Conflicts: d3/d3.d.ts
This commit is contained in:
+4
-4
@@ -190,15 +190,15 @@ declare module angular.ui.bootstrap {
|
||||
/**
|
||||
* a promise that is resolved when a modal is closed and rejected when a modal is dismissed
|
||||
*/
|
||||
result: ng.IPromise<any>;
|
||||
result: angular.IPromise<any>;
|
||||
|
||||
/**
|
||||
* a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables
|
||||
*/
|
||||
opened: ng.IPromise<any>;
|
||||
opened: angular.IPromise<any>;
|
||||
}
|
||||
|
||||
interface IModalScope extends ng.IScope {
|
||||
interface IModalScope extends angular.IScope {
|
||||
/**
|
||||
* Those methods make it easy to close a modal window without a need to create a dedicated controller
|
||||
*/
|
||||
@@ -623,7 +623,7 @@ declare module angular.ui.bootstrap {
|
||||
*
|
||||
* @return A promise that is resolved when the transition finishes.
|
||||
*/
|
||||
(element: ng.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): ng.IPromise<ng.IAugmentedJQuery>;
|
||||
(element: angular.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): angular.IPromise<angular.IAugmentedJQuery>;
|
||||
}
|
||||
|
||||
interface ITransitionServiceOptions {
|
||||
|
||||
Vendored
+21
-13
@@ -452,9 +452,9 @@ declare module angular {
|
||||
$invalid: boolean;
|
||||
$submitted: boolean;
|
||||
$error: any;
|
||||
$addControl(control: ng.INgModelController): void;
|
||||
$removeControl(control: ng.INgModelController): void;
|
||||
$setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void;
|
||||
$addControl(control: INgModelController): void;
|
||||
$removeControl(control: INgModelController): void;
|
||||
$setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController): void;
|
||||
$setDirty(): void;
|
||||
$setPristine(): void;
|
||||
$commitViewValue(): void;
|
||||
@@ -509,7 +509,7 @@ declare module angular {
|
||||
}
|
||||
|
||||
interface IAsyncModelValidators {
|
||||
[index: string]: (...args: any[]) => ng.IPromise<boolean>;
|
||||
[index: string]: (...args: any[]) => IPromise<boolean>;
|
||||
}
|
||||
|
||||
interface IModelParser {
|
||||
@@ -931,11 +931,19 @@ declare module angular {
|
||||
/**
|
||||
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
|
||||
*
|
||||
* Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
|
||||
* Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
|
||||
*
|
||||
* @param promises An array or hash of promises.
|
||||
* @param promises An array of promises.
|
||||
*/
|
||||
all(promises: IPromise<any>[]|{ [id: string]: IPromise<any>; }): IPromise<any[]>;
|
||||
all(promises: IPromise<any>[]): IPromise<any[]>;
|
||||
/**
|
||||
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
|
||||
*
|
||||
* Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
|
||||
*
|
||||
* @param promises A hash of promises.
|
||||
*/
|
||||
all(promises: { [id: string]: IPromise<any>; }): IPromise<{ [id: string]: any; }>;
|
||||
/**
|
||||
* Creates a Deferred object which represents a task which will finish in the future.
|
||||
*/
|
||||
@@ -1573,12 +1581,12 @@ declare module angular {
|
||||
* $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
|
||||
*/
|
||||
decorator(name: string, inlineAnnotatedFunction: any[]): void;
|
||||
factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider;
|
||||
factory(name: string, inlineAnnotatedFunction: any[]): ng.IServiceProvider;
|
||||
provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider;
|
||||
provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider;
|
||||
service(name: string, constructor: Function): ng.IServiceProvider;
|
||||
value(name: string, value: any): ng.IServiceProvider;
|
||||
factory(name: string, serviceFactoryFunction: Function): IServiceProvider;
|
||||
factory(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
|
||||
provider(name: string, provider: IServiceProvider): IServiceProvider;
|
||||
provider(name: string, serviceProviderConstructor: Function): IServiceProvider;
|
||||
service(name: string, constructor: Function): IServiceProvider;
|
||||
value(name: string, value: any): IServiceProvider;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -7,6 +7,6 @@
|
||||
|
||||
declare module "errorhandler" {
|
||||
import express = require('express');
|
||||
function e(): express.ErrorRequestHandler;
|
||||
function e(options?: {log?: any}): express.ErrorRequestHandler;
|
||||
export = e;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+5
-5
@@ -307,13 +307,13 @@ declare module "knex" {
|
||||
}
|
||||
|
||||
interface SchemaBuilder {
|
||||
createTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): void;
|
||||
renameTable(oldTableName: string, newTableName: string): void;
|
||||
dropTable(tableName: string): void;
|
||||
createTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): Promise<void>;
|
||||
renameTable(oldTableName: string, newTableName: string): Promise<void>;
|
||||
dropTable(tableName: string): Promise<void>;
|
||||
hasTable(tableName: string): Promise<boolean>;
|
||||
hasColumn(tableName: string, columnName: string): Promise<boolean>;
|
||||
table(tableName: string, callback: (tableBuilder: AlterTableBuilder) => any): void;
|
||||
dropTableIfExists(tableName: string): void;
|
||||
table(tableName: string, callback: (tableBuilder: AlterTableBuilder) => any): Promise<void>;
|
||||
dropTableIfExists(tableName: string): Promise<void>;
|
||||
raw(statement: string): SchemaBuilder;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import util = require('util');
|
||||
import Client = require('mariasql');
|
||||
|
||||
var c:Client = new Client(),
|
||||
var c:mariasql.MariaClient = new Client(),
|
||||
inspect = util.inspect;
|
||||
|
||||
c.connect({
|
||||
|
||||
Vendored
+83
-78
@@ -3,95 +3,100 @@
|
||||
// Definitions by: MichaelBennett <https://github.com/bennett000/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module mariasql {
|
||||
export interface MariaCallBackError {
|
||||
(error:Error):void
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
interface MariaCallBackError {
|
||||
(error:Error):void
|
||||
}
|
||||
export interface MariaCallBackResult {
|
||||
(result:MariaResult):void
|
||||
}
|
||||
|
||||
interface MariaCallBackResult {
|
||||
(result:MariaResult):void
|
||||
}
|
||||
export interface MariaCallBackRow {
|
||||
(result:Array<any>):void
|
||||
}
|
||||
|
||||
interface MariaCallBackRow {
|
||||
(result:Array<any>):void
|
||||
}
|
||||
export interface MariaCallBackBoolean {
|
||||
(result:boolean):void
|
||||
}
|
||||
|
||||
interface MariaCallBackBoolean {
|
||||
(result:boolean):void
|
||||
}
|
||||
export interface MariaCallBackObject {
|
||||
(result:Object):void
|
||||
}
|
||||
|
||||
interface MariaCallBackObject {
|
||||
(result:Object):void
|
||||
}
|
||||
export interface MariaCallBackVoid {
|
||||
():void
|
||||
}
|
||||
|
||||
interface MariaCallBackVoid {
|
||||
():void
|
||||
}
|
||||
export interface Dictionary {
|
||||
[index: string]: any;
|
||||
}
|
||||
|
||||
interface Dictionary {
|
||||
[index: string]: any;
|
||||
}
|
||||
export interface MariaPreparedQuery {
|
||||
(values:Dictionary):string;
|
||||
(values:Array<any>):string;
|
||||
}
|
||||
|
||||
interface MariaPreparedQuery {
|
||||
(values:Dictionary):string;
|
||||
(values:Array<any>):string;
|
||||
}
|
||||
export interface ClientConfig {
|
||||
host: string;
|
||||
user: string;
|
||||
password: string;
|
||||
db?: string;
|
||||
port?: number;
|
||||
unixSocket?: string;
|
||||
keepQueries?: boolean;
|
||||
multiStatements?: boolean;
|
||||
connTimeout?: number;
|
||||
pingInterval?: number;
|
||||
secureAuth?: boolean;
|
||||
compress?: boolean;
|
||||
ssl?:any;
|
||||
local_infile?: boolean;
|
||||
read_default_group?: string;
|
||||
charset?: string;
|
||||
}
|
||||
|
||||
interface ClientConfig {
|
||||
host: string;
|
||||
user: string;
|
||||
password: string;
|
||||
db?: string;
|
||||
port?: number;
|
||||
unixSocket?: string;
|
||||
keepQueries?: boolean;
|
||||
multiStatements?: boolean;
|
||||
connTimeout?: number;
|
||||
pingInterval?: number;
|
||||
secureAuth?: boolean;
|
||||
compress?: boolean;
|
||||
ssl?:any;
|
||||
local_infile?: boolean;
|
||||
read_default_group?: string;
|
||||
charset?: string;
|
||||
}
|
||||
export interface MariaResult {
|
||||
on(signal:string, cb:MariaCallBackObject):MariaResult; // signal 'end'
|
||||
on(signal:string, cb:MariaCallBackError):MariaResult; // signal 'error'
|
||||
on(signal:string, cb:MariaCallBackRow):MariaResult; // signal 'row'
|
||||
on(signal:string, cb:MariaCallBackVoid):MariaResult; // signal 'abort'
|
||||
abort():void;
|
||||
}
|
||||
|
||||
declare class MariaResult {
|
||||
on(signal:string, cb:MariaCallBackObject):MariaResult; // signal 'end'
|
||||
on(signal:string, cb:MariaCallBackError):MariaResult; // signal 'error'
|
||||
on(signal:string, cb:MariaCallBackRow):MariaResult; // signal 'row'
|
||||
on(signal:string, cb:MariaCallBackVoid):MariaResult; // signal 'abort'
|
||||
abort():void;
|
||||
}
|
||||
export interface MariaQuery {
|
||||
on(signal:string, cb:MariaCallBackResult):MariaQuery; // signal 'result'
|
||||
on(signal:string, cb:MariaCallBackVoid):MariaQuery; // signal 'end'
|
||||
on(signal:string, cb:MariaCallBackVoid):MariaQuery; // signal 'abort'
|
||||
on(signal:string, cb:MariaCallBackError):MariaQuery; // signal 'error'
|
||||
abort():void;
|
||||
}
|
||||
|
||||
declare class MariaQuery {
|
||||
on(signal:string, cb:MariaCallBackResult):MariaQuery; // signal 'result'
|
||||
on(signal:string, cb:MariaCallBackVoid):MariaQuery; // signal 'end'
|
||||
on(signal:string, cb:MariaCallBackVoid):MariaQuery; // signal 'abort'
|
||||
on(signal:string, cb:MariaCallBackError):MariaQuery; // signal 'error'
|
||||
abort():void;
|
||||
}
|
||||
export interface MariaClient {
|
||||
connect(config:ClientConfig):void;
|
||||
end():void;
|
||||
destroy():void;
|
||||
escape(query:string):string;
|
||||
query(q:string, placeHolders?:Dictionary, useArray?:boolean):MariaQuery;
|
||||
query(q:string, placeHolders?:Array<any>, useArray?:boolean):MariaQuery;
|
||||
query(q:string, useArray?:boolean):MariaQuery;
|
||||
prepare(query:string): MariaPreparedQuery;
|
||||
isMariaDB():boolean;
|
||||
on(signal:string, cb:MariaCallBackError): MariaClient; // signal 'error'
|
||||
on(signal:string, cb:MariaCallBackObject): MariaClient; // signal 'close'
|
||||
on(signal:string, cb:MariaCallBackVoid): MariaClient; // signal 'connect'
|
||||
connected: boolean;
|
||||
threadId: string;
|
||||
}
|
||||
|
||||
declare class MariaClient {
|
||||
connect(config:ClientConfig):void;
|
||||
end():void;
|
||||
destroy():void;
|
||||
escape(query:string):string;
|
||||
query(q:string, placeHolders?:Dictionary, useArray?:boolean):MariaQuery;
|
||||
query(q:string, placeHolders?:Array<any>, useArray?:boolean):MariaQuery;
|
||||
query(q:string, useArray?:boolean):MariaQuery;
|
||||
prepare(query:string): MariaPreparedQuery;
|
||||
isMariaDB():boolean;
|
||||
on(signal:string, cb:MariaCallBackError): MariaClient; // signal 'error'
|
||||
on(signal:string, cb:MariaCallBackObject): MariaClient; // signal 'close'
|
||||
on(signal:string, cb:MariaCallBackVoid): MariaClient; // signal 'connect'
|
||||
connected: boolean;
|
||||
threadId: string;
|
||||
}
|
||||
|
||||
declare module 'mariasql' {
|
||||
export = MariaClient;
|
||||
export interface Client {
|
||||
new ():MariaClient;
|
||||
():MariaClient;
|
||||
prototype: MariaClient;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "mariasql" {
|
||||
var Client:mariasql.Client;
|
||||
export = Client;
|
||||
}
|
||||
Vendored
+30
@@ -1036,6 +1036,36 @@ declare module "path" {
|
||||
export var delimiter: string;
|
||||
export function parse(p: string): ParsedPath;
|
||||
export function format(pP: ParsedPath): string;
|
||||
|
||||
export module posix {
|
||||
export function normalize(p: string): string;
|
||||
export function join(...paths: any[]): string;
|
||||
export function resolve(...pathSegments: any[]): string;
|
||||
export function isAbsolute(p: string): boolean;
|
||||
export function relative(from: string, to: string): string;
|
||||
export function dirname(p: string): string;
|
||||
export function basename(p: string, ext?: string): string;
|
||||
export function extname(p: string): string;
|
||||
export var sep: string;
|
||||
export var delimiter: string;
|
||||
export function parse(p: string): ParsedPath;
|
||||
export function format(pP: ParsedPath): string;
|
||||
}
|
||||
|
||||
export module win32 {
|
||||
export function normalize(p: string): string;
|
||||
export function join(...paths: any[]): string;
|
||||
export function resolve(...pathSegments: any[]): string;
|
||||
export function isAbsolute(p: string): boolean;
|
||||
export function relative(from: string, to: string): string;
|
||||
export function dirname(p: string): string;
|
||||
export function basename(p: string, ext?: string): string;
|
||||
export function extname(p: string): string;
|
||||
export var sep: string;
|
||||
export var delimiter: string;
|
||||
export function parse(p: string): ParsedPath;
|
||||
export function format(pP: ParsedPath): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "string_decoder" {
|
||||
|
||||
Vendored
+1
-1
@@ -170,7 +170,7 @@ interface QUnitAssert {
|
||||
* resolution callback for each async operation. The callback returned from assert.async()
|
||||
* will throw an Error if is invoked more than once.
|
||||
*/
|
||||
async(): any;
|
||||
async(): () => void;
|
||||
|
||||
/**
|
||||
* A deep recursive comparison assertion, working on primitive types, arrays, objects,
|
||||
|
||||
Vendored
+1
-1
@@ -278,7 +278,7 @@ interface UnderscoreStatic {
|
||||
findIndex<T>(
|
||||
list: _.List<T>,
|
||||
iterator: _.ListIterator<T, boolean>,
|
||||
context?: any): T;
|
||||
context?: any): number;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
// Type definitions for Vex v2.3.2
|
||||
// Project: https://github.com/HubSpot/vex
|
||||
// Definitions by: Greg Cohan <https://github.com/gdcohan>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
declare module vex {
|
||||
|
||||
interface ICSSAttributes {
|
||||
[property: string]: string | number;
|
||||
}
|
||||
|
||||
interface IVexOptions {
|
||||
afterClose?: (() => void);
|
||||
afterOpen?: ((vexContent: JQuery) => void);
|
||||
content?: string;
|
||||
showCloseButton?: boolean;
|
||||
escapeButtonCloses?: boolean;
|
||||
overlayClosesOnClick?: boolean;
|
||||
appendLocation?: HTMLElement | JQuery | string;
|
||||
className?: string;
|
||||
css?: ICSSAttributes;
|
||||
overlayClassName?: string;
|
||||
overlayCSS?: ICSSAttributes;
|
||||
contentClassName?: string;
|
||||
contentCSS?: ICSSAttributes;
|
||||
closeClassName?: string;
|
||||
closeCSS?: ICSSAttributes;
|
||||
}
|
||||
|
||||
interface Vex {
|
||||
open(options: IVexOptions): JQuery;
|
||||
close(id?: number): boolean;
|
||||
closeAll(): boolean;
|
||||
closeByID(id: number): boolean;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
declare module "vex" {
|
||||
export = vex;
|
||||
}
|
||||
|
||||
declare var vex: vex.Vex;
|
||||
@@ -0,0 +1,26 @@
|
||||
///<reference path="../jquery/jquery.d.ts" />
|
||||
///<reference path="vex-js.d.ts" />
|
||||
|
||||
var vexContent = vex.open({
|
||||
afterClose: (() => null),
|
||||
afterOpen: ((vexContent: JQuery) => null),
|
||||
content: "<div><p>Modal</p></div>",
|
||||
showCloseButton: false,
|
||||
escapeButtonCloses: true,
|
||||
overlayClosesOnClick: false,
|
||||
appendLocation: "body",
|
||||
className: "vex-dialog",
|
||||
css: {background: "blue"},
|
||||
overlayClassName: "vex-overlay",
|
||||
overlayCSS: {border: 0},
|
||||
contentClassName: "vex-content",
|
||||
contentCSS: {margin: "0 auto"},
|
||||
closeClassName: "vex-close",
|
||||
closeCSS: {margin: 0}
|
||||
});
|
||||
|
||||
var id = vexContent.data().vex.id;
|
||||
|
||||
vex.close(id);
|
||||
vex.closeByID(id);
|
||||
vex.closeAll();
|
||||
@@ -0,0 +1,13 @@
|
||||
/// <reference path="yamljs.d.ts" />
|
||||
|
||||
import yamljs = require('yamljs');
|
||||
|
||||
yamljs.load('yaml-testfile.yml');
|
||||
|
||||
yamljs.parse('this_is_no_ymlstring');
|
||||
|
||||
yamljs.stringify({ a : 'val', b : { ba : 123, bb : 'nothing' }});
|
||||
|
||||
yamljs.stringify({ a : 'val', b : { ba : 123, bb : 'nothing' }}, 1);
|
||||
|
||||
yamljs.stringify({ a : 'val', b : { ba : 123, bb : 'nothing' }}, 1, 2);
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for yamljs 0.2.1
|
||||
// Project: https://github.com/jeremyfa/yaml.js
|
||||
// Definitions by: Tim Jonischkat <http://www.tim-jonischkat.de>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "yamljs" {
|
||||
|
||||
export function load(path : string) : any;
|
||||
|
||||
export function stringify(nativeObject : any, inline? : number, spaces? : number) : string;
|
||||
|
||||
export function parse(yamlString : string) : any;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user