mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Merge branch 'master' of https://github.com/DefinitelyTyped/DefinitelyTyped
This commit is contained in:
@@ -41,3 +41,22 @@ bitcoin.address.toBase58Check(rsBase58Check.hash, rsBase58Check.version);
|
||||
bitcoin.address.toBech32(rsBech32.data, rsBech32.version, rsBech32.prefix);
|
||||
bitcoin.address.toOutputScript(address);
|
||||
bitcoin.address.toOutputScript(address, network);
|
||||
|
||||
const redeemScript = bitcoin.script.multisig.output.encode(
|
||||
2,
|
||||
[
|
||||
new Buffer('12345678901234567890123456789012'),
|
||||
new Buffer('12345678901234567890123456789012'),
|
||||
new Buffer('12345678901234567890123456789012'),
|
||||
]
|
||||
);
|
||||
bitcoin.script.scriptHash.input.encode(
|
||||
bitcoin.script.multisig.input.encodeStack(
|
||||
[
|
||||
new Buffer('12345678901234567890123456789012'),
|
||||
new Buffer('12345678901234567890123456789012'),
|
||||
],
|
||||
redeemScript,
|
||||
),
|
||||
redeemScript,
|
||||
);
|
||||
|
||||
Vendored
+15
-13
@@ -1,10 +1,11 @@
|
||||
// Type definitions for bitcoinjs-lib 3.3
|
||||
// Type definitions for bitcoinjs-lib 3.4
|
||||
// Project: https://github.com/bitcoinjs/bitcoinjs-lib
|
||||
// Definitions by: Mohamed Hegazy <https://github.com/mhegazy>
|
||||
// Daniel <https://github.com/dlebrecht>
|
||||
// Ron Buckton <https://github.com/rbuckton>
|
||||
// Satana Charuwichitratana <https://github.com/micksatana>
|
||||
// Youssef GHOUBACH <https://github.com/youssefgh>
|
||||
// Kento <https://github.com/kento1218>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Declaration file initially generated by dts-gen for bitcoinjs-lib 3.0.3
|
||||
// based on the flow version found at https://github.com/flowtype/flow-typed/blob/master/definitions/npm/bitcoinjs-lib_v2.x.x/flow_v0.17.x-/bitcoinjs-lib_v2.x.x.js
|
||||
@@ -27,6 +28,7 @@ export interface In {
|
||||
}
|
||||
|
||||
export interface Network {
|
||||
bech32?: string;
|
||||
bip32: {
|
||||
public: number;
|
||||
private: number;
|
||||
@@ -468,8 +470,8 @@ export namespace script {
|
||||
check(script: Buffer, allowIncomplete: boolean): boolean;
|
||||
decode(buffer: Buffer): Array<Buffer | number>;
|
||||
decodeStack(stack: Buffer[], allowIncomplete: boolean): Array<Buffer | number>;
|
||||
encode(signatures: ECSignature[], scriptPubKey: Buffer): Buffer;
|
||||
encodeStack(signatures: ECSignature[], scriptPubKey: Buffer): ECSignature[];
|
||||
encode(signatures: Buffer[], scriptPubKey: Buffer): Buffer;
|
||||
encodeStack(signatures: Buffer[], scriptPubKey: Buffer): Buffer[];
|
||||
};
|
||||
output: {
|
||||
check(script: Buffer, allowIncomplete: boolean): boolean;
|
||||
@@ -483,8 +485,8 @@ export namespace script {
|
||||
check(script: Buffer): boolean;
|
||||
decode(buffer: Buffer): Array<Buffer | number>;
|
||||
decodeStack(stack: Buffer[]): Array<Buffer | number>;
|
||||
encode(signature: ECSignature): Buffer;
|
||||
encodeStack(signature: ECSignature): ECSignature[];
|
||||
encode(signature: Buffer): Buffer;
|
||||
encodeStack(signature: Buffer): Buffer[];
|
||||
};
|
||||
|
||||
output: {
|
||||
@@ -497,10 +499,10 @@ export namespace script {
|
||||
const pubKeyHash: {
|
||||
input: {
|
||||
check(script: Buffer): boolean;
|
||||
decode(buffer: Buffer): { signature: ECSignature; pubKey: Buffer };
|
||||
decodeStack(stack: Buffer[]): { signature: ECSignature; pubKey: Buffer };
|
||||
encode(signature: ECSignature, pubKey: Buffer): Buffer;
|
||||
encodeStack(signature: ECSignature, pubKey: Buffer): [ECSignature, Buffer];
|
||||
decode(buffer: Buffer): { signature: Buffer; pubKey: Buffer };
|
||||
decodeStack(stack: Buffer[]): { signature: Buffer; pubKey: Buffer };
|
||||
encode(signature: Buffer, pubKey: Buffer): Buffer;
|
||||
encodeStack(signature: Buffer, pubKey: Buffer): [Buffer, Buffer];
|
||||
};
|
||||
|
||||
output: {
|
||||
@@ -516,7 +518,7 @@ export namespace script {
|
||||
decode(buffer: Buffer): { redeemScriptStack: Buffer[]; redeemScript: Buffer };
|
||||
decodeStack(stack: Buffer[]): { redeemScriptStack: Buffer[]; redeemScript: Buffer };
|
||||
encode(redeemScriptSig: Array<Buffer | number>, redeemScript: Buffer): Buffer;
|
||||
encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer;
|
||||
encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer[];
|
||||
};
|
||||
|
||||
output: {
|
||||
@@ -537,8 +539,8 @@ export namespace script {
|
||||
const witnessPubKeyHash: {
|
||||
input: {
|
||||
check(script: Buffer): boolean;
|
||||
decodeStack(stack: Buffer[]): { signature: ECSignature; pubKey: Buffer };
|
||||
encodeStack(signature: ECSignature, pubKey: Buffer): [ECSignature, Buffer];
|
||||
decodeStack(stack: Buffer[]): { signature: Buffer; pubKey: Buffer };
|
||||
encodeStack(signature: Buffer, pubKey: Buffer): [Buffer, Buffer];
|
||||
};
|
||||
|
||||
output: {
|
||||
@@ -552,7 +554,7 @@ export namespace script {
|
||||
input: {
|
||||
check(script: Buffer, allowIncomplete: boolean): boolean;
|
||||
decodeStack(stack: Buffer[]): { redeemScriptStack: Buffer[]; redeemScript: Buffer };
|
||||
encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer;
|
||||
encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer[];
|
||||
};
|
||||
|
||||
output: {
|
||||
|
||||
Vendored
+1
-1
@@ -224,7 +224,7 @@ declare namespace CKEDITOR {
|
||||
focusPrevious(ignoreChildren?: boolean, indexToUse?: number): void;
|
||||
forEach(callback: (node: node) => void, type?: number, skipRoot?: boolean): void;
|
||||
getAttribute(name: string): string;
|
||||
getBogus(): Object;
|
||||
getBogus(): node|false;
|
||||
getChild(indices: number): node;
|
||||
getChild(indices: number[]): node;
|
||||
getChildCount(): number;
|
||||
|
||||
Vendored
+51
-1
@@ -4517,6 +4517,21 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
selector: JQuery.Selector | null,
|
||||
data: TData,
|
||||
handler: JQuery.EventHandler<TElement, TData> | JQuery.EventHandlerBase<any, JQuery.Event<TElement, TData>>): this;
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
||||
* @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the
|
||||
* selector is null or omitted, the event is always triggered when it reaches the selected element.
|
||||
* @param data Data to be passed to the handler in event.data when an event is triggered.
|
||||
* @param handler A function to execute when the event is triggered.
|
||||
* @see {@link https://api.jquery.com/on/}
|
||||
* @since 1.7
|
||||
*/
|
||||
on<TData>(events: string,
|
||||
selector: JQuery.Selector | null,
|
||||
data: TData,
|
||||
handler: ((event: JQueryEventObject) => void)): this; // tslint:disable-line:unified-signatures
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
@@ -4531,6 +4546,19 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
on(events: string,
|
||||
selector: JQuery.Selector,
|
||||
handler: JQuery.EventHandler<TElement> | JQuery.EventHandlerBase<any, JQuery.Event<TElement>> | false): this;
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
||||
* @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the
|
||||
* selector is null or omitted, the event is always triggered when it reaches the selected element.
|
||||
* @param handler A function to execute when the event is triggered.
|
||||
* @see {@link https://api.jquery.com/on/}
|
||||
* @since 1.7
|
||||
*/
|
||||
on(events: string,
|
||||
selector: JQuery.Selector,
|
||||
handler: ((event: JQueryEventObject) => void)): this; // tslint:disable-line:unified-signatures
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
@@ -4543,6 +4571,18 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
on<TData>(events: string,
|
||||
data: TData,
|
||||
handler: JQuery.EventHandler<TElement, TData> | JQuery.EventHandlerBase<any, JQuery.Event<TElement, TData>>): this;
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
||||
* @param data Data to be passed to the handler in event.data when an event is triggered.
|
||||
* @param handler A function to execute when the event is triggered.
|
||||
* @see {@link https://api.jquery.com/on/}
|
||||
* @since 1.7
|
||||
*/
|
||||
on<TData>(events: string,
|
||||
data: TData,
|
||||
handler: ((event: JQueryEventObject) => void)): this; // tslint:disable-line:unified-signatures
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
@@ -4554,6 +4594,16 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
*/
|
||||
on(events: string,
|
||||
handler: JQuery.EventHandler<TElement> | JQuery.EventHandlerBase<any, JQuery.Event<TElement>> | false): this;
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
||||
* @param handler A function to execute when the event is triggered.
|
||||
* @see {@link https://api.jquery.com/on/}
|
||||
* @since 1.7
|
||||
*/
|
||||
on(events: string,
|
||||
handler: ((event: JQueryEventObject) => void)): this; // tslint:disable-line:unified-signatures
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
@@ -5565,7 +5615,7 @@ interface Iterable<T> { }
|
||||
|
||||
declare namespace JQuery {
|
||||
type TypeOrArray<T> = T | T[];
|
||||
type Node = Element | Text | Comment;
|
||||
type Node = Element | Text | Comment | DocumentFragment;
|
||||
|
||||
/**
|
||||
* A string is designated htmlString in jQuery documentation when it is used to represent one or more
|
||||
|
||||
@@ -3634,6 +3634,14 @@ function JQuery() {
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', 'td', 'myData', function(event: JQueryEventObject) {
|
||||
// $ExpectType HTMLElement
|
||||
this;
|
||||
// $ExpectType JQueryEventObject
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', 'td', 'myData', function(this: I1, event) {
|
||||
// $ExpectType I1
|
||||
@@ -3650,6 +3658,14 @@ function JQuery() {
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', null, 'myData', function(event: JQueryEventObject) {
|
||||
// $ExpectType HTMLElement
|
||||
this;
|
||||
// $ExpectType JQueryEventObject
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', null, 'myData', function(this: I1, event) {
|
||||
// $ExpectType I1
|
||||
@@ -3666,6 +3682,14 @@ function JQuery() {
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', 'td', function(event: JQueryEventObject) {
|
||||
// $ExpectType HTMLElement
|
||||
this;
|
||||
// $ExpectType JQueryEventObject
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', 'td', function(this: I1, event) {
|
||||
// $ExpectType I1
|
||||
@@ -3685,6 +3709,14 @@ function JQuery() {
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', 3, function(event: JQueryEventObject) {
|
||||
// $ExpectType HTMLElement
|
||||
this;
|
||||
// $ExpectType JQueryEventObject
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', 3, function(this: I1, event) {
|
||||
// $ExpectType I1
|
||||
@@ -3701,6 +3733,38 @@ function JQuery() {
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', function(event: JQueryEventObject) {
|
||||
// $ExpectType HTMLElement
|
||||
this;
|
||||
// $ExpectType JQueryEventObject
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', function(event: JQueryInputEventObject) {
|
||||
// $ExpectType HTMLElement
|
||||
this;
|
||||
// $ExpectType JQueryInputEventObject
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', function(event: JQueryMouseEventObject) {
|
||||
// $ExpectType HTMLElement
|
||||
this;
|
||||
// $ExpectType JQueryMouseEventObject
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', function(event: JQueryKeyEventObject) {
|
||||
// $ExpectType HTMLElement
|
||||
this;
|
||||
// $ExpectType JQueryKeyEventObject
|
||||
event;
|
||||
});
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('table').on('myEvent', function(this: I1, event) {
|
||||
// $ExpectType I1
|
||||
@@ -5153,7 +5217,7 @@ function JQuery() {
|
||||
function manipulation() {
|
||||
function after() {
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('p').after('<p></p>', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()]);
|
||||
$('p').after('<p></p>', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()], document.createDocumentFragment());
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('p').after(function(index, html) {
|
||||
@@ -5218,7 +5282,7 @@ function JQuery() {
|
||||
|
||||
function append() {
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('p').append('<p></p>', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()]);
|
||||
$('p').append('<p></p>', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()], document.createDocumentFragment());
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('p').append(function(index, html) {
|
||||
@@ -5286,7 +5350,7 @@ function JQuery() {
|
||||
|
||||
function before() {
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('p').before('<p></p>', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()]);
|
||||
$('p').before('<p></p>', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()], document.createDocumentFragment());
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('p').before(function(index, html) {
|
||||
@@ -5351,7 +5415,7 @@ function JQuery() {
|
||||
|
||||
function prepend() {
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('p').prepend('<p></p>', new Element(), new Text(), $('p').contents(), [new Element(), new Text()], [new Element(), $('p').contents()]);
|
||||
$('p').prepend('<p></p>', new Element(), new Text(), $('p').contents(), [new Element(), new Text()], [new Element(), $('p').contents()], document.createDocumentFragment());
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$('p').prepend(function(index, html) {
|
||||
|
||||
Vendored
+4
-2
@@ -12,8 +12,10 @@ export interface BatchInfo {
|
||||
|
||||
export interface BatchResultInfo {
|
||||
id: string;
|
||||
batchId: string;
|
||||
jobId: string;
|
||||
batchId?: string;
|
||||
jobId?: string;
|
||||
success?: boolean;
|
||||
errors?: string[];
|
||||
}
|
||||
|
||||
export class Batch extends Writable {
|
||||
|
||||
Vendored
+1
-1
@@ -8,7 +8,7 @@ import { Batch, BatchResultInfo } from './batch';
|
||||
|
||||
export interface BulkOptions {
|
||||
extIdField: string;
|
||||
concurrencyMode: 'Serial' | 'Parallel';
|
||||
concurrencyMode?: 'Serial' | 'Parallel';
|
||||
}
|
||||
|
||||
type BulkLoadOperation =
|
||||
|
||||
Vendored
+13
-2
@@ -22,9 +22,10 @@ export interface PartialOAuth2Options {
|
||||
}
|
||||
|
||||
export interface RequestInfo {
|
||||
body?: string;
|
||||
headers?: object;
|
||||
method?: string;
|
||||
url?: string;
|
||||
headers?: object;
|
||||
}
|
||||
|
||||
export interface ConnectionOptions extends PartialOAuth2Options {
|
||||
@@ -58,6 +59,16 @@ export abstract class RestApi {
|
||||
del(path: string, options: object, callback: () => object): Promise<object>;
|
||||
}
|
||||
|
||||
export interface ExecuteAnonymousResult {
|
||||
compiled: boolean;
|
||||
compileProblem: string;
|
||||
success: boolean;
|
||||
line: number;
|
||||
column: number;
|
||||
exceptionMessage: string;
|
||||
exceptionStackTrace: string;
|
||||
}
|
||||
|
||||
export type ConnectionEvent = "refresh";
|
||||
|
||||
/**
|
||||
@@ -135,5 +146,5 @@ export class Tooling extends BaseConnection {
|
||||
_logger: any;
|
||||
|
||||
// Specific to tooling
|
||||
executeAnonymous(body: string, callback?: (err: Error, res: any) => void): Promise<any>;
|
||||
executeAnonymous(body: string, callback?: (err: Error, res: any) => void): Promise<ExecuteAnonymousResult>;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -19,6 +19,6 @@ export class Job extends EventEmitter {
|
||||
close(callback?: (err: Error, jobInfo: JobInfo) => void): Promise<JobInfo>;
|
||||
createBatch(): Batch;
|
||||
info(callback?: (err: Error, jobInfo: JobInfo) => void): Promise<JobInfo>;
|
||||
list(callback?: (err: Error, jobInfo: BatchInfo) => void): Promise<BatchInfo>;
|
||||
list(callback?: (err: Error, jobInfo: BatchInfo) => void): Promise<BatchInfo[]>;
|
||||
open(callback?: (err: Error, jobInfo: JobInfo) => void): Promise<JobInfo>;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,14 @@ const salesforceConnection: sf.Connection = new sf.Connection({
|
||||
|
||||
salesforceConnection.sobject<DummyRecord>("Dummy").select(["thing", "other"]);
|
||||
|
||||
const requestInfo: sf.RequestInfo = {
|
||||
body: '',
|
||||
headers: {},
|
||||
method: '',
|
||||
url: ''
|
||||
};
|
||||
salesforceConnection.request(requestInfo);
|
||||
|
||||
// note the following should never compile:
|
||||
// salesforceConnection.sobject<DummyRecord>("Dummy").select(["lol"]);
|
||||
|
||||
@@ -123,6 +131,17 @@ async function testAnalytics(conn: sf.Connection): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
async function testExecuteAnonymous(conn: sf.Connection): Promise<void> {
|
||||
const res: sf.ExecuteAnonymousResult = await salesforceConnection.tooling.executeAnonymous('');
|
||||
console.log('ExecuteAnonymousResult column: ' + res.column);
|
||||
console.log('ExecuteAnonymousResult compiled: ' + res.compiled);
|
||||
console.log('ExecuteAnonymousResult compileProblem: ' + res.compileProblem);
|
||||
console.log('ExecuteAnonymousResult exceptionMessage: ' + res.exceptionMessage);
|
||||
console.log('ExecuteAnonymousResult exceptionStackTrace: ' + res.exceptionStackTrace);
|
||||
console.log('ExecuteAnonymousResult line: ' + res.line);
|
||||
console.log('ExecuteAnonymousResult success: ' + res.success);
|
||||
}
|
||||
|
||||
async function testMetadata(conn: sf.Connection): Promise<void> {
|
||||
const md: sf.Metadata = conn.metadata;
|
||||
const m: sf.DescribeMetadataResult = await md.describe('34.0');
|
||||
@@ -281,6 +300,7 @@ async function testChatter(conn: sf.Connection): Promise<void> {
|
||||
await testAnalytics(salesforceConnection);
|
||||
await testChatter(salesforceConnection);
|
||||
await testMetadata(salesforceConnection);
|
||||
await testExecuteAnonymous(salesforceConnection);
|
||||
})();
|
||||
|
||||
const oauth2 = new sf.OAuth2({
|
||||
@@ -302,7 +322,7 @@ batch.on("queue", (batchInfo) => { // fired when batch request is queued in serv
|
||||
});
|
||||
job.batch("batchId");
|
||||
batch.poll(1000, 20000);
|
||||
batch.on("response", (rets) => {
|
||||
batch.on("response", (rets: sf.BatchResultInfo[]) => {
|
||||
for (let i = 0; i < rets.length; i++) {
|
||||
if (rets[i].success) {
|
||||
console.log(`# ${(i + 1)} loaded successfully, id = ${rets[i].id}`);
|
||||
@@ -312,6 +332,11 @@ batch.on("response", (rets) => {
|
||||
}
|
||||
});
|
||||
|
||||
(async () => {
|
||||
const batchInfos: sf.BatchInfo[] = await job.list();
|
||||
console.log('batchInfos:', batchInfos);
|
||||
});
|
||||
|
||||
salesforceConnection.streaming.topic("InvoiceStatementUpdates").subscribe((message) => {
|
||||
console.log('Event Type : ' + message.event.type);
|
||||
console.log('Event Created : ' + message.event.createdDate);
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for @mapbox/geojson-area 0.2
|
||||
// Project: https://github.com/mapbox/geojson-area#readme
|
||||
// Definitions by: Sagie Maoz <https://github.com/n0nick>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
// tslint:disable-next-line no-single-declare-module
|
||||
declare module "@mapbox/geojson-area" {
|
||||
import { Geometry } from 'geojson';
|
||||
|
||||
function geometry(geo: Geometry): number;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { geometry } from '@mapbox/geojson-area';
|
||||
|
||||
// Using a polygon argument
|
||||
// $ExpectType number
|
||||
geometry({
|
||||
type: "Polygon",
|
||||
coordinates: [
|
||||
[
|
||||
[170.0, 45.0], [180.0, 45.0]
|
||||
], [
|
||||
[-180.0, 45.0], [-170.0, 45.0]
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// Using a point argument
|
||||
// $ExpectType number
|
||||
geometry({
|
||||
type: "Point",
|
||||
coordinates: [12, 23]
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"mapbox__geojson-area-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+15
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Mongoose 5.0.14
|
||||
// Type definitions for Mongoose 5.0.15
|
||||
// Project: http://mongoosejs.com/
|
||||
// Definitions by: horiuchi <https://github.com/horiuchi>
|
||||
// sindrenm <https://github.com/sindrenm>
|
||||
@@ -190,6 +190,7 @@ declare module "mongoose" {
|
||||
|
||||
/**
|
||||
* Opens the connection to MongoDB.
|
||||
* @deprecated open() is deprecated in mongoose >= 4.11.0
|
||||
* @param mongodb://uri or the host to which you are connecting
|
||||
* @param database database name
|
||||
* @param port database port
|
||||
@@ -200,6 +201,19 @@ declare module "mongoose" {
|
||||
*/
|
||||
open(connection_string: string, database?: string, port?: number,
|
||||
options?: ConnectionOpenOptions, callback?: (err: any) => void): any;
|
||||
|
||||
/**
|
||||
* Opens the connection to MongoDB.
|
||||
* @param mongodb://uri or the host to which you are connecting
|
||||
* @param database database name
|
||||
* @param port database port
|
||||
* @param options Mongoose forces the db option forceServerObjectId false and cannot be overridden.
|
||||
* Mongoose defaults the server auto_reconnect options to true which can be overridden.
|
||||
* See the node-mongodb-native driver instance for options that it understands.
|
||||
* Options passed take precedence over options included in connection strings.
|
||||
*/
|
||||
openUri(connection_string: string, database?: string, port?: number,
|
||||
options?: ConnectionOpenOptions, callback?: (err: any) => void): any;
|
||||
|
||||
/** Helper for dropDatabase() */
|
||||
dropDatabase(callback?: (err: any) => void): Promise<any>;
|
||||
|
||||
@@ -129,6 +129,12 @@ conn1.openSet('mongodb://localhost/test', 'db', {
|
||||
replset: null,
|
||||
mongos: true
|
||||
}, function (err) {}).then(cb).catch(cb);
|
||||
conn1.openUri('mongodb://localhost/test', 'myDb', 27017, {
|
||||
replset: null,
|
||||
config: {
|
||||
autoIndex: false
|
||||
}
|
||||
}, function (err) {}).open('');
|
||||
conn1.close().catch(function (err) {});
|
||||
conn1.collection('name').$format(999);
|
||||
conn1.model('myModel', new mongoose.Schema({}), 'myCol').find();
|
||||
|
||||
Vendored
+1
-1
@@ -991,7 +991,7 @@ declare module "querystring" {
|
||||
decodeURIComponent?: Function;
|
||||
}
|
||||
|
||||
interface ParsedUrlQuery { [key: string]: string | string[]; }
|
||||
interface ParsedUrlQuery { [key: string]: string | string[] | undefined; }
|
||||
|
||||
export function stringify<T>(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string;
|
||||
export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
|
||||
|
||||
Vendored
+1
-1
@@ -895,7 +895,7 @@ declare module "querystring" {
|
||||
decodeURIComponent?: Function;
|
||||
}
|
||||
|
||||
interface ParsedUrlQuery { [key: string]: string | string[]; }
|
||||
interface ParsedUrlQuery { [key: string]: string | string[] | undefined; }
|
||||
|
||||
export function stringify<T>(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string;
|
||||
export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
|
||||
|
||||
Vendored
+1
-1
@@ -982,7 +982,7 @@ declare module "querystring" {
|
||||
decodeURIComponent?: Function;
|
||||
}
|
||||
|
||||
interface ParsedUrlQuery { [key: string]: string | string[]; }
|
||||
interface ParsedUrlQuery { [key: string]: string | string[] | undefined; }
|
||||
|
||||
export function stringify<T>(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string;
|
||||
export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
|
||||
|
||||
Vendored
+7
-5
@@ -1,10 +1,10 @@
|
||||
// Type definitions for react-text-mask 5.1
|
||||
// Type definitions for react-text-mask 5.4
|
||||
// Project: https://github.com/text-mask/text-mask
|
||||
// Definitions by: Guilherme Hübner <https://github.com/guilhermehubner>
|
||||
// Definitions by: Guilherme Hübner <https://github.com/guilhermehubner>, Deividi Cavarzan <https://github.com/cavarzan>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
import * as React from "react";
|
||||
import * as React from 'react';
|
||||
|
||||
export type maskArray = Array<string | RegExp>;
|
||||
|
||||
@@ -17,15 +17,17 @@ export interface MaskedInputProps extends React.InputHTMLAttributes<HTMLInputEle
|
||||
|
||||
keepCharPositions?: boolean;
|
||||
|
||||
pipe?: (conformedValue: string, config: any) => false | string | { value: string, indexesOfPipedChars: number[] };
|
||||
pipe?: (conformedValue: string, config: any) => false | string | { value: string; indexesOfPipedChars: number[] };
|
||||
|
||||
showMask?: boolean;
|
||||
|
||||
render?: (ref: MaskedInput, props: any) => any;
|
||||
}
|
||||
|
||||
export interface conformToMaskResult {
|
||||
conformedValue: string;
|
||||
meta: {
|
||||
someCharsRejected: boolean
|
||||
someCharsRejected: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -242,7 +242,7 @@ declare module 'hapi' {
|
||||
}
|
||||
|
||||
declare module 'hapi' {
|
||||
interface RouteOptions {
|
||||
interface HandlerDecorations {
|
||||
/**
|
||||
* The view handler can be used with routes registered in the same realm as the view manager.
|
||||
* The handler takes an options parameter that can be either a string or an object.
|
||||
|
||||
Vendored
+3
-3
@@ -1,4 +1,4 @@
|
||||
// Type definitions for webpack 4.1
|
||||
// Type definitions for webpack 4.4
|
||||
// Project: https://github.com/webpack/webpack
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>
|
||||
// Benjamin Lim <https://github.com/bumbleblym>
|
||||
@@ -560,7 +560,7 @@ declare namespace webpack {
|
||||
/** Assign modules to a cache group */
|
||||
test?: ((...args: any[]) => boolean) | string | RegExp;
|
||||
/** Select chunks for determining cache group content (defaults to \"initial\", \"initial\" and \"all\" requires adding these chunks to the HTML) */
|
||||
chunks?: "initial" | "async" | "all";
|
||||
chunks?: "initial" | "async" | "all" | ((chunk: compilation.Chunk) => boolean);
|
||||
/** Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group */
|
||||
enforce?: boolean;
|
||||
/** Priority of this cache group */
|
||||
@@ -580,7 +580,7 @@ declare namespace webpack {
|
||||
}
|
||||
interface SplitChunksOptions {
|
||||
/** Select chunks for determining shared modules (defaults to \"async\", \"initial\" and \"all\" requires adding these chunks to the HTML) */
|
||||
chunks?: "initial" | "async" | "all";
|
||||
chunks?: "initial" | "async" | "all" | ((chunk: compilation.Chunk) => boolean);
|
||||
/** Minimal size for the created chunk */
|
||||
minSize?: number;
|
||||
/** Minimum number of times a module has to be duplicated until it's considered for splitting */
|
||||
|
||||
@@ -607,6 +607,27 @@ configuration = {
|
||||
},
|
||||
};
|
||||
|
||||
configuration = {
|
||||
mode: "production",
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
common: {
|
||||
name: 'common',
|
||||
chunks(chunk: webpack.compilation.Chunk) {
|
||||
const allowedChunks = [
|
||||
'renderer',
|
||||
'component-window',
|
||||
];
|
||||
return allowedChunks.indexOf(chunk.name) >= 0;
|
||||
},
|
||||
minChunks: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
plugin = new webpack.SplitChunksPlugin({ chunks: "async", minChunks: 2 });
|
||||
|
||||
class SingleEntryDependency extends webpack.compilation.Dependency {}
|
||||
|
||||
Reference in New Issue
Block a user