mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge branch 'master' into master
This commit is contained in:
Vendored
+5
-1
@@ -52,6 +52,10 @@ declare namespace AceAjax {
|
||||
export interface TokenInfo {
|
||||
|
||||
value: string;
|
||||
|
||||
index?: number;
|
||||
|
||||
start?: number;
|
||||
}
|
||||
|
||||
export interface Position {
|
||||
@@ -575,7 +579,7 @@ declare namespace AceAjax {
|
||||
* @param row The row number to retrieve from
|
||||
* @param column The column number to retrieve from
|
||||
**/
|
||||
getTokenAt(row: number, column: number): TokenInfo;
|
||||
getTokenAt(row: number, column: number): TokenInfo|null;
|
||||
|
||||
/**
|
||||
* Sets the undo manager.
|
||||
|
||||
Vendored
+3
@@ -5,6 +5,7 @@
|
||||
// Marshall Cottrell <https://github.com/marshall007>
|
||||
// Weeco <https://github.com/weeco>
|
||||
// Gabriel Terwesten <https://github.com/blaugold>
|
||||
// Oleg Repin <https://github.com/iamolegga>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -51,6 +52,8 @@ declare namespace Bull {
|
||||
settings?: AdvancedSettings;
|
||||
|
||||
limiter?: RateLimiter;
|
||||
|
||||
defaultJobOptions?: JobOptions;
|
||||
}
|
||||
|
||||
interface AdvancedSettings {
|
||||
|
||||
Vendored
+1
-1
@@ -13,7 +13,7 @@ declare namespace dragula {
|
||||
interface DragulaOptions {
|
||||
containers?: Element[];
|
||||
isContainer?: (el?: Element) => boolean;
|
||||
moves?: (el?: Element, container?: Element, handle?: Element) => boolean;
|
||||
moves?: (el?: Element, container?: Element, handle?: Element, sibling?: Element) => boolean;
|
||||
accepts?: (el?: Element, target?: Element, source?: Element, sibling?: Element) => boolean;
|
||||
invalid?: (el?: Element, target?: Element) => boolean;
|
||||
direction?: string;
|
||||
|
||||
Vendored
+1
-1
@@ -500,7 +500,7 @@ interface PromiseConstructor {
|
||||
/**
|
||||
* Creates a new Promise.
|
||||
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
|
||||
* a resolve callback used resolve the promise with a value or the result of another promise,
|
||||
* a resolve callback used to resolve the promise with a value or the result of another promise,
|
||||
* and a reject callback used to reject the promise with a provided reason or error.
|
||||
*/
|
||||
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
|
||||
|
||||
Vendored
+1
-1
@@ -152,7 +152,7 @@ interface JQueryStatic<TElement extends Node = HTMLElement> {
|
||||
* @since 1.4
|
||||
*/
|
||||
(selector_object_callback?: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray<Element> | JQuery |
|
||||
JQuery.PlainObject |
|
||||
JQuery.PlainObject | Window |
|
||||
((this: Document, $: JQueryStatic<TElement>) => void)): JQuery<TElement>;
|
||||
/**
|
||||
* A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
|
||||
|
||||
Vendored
+9
-5
@@ -1,10 +1,13 @@
|
||||
// Type definitions for kurento-utils 6.6
|
||||
// Type definitions for kurento-utils 6.7
|
||||
// Project: https://github.com/Kurento/kurento-utils-js
|
||||
// Definitions by: Miloslav Nenadál <https://github.com/nenadalm>
|
||||
// Benjamin Riggs <https://github.com/riggs>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
export class WebRtcPeer {
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
export class WebRtcPeer extends EventEmitter {
|
||||
/**
|
||||
* Using this property the user can get the peerConnection and use it directly.
|
||||
*/
|
||||
@@ -60,7 +63,7 @@ export class WebRtcPeer {
|
||||
*/
|
||||
addIceCandidate: (
|
||||
iceCandidate: RTCIceCandidate,
|
||||
callback?: () => void
|
||||
callback?: (error: string | undefined) => void
|
||||
) => void;
|
||||
/**
|
||||
* Using this method the user can get peerconnection’s local session descriptor.
|
||||
@@ -73,8 +76,9 @@ export class WebRtcPeer {
|
||||
/**
|
||||
* Creates an offer that is a request to find a remote peer with a specific configuration.
|
||||
*/
|
||||
generateOffer: (error: string | undefined, sdp: string) => void;
|
||||
|
||||
generateOffer: (
|
||||
callback: (error: string | undefined, sdp: string) => void
|
||||
) => void;
|
||||
/**
|
||||
* Create a WebRtcPeer as receive only.
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,10 @@ import * as kurentoUtils from 'kurento-utils';
|
||||
const peer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv({}, error => {});
|
||||
peer.showLocalVideo();
|
||||
peer.getLocalStream().getAudioTracks();
|
||||
peer.generateOffer((error, sdp) => {});
|
||||
peer.on('icecandidate', (candidate: any) => {
|
||||
peer.addIceCandidate(candidate, error => {});
|
||||
});
|
||||
peer.getRemoteStream().getAudioTracks();
|
||||
peer.processAnswer('answer', error => {});
|
||||
peer.processOffer('offer', (error, {}) => {});
|
||||
|
||||
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
// Type definitions for react-avatar-editor 10.3
|
||||
// Project: https://github.com/mosch/react-avatar-editor
|
||||
// Definitions by: Diogo Corrêa <https://github.com/diogocorrea>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
export interface ImageState {
|
||||
height: number;
|
||||
width: number;
|
||||
x: number;
|
||||
y: number;
|
||||
resource: ImageData;
|
||||
}
|
||||
|
||||
export interface CroppedRect {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export interface AvatarEditorProps {
|
||||
image: string | File;
|
||||
width?: number;
|
||||
height?: number;
|
||||
border?: number | number[];
|
||||
borderRadius?: number;
|
||||
color?: number[];
|
||||
style?: object;
|
||||
scale?: number;
|
||||
position?: object;
|
||||
rotate?: number;
|
||||
crossOrigin?: string;
|
||||
disableDrop?: boolean;
|
||||
onDropFile?(event: DragEvent): void;
|
||||
onLoadFailure?(event: Event): void;
|
||||
onLoadSuccess?(imgInfo: ImageState): void;
|
||||
onImageReady?(event: Event): void;
|
||||
onMouseUp?(): void;
|
||||
onMouseMove?(event: Event): void;
|
||||
onImageChange?(): void;
|
||||
onPositionChange?(): void;
|
||||
}
|
||||
|
||||
export default class AvatarEditor extends React.Component<AvatarEditorProps, any> {
|
||||
static getImage(): HTMLCanvasElement;
|
||||
static getImageScaledToCanvas(): HTMLCanvasElement;
|
||||
static getCroppingRect(): CroppedRect;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
import * as React from "react";
|
||||
import AvatarEditor, { ImageState, CroppedRect } from "react-avatar-editor";
|
||||
|
||||
const file: File = new File(["str"], "image.jpg");
|
||||
const image: ImageData = new ImageData(1, 2);
|
||||
const imageState: ImageState = {
|
||||
height: 1,
|
||||
width: 1,
|
||||
x: 1,
|
||||
y: 1,
|
||||
resource: image
|
||||
};
|
||||
|
||||
class AvatarEditorTest extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<AvatarEditor image="" />
|
||||
<AvatarEditor image={file} />
|
||||
<AvatarEditor image="" width={1} />
|
||||
<AvatarEditor image="" height={1} />
|
||||
<AvatarEditor image="" border={1} />
|
||||
<AvatarEditor image="" border={[1, 2]} />
|
||||
<AvatarEditor image="" borderRadius={1} />
|
||||
<AvatarEditor image="" color={[1]} />
|
||||
<AvatarEditor image="" style={{}} />
|
||||
<AvatarEditor image="" scale={1} />
|
||||
<AvatarEditor image="" position={{}} />
|
||||
<AvatarEditor image="" rotate={1} />
|
||||
<AvatarEditor image="" crossOrigin="" />
|
||||
<AvatarEditor image="" disableDrop={true} />
|
||||
<AvatarEditor image="" onDropFile={event => {}} />
|
||||
<AvatarEditor image="" onLoadFailure={event => {}} />
|
||||
<AvatarEditor image="" onLoadSuccess={imageState => {}} />
|
||||
<AvatarEditor image="" onImageReady={event => {}} />
|
||||
<AvatarEditor image="" onMouseUp={() => {}} />
|
||||
<AvatarEditor image="" onMouseMove={event => {}} />
|
||||
<AvatarEditor image="" onImageChange={() => {}} />
|
||||
<AvatarEditor image="" onPositionChange={() => {}} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const getImage: HTMLCanvasElement = AvatarEditor.getImage();
|
||||
const getImageScaledToCanvas: HTMLCanvasElement = AvatarEditor.getImageScaledToCanvas();
|
||||
const getCroppingRect: CroppedRect = AvatarEditor.getCroppingRect();
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-avatar-editor-tests.tsx"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"jsx": "react",
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+12
-2
@@ -1,6 +1,6 @@
|
||||
// Type definitions for RethinkDB 2.3
|
||||
// Project: http://rethinkdb.com/
|
||||
// Definitions by: Alex Gorbatchev <https://github.com/alexgorbatchev>
|
||||
// Definitions by: Alex Gorbatchev <https://github.com/alexgorbatchev>, Adrian Farmadin <https://github.com/AdrianFarmadin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -40,6 +40,9 @@ declare module "rethinkdb" {
|
||||
export function asc(property: string): Sort;
|
||||
export function desc(property: string): Sort;
|
||||
|
||||
export function point(lng: number, lat: number): Point;
|
||||
export function polygon(...point: Point[]): Polygon;
|
||||
|
||||
export var count: Aggregator;
|
||||
export function sum(prop: string): Aggregator;
|
||||
export function avg(prop: string): Aggregator;
|
||||
@@ -233,7 +236,13 @@ declare module "rethinkdb" {
|
||||
* See: https://rethinkdb.com/api/javascript/has_fields/
|
||||
*/
|
||||
hasFields(...fields: string[]): T;
|
||||
}
|
||||
}
|
||||
|
||||
interface Geometry { }
|
||||
|
||||
interface Point { }
|
||||
|
||||
interface Polygon extends Geometry { }
|
||||
|
||||
interface Table extends Sequence, HasFields<Sequence> {
|
||||
indexCreate(name: string, index?: ExpressionFunction<any>): Operation<CreateResult>;
|
||||
@@ -247,6 +256,7 @@ declare module "rethinkdb" {
|
||||
get<TObjectType extends object>(key: string): Operation<TObjectType | null> & Writeable;
|
||||
getAll(key: string, index?: Index): Sequence; // without index defaults to primary key
|
||||
getAll(...keys: string[]): Sequence;
|
||||
getIntersecting(geometry: Geometry, index: Index): Sequence;
|
||||
wait(WaitOptions?: WaitOptions): WaitResult;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-1
@@ -48,7 +48,7 @@ interface Rsync {
|
||||
stdout: StreamDataHandler,
|
||||
stderr: StreamDataHandler
|
||||
): child_process.ChildProcess;
|
||||
|
||||
|
||||
// cwd
|
||||
cwd(cwd: string): string;
|
||||
|
||||
@@ -63,6 +63,7 @@ interface Rsync {
|
||||
quiet(): Rsync;
|
||||
dirs(): Rsync;
|
||||
links(): Rsync;
|
||||
chmod(flags: string): Rsync;
|
||||
dry(): Rsync;
|
||||
|
||||
// accessor methods
|
||||
|
||||
@@ -114,6 +114,7 @@ rsync.shell('ssh')
|
||||
.quiet()
|
||||
.dirs()
|
||||
.links()
|
||||
.chmod("ug=rwX")
|
||||
.dry();
|
||||
|
||||
|
||||
@@ -152,4 +153,4 @@ rsync.include('/a/file')
|
||||
.include('/b/file');
|
||||
|
||||
// as Array
|
||||
rsync.include(['/a/file', '/b/file']);
|
||||
rsync.include(['/a/file', '/b/file']);
|
||||
|
||||
Vendored
+6
-4
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Sequelize 4.27.0
|
||||
// Type definitions for Sequelize 4.27.8
|
||||
// Project: http://sequelizejs.com
|
||||
// Definitions by: samuelneff <https://github.com/samuelneff>
|
||||
// Peter Harris <https://github.com/codeanimal>
|
||||
@@ -3445,7 +3445,7 @@ declare namespace sequelize {
|
||||
/**
|
||||
* Options for Model.upsert method
|
||||
*/
|
||||
interface UpsertOptions extends FieldsOptions, LoggingOptions, SearchPathOptions {
|
||||
interface UpsertOptions extends FieldsOptions, LoggingOptions, SearchPathOptions, ReturningOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4005,8 +4005,10 @@ declare namespace sequelize {
|
||||
* because SQLite always runs INSERT OR IGNORE + UPDATE, in a single query, so there is no way to know
|
||||
* whether the row was inserted or not.
|
||||
*/
|
||||
upsert(values: TAttributes, options?: UpsertOptions): Promise<boolean>;
|
||||
insertOrUpdate(values: TAttributes, options?: UpsertOptions): Promise<boolean>;
|
||||
upsert(values: TAttributes, options?: UpsertOptions & { returning: false | undefined }): Promise<boolean>;
|
||||
upsert(values: TAttributes, options?: UpsertOptions & { returning: true }): Promise<[boolean, TInstance]>;
|
||||
insertOrUpdate(values: TAttributes, options?: UpsertOptions & { returning: false | undefined }): Promise<boolean>;
|
||||
insertOrUpdate(values: TAttributes, options?: UpsertOptions & { returning: true }): Promise<[boolean, TInstance]>;
|
||||
|
||||
/**
|
||||
* Create and insert multiple instances in bulk.
|
||||
|
||||
@@ -1043,7 +1043,9 @@ findOrRetVal = User.findOrCreate( { where : { id : undefined }, defaults : { nam
|
||||
findOrRetVal = User.findOrCreate( { where : { email : 'unique.email.@d.com', companyId : Math.floor( Math.random() * 5 ) } } );
|
||||
findOrRetVal = User.findOrCreate( { where : { objectId : 1 }, defaults : { bool : false } } );
|
||||
|
||||
User.upsert( { id : 42, username : 'doe', foo : s.fn( 'upper', 'mixedCase2' ) } );
|
||||
let upsertPromiseNoOptions: Bluebird<boolean> = User.upsert( { id : 42, username : 'doe', foo : s.fn( 'upper', 'mixedCase2' ) } );
|
||||
let upsertPromiseReturning: Bluebird<[boolean, AnyInstance]> = User.upsert( { id : 42, username : 'doe', foo : s.fn( 'upper', 'mixedCase2' ) }, { returning: true } );
|
||||
let upsertPromiseNotReturning: Bluebird<boolean> = User.upsert( { id : 42, username : 'doe', foo : s.fn( 'upper', 'mixedCase2' ) }, { returning: false } );
|
||||
|
||||
User.bulkCreate( [{ aNumber : 10 }, { aNumber : 12 }] ).then( ( i ) => i[0].isNewRecord );
|
||||
User.bulkCreate( [{ username : 'bar' }, { username : 'bar' }, { username : 'bar' }] );
|
||||
|
||||
Vendored
+13
-2
@@ -1,6 +1,6 @@
|
||||
// Type definitions for Showdown 1.7.2
|
||||
// Type definitions for Showdown 1.7.3
|
||||
// Project: https://github.com/coreyti/showdown
|
||||
// Definitions by: cbowdon <https://github.com/cbowdon>, Pei-Tang Huang <https://github.com/tan9>
|
||||
// Definitions by: cbowdon <https://github.com/cbowdon>, Pei-Tang Huang <https://github.com/tan9>, Ariel-Saldana <https://github.com/arielsaldana>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = Showdown;
|
||||
@@ -362,10 +362,21 @@ declare namespace Showdown {
|
||||
*/
|
||||
new (converterOptions?: ConverterOptions): Converter;
|
||||
}
|
||||
/**
|
||||
* Helper Interface
|
||||
*/
|
||||
interface Helper {
|
||||
replaceRecursiveRegExp(...args: any[]): string;
|
||||
}
|
||||
|
||||
/** Constructor function for a Converter */
|
||||
var Converter: ConverterStatic;
|
||||
|
||||
/**
|
||||
* Showdown helper
|
||||
*/
|
||||
var helper: Helper;
|
||||
|
||||
/**
|
||||
* Setting a "global" option affects all instances of showdown
|
||||
*/
|
||||
|
||||
@@ -17,6 +17,8 @@ var preloadedExtensions = [ 'my-ext' ],
|
||||
var configuredConverter = new showdown.Converter();
|
||||
configuredConverter.addExtension({type: 'output', filter: (text, converter)=>{return text.replace('#', '*')}}, 'myext');
|
||||
|
||||
console.log(showdown.helper);
|
||||
|
||||
console.log(converter.makeHtml(exampleMarkdown));
|
||||
// should log '<h1 id="hellomarkdown">hello, markdown</h1>'
|
||||
|
||||
|
||||
Vendored
+7
@@ -7,6 +7,7 @@
|
||||
// Brannon Jones <https://github.com/brannon>
|
||||
// Kyle Kamperschroer <https://github.com/kkamperschroer>
|
||||
// Kensuke Hoshikawa <https://github.com/starhoshi>
|
||||
// Thomas Bruun <https://github.com/bruun>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -4783,6 +4784,12 @@ declare namespace Stripe {
|
||||
* This is the transaction number that appears on email receipts sent for this refund.
|
||||
*/
|
||||
receipt_number: string;
|
||||
|
||||
/**
|
||||
* Status of the refund. For credit card refunds, this can be succeeded or failed.
|
||||
* For other types of refunds, it can be pending, succeeded, failed, or canceled.
|
||||
*/
|
||||
status: "pending" | "succeeded" | "failed" | "canceled";
|
||||
}
|
||||
|
||||
interface IRefundCreationOptions extends IDataOptionsWithMetadata {
|
||||
|
||||
@@ -66,7 +66,7 @@ stripe.charges.create({
|
||||
});
|
||||
|
||||
charge.refunds.retrieve("re_15jzA4Ee31JkLCeQcxbTbjaL").then(function (refund) {
|
||||
|
||||
var status: "pending" | "succeeded" | "failed" | "canceled" = refund.status;
|
||||
});
|
||||
|
||||
charge.refunds.update("re_15jzA4Ee31JkLCeQcxbTbjaL", { metadata: { test: "data" } }).then(function (refund) {
|
||||
|
||||
Reference in New Issue
Block a user