mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 14:38:20 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -24,7 +24,12 @@ let array = [ 1, 2, 3 ];
|
||||
chai.spy.on(array, 'push');
|
||||
|
||||
// or you can track multiple object's methods
|
||||
chai.spy.on(array, 'push', 'pop');
|
||||
chai.spy.on(array, ['push', 'pop']);
|
||||
|
||||
// or you can track multiple object's methods
|
||||
chai.spy.on(array, 'push', function(item) {
|
||||
array.push(item);
|
||||
});
|
||||
|
||||
array.push(5);
|
||||
|
||||
@@ -149,4 +154,20 @@ spy.should.not.have.been.called.above(3);
|
||||
expect(spy).to.have.been.called.below(3);
|
||||
expect(spy).to.not.have.been.called.lt(3);
|
||||
spy.should.have.been.called.lt(3);
|
||||
spy.should.not.have.been.called.below(3);
|
||||
spy.should.not.have.been.called.below(3);
|
||||
|
||||
// You can also create sandbox
|
||||
let sb = chai.spy.sandbox();
|
||||
|
||||
sb.on(array, 'pop', () => {
|
||||
return 1;
|
||||
})
|
||||
|
||||
let one = array.pop();
|
||||
expect(one).to.equal(1);
|
||||
|
||||
// Can restore methods in sandbox
|
||||
sb.restore();
|
||||
array.push(2);
|
||||
let two = array.pop();
|
||||
expect(two).to.equal(2);
|
||||
|
||||
162
types/chai-spies/index.d.ts
vendored
162
types/chai-spies/index.d.ts
vendored
@@ -1,6 +1,8 @@
|
||||
// Type definitions for chai-spies
|
||||
// Type definitions for chai-spies 1.0.0
|
||||
// Project: https://github.com/chaijs/chai-spies
|
||||
// Definitions by: Ilya Kuznetsov <https://github.com/kuzn-ilya>
|
||||
// Harm van der Werf <https://github.com/harm-less>
|
||||
// Jouni Suorsa <https://github.com/jounisuo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="chai" />
|
||||
@@ -21,7 +23,7 @@ declare namespace Chai {
|
||||
* ```ts
|
||||
* expect(spy).to.be.spy;
|
||||
* spy.should.be.spy;
|
||||
* ```
|
||||
* ```
|
||||
*/
|
||||
spy: Assertion;
|
||||
|
||||
@@ -32,7 +34,7 @@ declare namespace Chai {
|
||||
* expect(spy).to.have.been.called();
|
||||
* spy.should.have.been.called();
|
||||
* ```
|
||||
* Note that ```called``` can be used as a chainable method.
|
||||
* Note that ```called``` can be used as a chainable method.
|
||||
*/
|
||||
called: ChaiSpies.Called;
|
||||
|
||||
@@ -61,7 +63,32 @@ declare namespace Chai {
|
||||
}
|
||||
|
||||
declare namespace ChaiSpies {
|
||||
interface Sandbox {
|
||||
/**
|
||||
* #### chai.spy.on (function)
|
||||
*
|
||||
* Wraps an object method into spy. All calls will pass through to the original function.
|
||||
*
|
||||
* @param {Object} object
|
||||
* @param {String} methodNames names to spy on
|
||||
* @param {function} fn replacement function
|
||||
* @returns function to actually call
|
||||
*/
|
||||
on(object: Object, methodNames: string | string[], fn?: (parameters: any[]|any) => any): any;
|
||||
|
||||
/**
|
||||
* #### chai.spy.restore (function)
|
||||
*
|
||||
* Restores previously wrapped object's method.
|
||||
* Restores all spied objects of a sandbox if called without parameters.
|
||||
*
|
||||
* @function
|
||||
* @param {Object} [object]
|
||||
* @param {String|String[]} [methods] name or names
|
||||
* @return {Sandbox} Sandbox instance
|
||||
*/
|
||||
restore(object?: Object, methodNames?: string | string[]): void;
|
||||
}
|
||||
interface Spy {
|
||||
/**
|
||||
* #### chai.spy (function)
|
||||
@@ -72,9 +99,9 @@ declare namespace ChaiSpies {
|
||||
* var spy = chai.spy(original)
|
||||
* , e_spy = chai.spy();
|
||||
* ```
|
||||
* @param fn function to spy on. @default ```function () {}```
|
||||
* @param fn function to spy on. @default ```function () {}```
|
||||
* @returns function to actually call
|
||||
*/
|
||||
*/
|
||||
(): SpyFunc0Proxy<void>;
|
||||
<R>(fn: SpyFunc0<R>): SpyFunc0Proxy<R>;
|
||||
<A1, R>(fn: SpyFunc1<A1, R>): SpyFunc1Proxy<A1, R>;
|
||||
@@ -107,10 +134,11 @@ declare namespace ChaiSpies {
|
||||
* var spy = chai.spy.on(Array, 'isArray');
|
||||
* ```
|
||||
* @param {Object} object
|
||||
* @param {String} method name to spy on
|
||||
* @param {String} method names to spy on
|
||||
* @param {function} fn replacement function
|
||||
* @returns function to actually call
|
||||
*/
|
||||
on(object: Object, ...methodNames: string[]): any;
|
||||
*/
|
||||
on(object: Object, methodNames: string | string[], fn?: (parameters: any[]|any) => any): any;
|
||||
|
||||
/**
|
||||
* #### chai.spy.object (function)
|
||||
@@ -123,10 +151,24 @@ declare namespace ChaiSpies {
|
||||
* @param {String[]|Object} method names or method definitions
|
||||
* @returns object with spied methods
|
||||
*/
|
||||
object(name: string, methods: string[]): any;
|
||||
object(methods: string[]): any;
|
||||
object<T>(name: string, methods: T): T;
|
||||
object<T>(methods: T): T;
|
||||
object(name: string, methods: string[]): any;
|
||||
object(methods: string[]): any;
|
||||
object<T>(name: string, methods: T): T;
|
||||
object<T>(methods: T): T;
|
||||
|
||||
/**
|
||||
* #### chai.spy.restore (function)
|
||||
*
|
||||
* Restores spy assigned to DEFAULT sandbox
|
||||
*
|
||||
* Restores previously wrapped object's method.
|
||||
* Restores all spied objects of a sandbox if called without parameters.
|
||||
*
|
||||
* @param {Object} [object]
|
||||
* @param {String|String[]} [methods] name or names
|
||||
* @return {Sandbox} Sandbox instance
|
||||
*/
|
||||
restore(object?: Object, methodNames?: string | string[]): void;
|
||||
|
||||
/**
|
||||
* #### chai.spy.returns (function)
|
||||
@@ -141,6 +183,18 @@ declare namespace ChaiSpies {
|
||||
*/
|
||||
|
||||
returns<T>(value: T): SpyFunc0Proxy<T>;
|
||||
|
||||
/**
|
||||
* ### chai.spy.sandbox
|
||||
*
|
||||
* Creates a sandbox.
|
||||
*
|
||||
* Sandbox is a set of spies.
|
||||
* Sandbox allows to track methods on objects and restore original methods with on restore call.
|
||||
*
|
||||
* @returns {Sandbox}
|
||||
*/
|
||||
sandbox(): Sandbox;
|
||||
}
|
||||
|
||||
interface Called {
|
||||
@@ -158,12 +212,12 @@ declare namespace ChaiSpies {
|
||||
* spy.should.not.have.been.called.once;
|
||||
* ```
|
||||
*/
|
||||
once: Chai.Assertion;
|
||||
once: Chai.Assertion;
|
||||
|
||||
/**
|
||||
* ####.twice
|
||||
* Assert that a spy has been called exactly twice.
|
||||
* ```ts
|
||||
* ```ts
|
||||
* expect(spy).to.have.been.called.twice;
|
||||
* expect(spy).to.not.have.been.called.twice;
|
||||
* spy.should.have.been.called.twice;
|
||||
@@ -215,7 +269,7 @@ declare namespace ChaiSpies {
|
||||
* ```ts
|
||||
* expect(spy).to.have.been.called.above(3);
|
||||
* spy.should.not.have.been.called.above(3);
|
||||
* ```
|
||||
* ```
|
||||
*/
|
||||
above(n: number): Chai.Assertion;
|
||||
|
||||
@@ -225,7 +279,7 @@ declare namespace ChaiSpies {
|
||||
* ```ts
|
||||
* expect(spy).to.have.been.called.gt(3);
|
||||
* spy.should.not.have.been.called.gt(3);
|
||||
* ```
|
||||
* ```
|
||||
*/
|
||||
gt(n: number): Chai.Assertion;
|
||||
|
||||
@@ -235,7 +289,7 @@ declare namespace ChaiSpies {
|
||||
* ```ts
|
||||
* expect(spy).to.have.been.called.below(3);
|
||||
* spy.should.not.have.been.called.below(3);
|
||||
* ```
|
||||
* ```
|
||||
*/
|
||||
below(n: number): Chai.Assertion;
|
||||
|
||||
@@ -245,7 +299,7 @@ declare namespace ChaiSpies {
|
||||
* ```ts
|
||||
* expect(spy).to.have.been.called.lt(3);
|
||||
* spy.should.not.have.been.called.lt(3);
|
||||
* ```
|
||||
* ```
|
||||
*/
|
||||
lt(n: number): Chai.Assertion;
|
||||
}
|
||||
@@ -301,7 +355,7 @@ declare namespace ChaiSpies {
|
||||
* spy.should.have.been.called.with('foo');
|
||||
* ```
|
||||
* Will also pass for ```spy('foo', 'bar')``` and ```spy(); spy('foo')```.
|
||||
* If used with multiple arguments, assert that a spy has been called with all the given arguments at least once.
|
||||
* If used with multiple arguments, assert that a spy has been called with all the given arguments at least once.
|
||||
* ```ts
|
||||
* spy('foo', 'bar', 1);
|
||||
* expect(spy).to.have.been.called.with('bar', 'foo');
|
||||
@@ -389,7 +443,7 @@ declare namespace ChaiSpies {
|
||||
*
|
||||
* Resets __spy object parameters for instantiation and reuse
|
||||
* @returns proxy spy object
|
||||
*/
|
||||
*/
|
||||
reset(): this;
|
||||
}
|
||||
|
||||
@@ -397,77 +451,77 @@ declare namespace ChaiSpies {
|
||||
(): R;
|
||||
}
|
||||
|
||||
interface SpyFunc1<A1, R> {
|
||||
(a: A1): R;
|
||||
interface SpyFunc1<A1, R> {
|
||||
(a: A1): R;
|
||||
}
|
||||
|
||||
interface SpyFunc2<A1, A2, R> {
|
||||
(a: A1, b: A2): R;
|
||||
interface SpyFunc2<A1, A2, R> {
|
||||
(a: A1, b: A2): R;
|
||||
}
|
||||
|
||||
interface SpyFunc3<A1, A2, A3, R> {
|
||||
(a: A1, b: A2, c: A3): R;
|
||||
interface SpyFunc3<A1, A2, A3, R> {
|
||||
(a: A1, b: A2, c: A3): R;
|
||||
}
|
||||
|
||||
interface SpyFunc4<A1, A2, A3, A4, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4): R;
|
||||
interface SpyFunc4<A1, A2, A3, A4, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4): R;
|
||||
}
|
||||
|
||||
interface SpyFunc5<A1, A2, A3, A4, A5, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5): R;
|
||||
interface SpyFunc5<A1, A2, A3, A4, A5, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5): R;
|
||||
}
|
||||
|
||||
interface SpyFunc6<A1, A2, A3, A4, A5, A6, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6): R;
|
||||
interface SpyFunc6<A1, A2, A3, A4, A5, A6, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6): R;
|
||||
}
|
||||
|
||||
interface SpyFunc7<A1, A2, A3, A4, A5, A6, A7, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6, g: A7): R;
|
||||
interface SpyFunc7<A1, A2, A3, A4, A5, A6, A7, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6, g: A7): R;
|
||||
}
|
||||
|
||||
interface SpyFunc8<A1, A2, A3, A4, A5, A6, A7, A8, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6, g: A7, h: A8): R;
|
||||
interface SpyFunc8<A1, A2, A3, A4, A5, A6, A7, A8, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6, g: A7, h: A8): R;
|
||||
}
|
||||
|
||||
interface SpyFunc9<A1, A2, A3, A4, A5, A6, A7, A8, A9, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6, g: A7, h: A8, i: A9): R;
|
||||
|
||||
interface SpyFunc9<A1, A2, A3, A4, A5, A6, A7, A8, A9, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6, g: A7, h: A8, i: A9): R;
|
||||
}
|
||||
|
||||
interface SpyFunc10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6, g: A7, h: A8, i: A9, j: A10): R;
|
||||
|
||||
interface SpyFunc10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R> {
|
||||
(a: A1, b: A2, c: A3, d: A4, e: A5, f: A6, g: A7, h: A8, i: A9, j: A10): R;
|
||||
}
|
||||
|
||||
interface SpyFunc0Proxy<R> extends SpyFunc0<R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc1Proxy<A1, R> extends SpyFunc1<A1, R>, Resetable {
|
||||
interface SpyFunc1Proxy<A1, R> extends SpyFunc1<A1, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc2Proxy<A1, A2, R> extends SpyFunc2<A1, A2, R>, Resetable {
|
||||
interface SpyFunc2Proxy<A1, A2, R> extends SpyFunc2<A1, A2, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc3Proxy<A1, A2, A3, R> extends SpyFunc3<A1, A2, A3, R>, Resetable {
|
||||
interface SpyFunc3Proxy<A1, A2, A3, R> extends SpyFunc3<A1, A2, A3, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc4Proxy<A1, A2, A3, A4, R> extends SpyFunc4<A1, A2, A3, A4, R>, Resetable {
|
||||
interface SpyFunc4Proxy<A1, A2, A3, A4, R> extends SpyFunc4<A1, A2, A3, A4, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc5Proxy<A1, A2, A3, A4, A5, R> extends SpyFunc5<A1, A2, A3, A4, A5, R>, Resetable {
|
||||
interface SpyFunc5Proxy<A1, A2, A3, A4, A5, R> extends SpyFunc5<A1, A2, A3, A4, A5, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc6Proxy<A1, A2, A3, A4, A5, A6, R> extends SpyFunc6<A1, A2, A3, A4, A5, A6, R>, Resetable {
|
||||
interface SpyFunc6Proxy<A1, A2, A3, A4, A5, A6, R> extends SpyFunc6<A1, A2, A3, A4, A5, A6, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc7Proxy<A1, A2, A3, A4, A5, A6, A7, R> extends SpyFunc7<A1, A2, A3, A4, A5, A6, A7, R>, Resetable {
|
||||
interface SpyFunc7Proxy<A1, A2, A3, A4, A5, A6, A7, R> extends SpyFunc7<A1, A2, A3, A4, A5, A6, A7, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc8Proxy<A1, A2, A3, A4, A5, A6, A7, A8, R> extends SpyFunc8<A1, A2, A3, A4, A5, A6, A7, A8, R>, Resetable {
|
||||
interface SpyFunc8Proxy<A1, A2, A3, A4, A5, A6, A7, A8, R> extends SpyFunc8<A1, A2, A3, A4, A5, A6, A7, A8, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc9Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, R> extends SpyFunc9<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>, Resetable {
|
||||
|
||||
interface SpyFunc9Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, R> extends SpyFunc9<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>, Resetable {
|
||||
}
|
||||
|
||||
interface SpyFunc10Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R> extends SpyFunc10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>, Resetable {
|
||||
|
||||
interface SpyFunc10Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R> extends SpyFunc10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>, Resetable {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1182
types/jquery/index.d.ts
vendored
1182
types/jquery/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@@ -7058,7 +7058,7 @@ function JQuery_jqXHR() {
|
||||
}
|
||||
}
|
||||
|
||||
function compatibleWithPromise(): Promise<any> {
|
||||
function compatibleWithPromise(): JQuery._Promise<any> {
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -7480,7 +7480,7 @@ function JQuery_Promise3() {
|
||||
return s;
|
||||
}
|
||||
|
||||
function compatibleWithPromise(): Promise<any> {
|
||||
function compatibleWithPromise(): JQuery._Promise<any> {
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -7624,7 +7624,7 @@ function JQuery_Promise2(p: JQuery.Promise2<string, Error, number, JQuery, strin
|
||||
return s;
|
||||
}
|
||||
|
||||
function compatibleWithPromise(): Promise<any> {
|
||||
function compatibleWithPromise(): JQuery._Promise<any> {
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -7745,7 +7745,7 @@ function JQuery_Promise(p: JQuery.Promise<string, Error, number>) {
|
||||
return s;
|
||||
}
|
||||
|
||||
function compatibleWithPromise(): Promise<any> {
|
||||
function compatibleWithPromise(): JQuery._Promise<any> {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
4
types/jquery/test/bluebird-global-tests.ts
Normal file
4
types/jquery/test/bluebird-global-tests.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/// <reference types="bluebird-global" />
|
||||
|
||||
// Pulls in bluebird-global to test compatibility.
|
||||
// Fixes https://github.com/DefinitelyTyped/DefinitelyTyped/issues/26328.
|
||||
@@ -21,6 +21,7 @@
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jquery-tests.ts",
|
||||
"test/bluebird-global-tests.ts",
|
||||
"test/example-tests.ts",
|
||||
"test/longdesc-tests.ts",
|
||||
"test/learn-tests.ts",
|
||||
@@ -29,4 +30,4 @@
|
||||
"test/jquery-slim-no-window-module-tests.ts",
|
||||
"test/jquery-slim-window-module-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
1
types/nodemailer/index.d.ts
vendored
1
types/nodemailer/index.d.ts
vendored
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/nodemailer/nodemailer
|
||||
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
|
||||
// Piotr Roszatycki <https://github.com/dex4er>
|
||||
// Daniel Chao <https://github.com/bioball>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
import { Transport, TransportOptions } from '../..';
|
||||
|
||||
import { Transport, TransportOptions } from '..';
|
||||
import * as shared from '../shared';
|
||||
|
||||
import * as shared from './shared';
|
||||
|
||||
import Mail = require('./mailer');
|
||||
import MailMessage = require('./mailer/mail-message');
|
||||
import MimeNode = require('./mime-node');
|
||||
import Mail = require('../mailer');
|
||||
import MailMessage = require('../mailer/mail-message');
|
||||
import MimeNode = require('../mime-node');
|
||||
|
||||
declare namespace SendmailTransport {
|
||||
type MailOptions = Mail.Options;
|
||||
7
types/nodemailer/lib/sendmail-transport/le-unix.d.ts
vendored
Normal file
7
types/nodemailer/lib/sendmail-transport/le-unix.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Transform } from 'stream';
|
||||
|
||||
declare class LeUnix extends Transform {}
|
||||
|
||||
export = LeUnix;
|
||||
7
types/nodemailer/lib/sendmail-transport/le-windows.d.ts
vendored
Normal file
7
types/nodemailer/lib/sendmail-transport/le-windows.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Transform } from 'stream';
|
||||
|
||||
declare class LeWindows extends Transform {}
|
||||
|
||||
export = LeWindows;
|
||||
@@ -21,6 +21,8 @@ import SMTPTransport = require('nodemailer/lib/smtp-transport');
|
||||
import StreamTransport = require('nodemailer/lib/stream-transport');
|
||||
import wellKnown = require('nodemailer/lib/well-known');
|
||||
import XOAuth2 = require('nodemailer/lib/xoauth2');
|
||||
import LeWindows = require('nodemailer/lib/sendmail-transport/le-windows');
|
||||
import LeUnix = require('nodemailer/lib/sendmail-transport/le-unix');
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as stream from 'stream';
|
||||
@@ -722,6 +724,24 @@ function sendmail_test() {
|
||||
});
|
||||
}
|
||||
|
||||
// line ending transforms using windows-style newlines
|
||||
|
||||
function sendmail_line_endings_windows_test() {
|
||||
function process_le(mail: MailMessage) {
|
||||
const input = mail.message.createReadStream();
|
||||
input.pipe(new LeWindows());
|
||||
}
|
||||
}
|
||||
|
||||
// line ending transforms using unix-style newlines
|
||||
|
||||
function sendmail_line_endings_unix_test() {
|
||||
function process_le(mail: MailMessage) {
|
||||
const input = mail.message.createReadStream();
|
||||
input.pipe(new LeUnix());
|
||||
}
|
||||
}
|
||||
|
||||
// 5. SES transport
|
||||
|
||||
// Send a message using SES transport
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
"lib/mime-funcs/mime-types.d.ts",
|
||||
"lib/mime-node.d.ts",
|
||||
"lib/qp.d.ts",
|
||||
"lib/sendmail-transport.d.ts",
|
||||
"lib/sendmail-transport/index.d.ts",
|
||||
"lib/sendmail-transport/le-unix.d.ts",
|
||||
"lib/sendmail-transport/le-windows.d.ts",
|
||||
"lib/ses-transport.d.ts",
|
||||
"lib/shared.d.ts",
|
||||
"lib/smtp-connection.d.ts",
|
||||
|
||||
3068
types/office-js/index.d.ts
vendored
3068
types/office-js/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
10
types/react-pointable/index.d.ts
vendored
10
types/react-pointable/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-pointable 1.1
|
||||
// Type definitions for react-pointable 1.2
|
||||
// Project: https://github.com/MilllerTime/react-pointable
|
||||
// Definitions by: Stefan Fochler <https://github.com/istefo>
|
||||
// Dibyo Majumdar <https://github.com/mdibyo>
|
||||
@@ -13,14 +13,6 @@ export interface PointableProps extends React.HTMLAttributes<Element>, React.SVG
|
||||
tagName?: keyof ElementTagNameMap;
|
||||
touchAction?: TouchAction;
|
||||
elementRef?(el: HTMLElement|SVGElement): void;
|
||||
onPointerMove?(evt: PointerEvent): void;
|
||||
onPointerDown?(evt: PointerEvent): void;
|
||||
onPointerUp?(evt: PointerEvent): void;
|
||||
onPointerOver?(evt: PointerEvent): void;
|
||||
onPointerOut?(evt: PointerEvent): void;
|
||||
onPointerEnter?(evt: PointerEvent): void;
|
||||
onPointerLeave?(evt: PointerEvent): void;
|
||||
onPointerCancel?(evt: PointerEvent): void;
|
||||
}
|
||||
|
||||
export default class Pointable extends React.Component<PointableProps> {
|
||||
|
||||
@@ -3,7 +3,7 @@ import Pointable from 'react-pointable';
|
||||
|
||||
class Test extends React.Component<object, object> {
|
||||
elementRef(el: HTMLElement) {}
|
||||
somePointerEvent(evt: PointerEvent) {}
|
||||
somePointerEvent(evt: React.PointerEvent) {}
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
||||
1
types/react/global.d.ts
vendored
1
types/react/global.d.ts
vendored
@@ -13,6 +13,7 @@ interface FocusEvent extends Event { }
|
||||
interface KeyboardEvent extends Event { }
|
||||
interface MouseEvent extends Event { }
|
||||
interface TouchEvent extends Event { }
|
||||
interface PointerEvent extends Event { }
|
||||
interface TransitionEvent extends Event { }
|
||||
interface UIEvent extends Event { }
|
||||
interface WheelEvent extends Event { }
|
||||
|
||||
38
types/react/index.d.ts
vendored
38
types/react/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for React 16.3
|
||||
// Type definitions for React 16.4
|
||||
// Project: http://facebook.github.io/react/
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// AssureSign <http://www.assuresign.com>
|
||||
@@ -31,6 +31,7 @@ type NativeFocusEvent = FocusEvent;
|
||||
type NativeKeyboardEvent = KeyboardEvent;
|
||||
type NativeMouseEvent = MouseEvent;
|
||||
type NativeTouchEvent = TouchEvent;
|
||||
type NativePointerEvent = PointerEvent;
|
||||
type NativeTransitionEvent = TransitionEvent;
|
||||
type NativeUIEvent = UIEvent;
|
||||
type NativeWheelEvent = WheelEvent;
|
||||
@@ -590,6 +591,18 @@ declare namespace React {
|
||||
nativeEvent: NativeDragEvent;
|
||||
}
|
||||
|
||||
interface PointerEvent<T = Element> extends MouseEvent<T> {
|
||||
pointerId: number;
|
||||
pressure: number;
|
||||
tiltX: number;
|
||||
tiltY: number;
|
||||
width: number;
|
||||
height: number;
|
||||
pointerType: 'mouse' | 'pen' | 'touch';
|
||||
isPrimary: boolean;
|
||||
nativeEvent: NativePointerEvent;
|
||||
}
|
||||
|
||||
interface FocusEvent<T = Element> extends SyntheticEvent<T> {
|
||||
nativeEvent: NativeFocusEvent;
|
||||
relatedTarget: EventTarget;
|
||||
@@ -711,6 +724,7 @@ declare namespace React {
|
||||
type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
|
||||
type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
|
||||
type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
|
||||
type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>;
|
||||
type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
|
||||
type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
|
||||
type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
|
||||
@@ -898,6 +912,28 @@ declare namespace React {
|
||||
onTouchStart?: TouchEventHandler<T>;
|
||||
onTouchStartCapture?: TouchEventHandler<T>;
|
||||
|
||||
// Pointer Events
|
||||
onPointerDown?: PointerEventHandler<T>;
|
||||
onPointerDownCapture?: PointerEventHandler<T>;
|
||||
onPointerMove?: PointerEventHandler<T>;
|
||||
onPointerMoveCapture?: PointerEventHandler<T>;
|
||||
onPointerUp?: PointerEventHandler<T>;
|
||||
onPointerUpCapture?: PointerEventHandler<T>;
|
||||
onPointerCancel?: PointerEventHandler<T>;
|
||||
onPointerCancelCapture?: PointerEventHandler<T>;
|
||||
onPointerEnter?: PointerEventHandler<T>;
|
||||
onPointerEnterCapture?: PointerEventHandler<T>;
|
||||
onPointerLeave?: PointerEventHandler<T>;
|
||||
onPointerLeaveCapture?: PointerEventHandler<T>;
|
||||
onPointerOver?: PointerEventHandler<T>;
|
||||
onPointerOverCapture?: PointerEventHandler<T>;
|
||||
onPointerOut?: PointerEventHandler<T>;
|
||||
onPointerOutCapture?: PointerEventHandler<T>;
|
||||
onGotPointerCapture?: PointerEventHandler<T>;
|
||||
onGotPointerCaptureCapture?: PointerEventHandler<T>;
|
||||
onLostPointerCapture?: PointerEventHandler<T>;
|
||||
onLostPointerCaptureCapture?: PointerEventHandler<T>;
|
||||
|
||||
// UI Events
|
||||
onScroll?: UIEventHandler<T>;
|
||||
onScrollCapture?: UIEventHandler<T>;
|
||||
|
||||
5
types/sequelize/index.d.ts
vendored
5
types/sequelize/index.d.ts
vendored
@@ -5262,6 +5262,11 @@ declare namespace sequelize {
|
||||
* Set to true or a string with the attribute name you want to use to enable.
|
||||
*/
|
||||
version?: boolean | string;
|
||||
|
||||
/**
|
||||
* Throws an error when no records found
|
||||
*/
|
||||
rejectOnError?: boolean | Error;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
15
types/webpack/index.d.ts
vendored
15
types/webpack/index.d.ts
vendored
@@ -12,6 +12,7 @@
|
||||
// Jason Cheatham <https://github.com/jason0x43>
|
||||
// Dennis George <https://github.com/dennispg>
|
||||
// Christophe Hurpeau <https://github.com/christophehurpeau>
|
||||
// ZSkycat <https://github.com/ZSkycat>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -349,14 +350,16 @@ declare namespace webpack {
|
||||
type ExternalsFunctionElement = (context: any, request: any, callback: (error: any, result: any) => void) => any;
|
||||
|
||||
interface Node {
|
||||
console?: boolean;
|
||||
console?: boolean | 'mock';
|
||||
process?: boolean | 'mock';
|
||||
global?: boolean;
|
||||
process?: boolean;
|
||||
Buffer?: boolean;
|
||||
__filename?: boolean | string;
|
||||
__dirname?: boolean | string;
|
||||
[nodeBuiltin: string]: boolean | string | undefined;
|
||||
__filename?: boolean | 'mock';
|
||||
__dirname?: boolean | 'mock';
|
||||
Buffer?: boolean | 'mock';
|
||||
setImmediate?: boolean | 'mock' | 'empty';
|
||||
[nodeBuiltin: string]: boolean | 'mock' | 'empty' | undefined;
|
||||
}
|
||||
|
||||
interface NewLoader {
|
||||
loader: string;
|
||||
options?: { [name: string]: any };
|
||||
|
||||
Reference in New Issue
Block a user