mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
+346
-154
File diff suppressed because it is too large
Load Diff
+13
-1
@@ -1194,6 +1194,12 @@
|
||||
"sourceRepoURL": "https://github.com/react-native-community/react-native-modal",
|
||||
"asOfVersion": "4.1.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "react-native-navigation",
|
||||
"typingsPackageName": "react-native-navigation",
|
||||
"sourceRepoURL": "https://github.com/wix/react-native-navigation",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "react-split-pane",
|
||||
"typingsPackageName": "react-split-pane",
|
||||
@@ -1219,7 +1225,7 @@
|
||||
"asOfVersion": "0.1.5"
|
||||
},
|
||||
{
|
||||
"libraryName": "react-bootstrap",
|
||||
"libraryName": "redux-bootstrap",
|
||||
"typingsPackageName": "redux-bootstrap",
|
||||
"sourceRepoURL": "https://github.com/remojansen/redux-bootstrap",
|
||||
"asOfVersion": "1.1.0"
|
||||
@@ -1584,6 +1590,12 @@
|
||||
"sourceRepoURL": "http://webix.com",
|
||||
"asOfVersion": "5.1.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "winston",
|
||||
"typingsPackageName": "winston",
|
||||
"sourceRepoURL": "https://github.com/winstonjs/winston.git",
|
||||
"asOfVersion": "2.4.4"
|
||||
},
|
||||
{
|
||||
"libraryName": "wolfy87-eventemitter",
|
||||
"typingsPackageName": "wolfy87-eventemitter",
|
||||
|
||||
Vendored
+1
-2
@@ -2,9 +2,8 @@
|
||||
// Project: https://github.com/optimalbits/node_acl
|
||||
// Definitions by: Qubo <https://github.com/tkQubo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
/// <reference types="bluebird" />
|
||||
/// <reference types="node"/>
|
||||
/// <reference types="express"/>
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
let client = AgoraRTC.createClient({
|
||||
mode: 'live',
|
||||
codec: 'vp8'
|
||||
});
|
||||
|
||||
let stream = AgoraRTC.createStream({
|
||||
video: true,
|
||||
audio: true,
|
||||
streamID: 21230,
|
||||
screen: false
|
||||
});
|
||||
|
||||
client.init('74a0b7bb5d3e47c7abca0533d17b0afa', () => {
|
||||
client.join('74a0b7bb5d3e47c7abca0533d17b0afa', 'testyy', 21230, uid => {
|
||||
stream.init(() => {
|
||||
client.publish(stream, err => {
|
||||
throw(err);
|
||||
});
|
||||
}, err => {
|
||||
throw(err);
|
||||
});
|
||||
}, err => {
|
||||
throw(err);
|
||||
});
|
||||
}, err => {
|
||||
throw(err);
|
||||
});
|
||||
Vendored
+314
@@ -0,0 +1,314 @@
|
||||
// Type definitions for agora-rtc-sdk 2.3
|
||||
// Project: https://github.com/AgoraIO/web-archive#readme
|
||||
// Definitions by: Menthays <https://github.com/menthays>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/*~ If this module is a UMD module that exposes a global variable 'myLib' when
|
||||
*~ loaded outside a module loader environment, declare that global here.
|
||||
*~ Otherwise, delete this declaration.
|
||||
*/
|
||||
export as namespace AgoraRTC;
|
||||
|
||||
/*~ If this module has methods, declare them as functions like so.
|
||||
*/
|
||||
export function createClient(config: ClientConfig): Client;
|
||||
export function createStream(spec: StreamSpec): Stream;
|
||||
export function checkSystemRequirements(): boolean;
|
||||
export function getDevices(callback: (devices: any[]) => void): void;
|
||||
|
||||
/*~ You can declare types that are available via importing the module */
|
||||
export interface ClientConfig {
|
||||
mode: 'live' | 'rtc';
|
||||
codec: 'vp8' | 'h264';
|
||||
proxyServer?: string;
|
||||
turnServer?: {
|
||||
turnServerURL: string;
|
||||
username: string;
|
||||
password: string;
|
||||
udpport: string;
|
||||
tcpport: string;
|
||||
forceturn: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface StreamSpec {
|
||||
streamID: number;
|
||||
audio: boolean;
|
||||
video: boolean;
|
||||
screen: boolean;
|
||||
cameraId?: string;
|
||||
microphoneId?: string;
|
||||
mirror?: boolean;
|
||||
extensionid?: string;
|
||||
mediaSource?: 'screen' | 'application' | 'window';
|
||||
audioProcessing?: {
|
||||
AGC: boolean;
|
||||
};
|
||||
attributes?: {
|
||||
resolution: string;
|
||||
minFrameRate: number;
|
||||
maxFrameRate: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface LocalStreamStats {
|
||||
audioSendBytes: string;
|
||||
audioSendPackets: string;
|
||||
videoSendBytes: string;
|
||||
videoSendPackets: string;
|
||||
videoSendPacketsLost: string;
|
||||
videoSendFrameRate: string;
|
||||
videoSendBandwidth: string;
|
||||
videoSendResolutionWidth?: string;
|
||||
videoSendResolutionHeight?: string;
|
||||
audioCodecName: string;
|
||||
videoCodecName: string;
|
||||
timestamp: string;
|
||||
startTime: string;
|
||||
duration: string;
|
||||
}
|
||||
|
||||
export interface RemoteStreamStats {
|
||||
audioReceiveBytes: string;
|
||||
audioReceivePackets: string;
|
||||
audioReceivePacketsLost: string;
|
||||
videoReceiveBytes: string;
|
||||
videoReceivePackets: string;
|
||||
videoReceivePacketsLost: string;
|
||||
videoReceiveFrameRate?: string;
|
||||
videoReceiveDecodeFrameRate?: string;
|
||||
videoReceiveBandwidth?: string;
|
||||
videoReceivedResolutionWidth?: string;
|
||||
videoReceivedResolutionHeight?: string;
|
||||
timestamp: string;
|
||||
startTime: string;
|
||||
duration: string;
|
||||
}
|
||||
|
||||
export type VideoProfile =
|
||||
| '120p'
|
||||
| '120p_1'
|
||||
| '120p_3'
|
||||
| '180p'
|
||||
| '180p_1'
|
||||
| '180p_3'
|
||||
| '180p_4'
|
||||
| '240p'
|
||||
| '240p_1'
|
||||
| '240p_3'
|
||||
| '240p_4'
|
||||
| '360p'
|
||||
| '360p_1'
|
||||
| '360p_3'
|
||||
| '360p_4'
|
||||
| '360p_6'
|
||||
| '360p_7'
|
||||
| '360p_8'
|
||||
| '360p_9'
|
||||
| '360p_10'
|
||||
| '360p_11'
|
||||
| '480p'
|
||||
| '480p_1'
|
||||
| '480p_2'
|
||||
| '480p_3'
|
||||
| '480p_4'
|
||||
| '480p_6'
|
||||
| '480p_8'
|
||||
| '480p_9'
|
||||
| '480p_10'
|
||||
| '720p'
|
||||
| '720p_1'
|
||||
| '720p_2'
|
||||
| '720p_3'
|
||||
| '720p_5'
|
||||
| '720p_6'
|
||||
| '1080p'
|
||||
| '1080p_1'
|
||||
| '1080p_2'
|
||||
| '1080p_3'
|
||||
| '1080p_5'
|
||||
| '1440p'
|
||||
| '1440p_1'
|
||||
| '1440p_2'
|
||||
| '4K'
|
||||
| '4K_1'
|
||||
| '4K_3';
|
||||
|
||||
export type FirefoxVideoProfile =
|
||||
| '480p'
|
||||
| '480p_1'
|
||||
| '480p_2'
|
||||
| '480p_3'
|
||||
| '480p_4'
|
||||
| '480p_6'
|
||||
| '480p_8'
|
||||
| '480p_9'
|
||||
| '480p_10'
|
||||
| '720p'
|
||||
| '720p_1'
|
||||
| '720p_2'
|
||||
| '720p_3'
|
||||
| '720p_5'
|
||||
| '720p_6';
|
||||
|
||||
export type SafariVideoProfile =
|
||||
| '480p'
|
||||
| '480p_1'
|
||||
| '480p_2'
|
||||
| '480p_3'
|
||||
| '480p_4'
|
||||
| '480p_6'
|
||||
| '480p_8'
|
||||
| '480p_9'
|
||||
| '480p_10'
|
||||
| '720p'
|
||||
| '720p_1'
|
||||
| '720p_2'
|
||||
| '720p_3'
|
||||
| '720p_5'
|
||||
| '720p_6'
|
||||
| '1080p'
|
||||
| '1080p_1'
|
||||
| '1080p_2'
|
||||
| '1080p_3'
|
||||
| '1080p_5'
|
||||
| '1440p'
|
||||
| '1440p_1'
|
||||
| '1440p_2'
|
||||
| '4K'
|
||||
| '4K_1'
|
||||
| '4K_3';
|
||||
|
||||
export type ScreenSharingProfile =
|
||||
| '480p_1'
|
||||
| '480p_2'
|
||||
| '720p_1'
|
||||
| '720p_2'
|
||||
| '1080p_1'
|
||||
| '1080p_2';
|
||||
|
||||
export type ClientEvent =
|
||||
| 'stream-published'
|
||||
| 'stream-added'
|
||||
| 'stream-removed'
|
||||
| 'stream-subscribed'
|
||||
| 'peer-leave'
|
||||
| 'mute-audio'
|
||||
| 'unmute-audio'
|
||||
| 'mute-video'
|
||||
| 'unmute-video'
|
||||
| 'client-banned'
|
||||
| 'active-speaker'
|
||||
| 'error';
|
||||
|
||||
export interface Stream {
|
||||
getStats(
|
||||
callback: (stats: LocalStreamStats | RemoteStreamStats) => void
|
||||
): void;
|
||||
init(onSuccess: () => void, onFailure: (err: any) => void): void;
|
||||
getId(): number;
|
||||
getAttributes(): any;
|
||||
getAudioLevel(): number;
|
||||
hasVideo(): boolean;
|
||||
hasAudio(): boolean;
|
||||
enableVideo(): void;
|
||||
disableVideo(): void;
|
||||
enableAudio(): void;
|
||||
disableAudio(): void;
|
||||
setVideoProfile(
|
||||
profile:
|
||||
| VideoProfile
|
||||
| FirefoxVideoProfile
|
||||
| SafariVideoProfile
|
||||
| ScreenSharingProfile
|
||||
): void;
|
||||
play(HTMLElementID: string): void;
|
||||
stop(): void;
|
||||
close(): void;
|
||||
}
|
||||
|
||||
export interface Client {
|
||||
on(eventName: ClientEvent, callback: (evt: any) => void): void;
|
||||
init(
|
||||
appId: string,
|
||||
onSuccess: () => void,
|
||||
onFailure: (err: any) => void
|
||||
): void;
|
||||
join(
|
||||
tokenOrKey: string,
|
||||
channel: string,
|
||||
uid: number,
|
||||
onSuccess: (uid: number) => void,
|
||||
onFailure: (err: any) => void
|
||||
): void;
|
||||
renewChannelKey(
|
||||
key: string,
|
||||
onSuccess: () => void,
|
||||
onFailure: (err: any) => void
|
||||
): void;
|
||||
enableDualStream(
|
||||
onSuccess: () => void,
|
||||
onFailure: (err: any) => void
|
||||
): void;
|
||||
setRemoteVideoStreamType(stream: Stream, streamType: 0 | 1): void;
|
||||
setLowStreamParameter(param: {
|
||||
width: number;
|
||||
height: number;
|
||||
framerate: number;
|
||||
birate: number;
|
||||
}): void;
|
||||
disableDualStream(
|
||||
onSuccess: () => void,
|
||||
onFailure: (err: any) => void
|
||||
): void;
|
||||
leave(onSuccess: () => void, onFailure: (err: any) => void): void;
|
||||
publish(stream: Stream, onFailure: (err: any) => void): void;
|
||||
unpublish(stream: Stream, onFailure: (err: any) => void): void;
|
||||
subscribe(stream: Stream, onFailure: (err: any) => void): void;
|
||||
unsubscribe(stream: Stream, onFailure: (err: any) => void): void;
|
||||
setProxyServer(proxyServer: ClientConfig['proxyServer']): void;
|
||||
setTurnServer(turnServer: ClientConfig['turnServer']): void;
|
||||
setEncryptionSecret(password: string): void;
|
||||
setEncryptionMode(
|
||||
encryptionMode: 'aes-128-xts' | 'aes-256-xts' | 'aes-128-ecb'
|
||||
): void;
|
||||
}
|
||||
|
||||
/*~ You can declare properties of the module using const, let, or var */
|
||||
export const VERSION: string;
|
||||
|
||||
export const AUDIO_SAMPLE_RATE_32000: 32000;
|
||||
export const AUDIO_SAMPLE_RATE_44100: 44100;
|
||||
export const AUDIO_SAMPLE_RATE_48000: 48000;
|
||||
|
||||
export const VIDEO_CODEC_PROFILE_BASELINE: 66;
|
||||
export const VIDEO_CODEC_PROFILE_MAIN: 77;
|
||||
export const VIDEO_CODEC_PROFILE_HIGH: 100;
|
||||
|
||||
export const REMOTE_VIDEO_STREAM_HIGH: 0;
|
||||
export const REMOTE_VIDEO_STREAM_LOW: 1;
|
||||
export const REMOTE_VIDEO_STREAM_MEDIUM: 2;
|
||||
/*~ If there are types, properties, or methods inside dotted names
|
||||
*~ of the module, declare them inside a 'namespace'.
|
||||
*/
|
||||
export namespace Logger {
|
||||
/*~ For example, given this definition, someone could write:
|
||||
*~ import { subProp } from 'yourModule';
|
||||
*~ subProp.foo();
|
||||
*~ or
|
||||
*~ import * as yourMod from 'yourModule';
|
||||
*~ yourMod.subProp.foo();
|
||||
*/
|
||||
type DEBUG = 0;
|
||||
type INFO = 1;
|
||||
type WARNING = 2;
|
||||
type ERROR = 3;
|
||||
type NONE = 4;
|
||||
function setLogLevel(level: DEBUG|INFO|WARNING|NONE): void;
|
||||
function log(args: any): void;
|
||||
function debug(args: any): void;
|
||||
function info(args: any): void;
|
||||
function warning(args: any): void;
|
||||
function error(args: any): void;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"agora-rtc-sdk-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+5
@@ -764,6 +764,11 @@ declare namespace algoliasearch {
|
||||
* https://github.com/algolia/algoliasearch-client-js#client-options
|
||||
*/
|
||||
hosts?: { read?: string[]; write?: string[] };
|
||||
/**
|
||||
* enable the experimental feature: caching requests instead of responses
|
||||
* see https://github.com/algolia/algoliasearch-client-javascript/pull/694
|
||||
*/
|
||||
_useRequestCache?: boolean
|
||||
}
|
||||
/**
|
||||
* Interface describing options available for gettings the logs
|
||||
|
||||
Vendored
+5
@@ -180,6 +180,11 @@ declare namespace algoliasearch {
|
||||
* https://github.com/algolia/algoliasearch-client-js#client-options
|
||||
*/
|
||||
hosts?: { read?: string[]; write?: string[] };
|
||||
/**
|
||||
* enable the experimental feature: caching requests instead of responses
|
||||
* see https://github.com/algolia/algoliasearch-client-javascript/pull/694
|
||||
*/
|
||||
_useRequestCache?: boolean
|
||||
}
|
||||
interface BrowseResponse {
|
||||
cursor?: string;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import * as amqp from "amqplib";
|
||||
import * as amqpConMgr from 'amqp-connection-manager';
|
||||
|
||||
// from README.md
|
||||
const connection = amqpConMgr.connect(['amqp://localhost']);
|
||||
const channelWrapper: amqpConMgr.ChannelWrapper = connection.createChannel({
|
||||
json: true,
|
||||
setup: async (channel: amqp.ConfirmChannel): Promise<void> => {
|
||||
// `channel` here is a regular amqplib `ConfirmChannel`. Unfortunately its typings make it return a bluebird-specific promise
|
||||
// tslint:disable-next-line:await-promise
|
||||
await channel.assertQueue('rxQueueName', {durable: true});
|
||||
}
|
||||
});
|
||||
|
||||
connection.on("connect", (_arg: { connection: amqp.Connection, url: string }): void => undefined);
|
||||
connection.on("disconnect", (_arg: { err: Error }): void => undefined);
|
||||
|
||||
channelWrapper.on("close", () => undefined);
|
||||
channelWrapper.on("connect", () => undefined);
|
||||
channelWrapper.on("error", (_error: Error) => undefined);
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
// Type definitions for amqp-connection-manager 2.0
|
||||
// Project: https://github.com/benbria/node-amqp-connection-manager
|
||||
// Definitions by: rogierschouten <https://github.com/rogierschouten>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import { ConfirmChannel, Connection, Message, Options, Replies } from "amqplib";
|
||||
import { EventEmitter } from "events";
|
||||
import { SecureContextOptions } from "tls";
|
||||
|
||||
/**
|
||||
* connect() options
|
||||
*/
|
||||
export interface AmqpConnectionManagerOptions {
|
||||
/**
|
||||
* Interval to send heartbeats to broker. Defaults to 5 seconds.
|
||||
*/
|
||||
heartbeatIntervalInSeconds?: number;
|
||||
|
||||
/**
|
||||
* The time to wait before trying to reconnect. If not specified, defaults to heartbeatIntervalInSeconds
|
||||
*/
|
||||
reconnectTimeInSeconds?: number;
|
||||
|
||||
/**
|
||||
* is a function which returns one or more servers to connect to. This should return either a single URL or an array of URLs.
|
||||
* This is handy when you're using a service discovery mechanism such as Consul or etcd. Instead of taking a callback, this can also
|
||||
* return a Promise. Note that if this is supplied, then urls is ignored.
|
||||
*/
|
||||
findServers?: ((callback: (urls: string | string[]) => void) => void) | (() => Promise<string | string[]>);
|
||||
|
||||
/**
|
||||
* TLS options
|
||||
*/
|
||||
connectionOptions?: SecureContextOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new AmqpConnectionManager, which will connect to one of the URLs provided in urls.
|
||||
* If a broker is unreachable or dies, then AmqpConnectionManager will try the next available broker, round-robin.
|
||||
* @param urls
|
||||
* @param options
|
||||
*/
|
||||
export function connect(urls: string[], options?: AmqpConnectionManagerOptions): AmqpConnectionManager;
|
||||
|
||||
export type SetupFunc = ((channel: ConfirmChannel, callback: (error?: Error) => void) => void) | ((channel: ConfirmChannel) => Promise<void>);
|
||||
|
||||
export interface CreateChannelOpts {
|
||||
/**
|
||||
* Name for this channel. Used for debugging.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* A function to call whenever we reconnect to the broker (and therefore create a new underlying channel.)
|
||||
* This function should either accept a callback, or return a Promise. See addSetup below
|
||||
*/
|
||||
setup?: SetupFunc;
|
||||
/**
|
||||
* if true, then ChannelWrapper assumes all messages passed to publish() and sendToQueue() are plain JSON objects.
|
||||
* These will be encoded automatically before being sent.
|
||||
*/
|
||||
json?: boolean;
|
||||
}
|
||||
|
||||
export interface AmqpConnectionManager extends EventEmitter {
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this;
|
||||
addListener(event: "disconnect", listener: (arg: {err: Error}) => void): this;
|
||||
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this;
|
||||
on(event: "disconnect", listener: (arg: {err: Error}) => void): this;
|
||||
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this;
|
||||
once(event: "disconnect", listener: (arg: {err: Error}) => void): this;
|
||||
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this;
|
||||
prependListener(event: "disconnect", listener: (arg: {err: Error}) => void): this;
|
||||
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this;
|
||||
prependOnceListener(event: "disconnect", listener: (arg: {err: Error}) => void): this;
|
||||
|
||||
/**
|
||||
* Create a new ChannelWrapper. This is a proxy for the actual channel (which may or may not exist at any moment, depending on whether or not we are currently connected.)
|
||||
* @param opts
|
||||
*/
|
||||
createChannel(opts: CreateChannelOpts): ChannelWrapper;
|
||||
|
||||
/**
|
||||
* Returns true if the AmqpConnectionManager is connected to a broker, false otherwise.
|
||||
*/
|
||||
isConnected(): boolean;
|
||||
|
||||
/**
|
||||
* Close this AmqpConnectionManager and free all associated resources.
|
||||
*/
|
||||
close(): Promise<void>;
|
||||
}
|
||||
|
||||
export interface ChannelWrapper extends EventEmitter {
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
addListener(event: "connect", listener: () => void): this;
|
||||
addListener(event: "error", listener: (err: Error, info: { name: string }) => void): this;
|
||||
addListener(event: "close", listener: () => void): this;
|
||||
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
on(event: "connect", listener: () => void): this;
|
||||
on(event: "error", listener: (err: Error, info: { name: string }) => void): this;
|
||||
on(event: "close", listener: () => void): this;
|
||||
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: "connect", listener: () => void): this;
|
||||
once(event: "error", listener: (err: Error, info: { name: string }) => void): this;
|
||||
once(event: "close", listener: () => void): this;
|
||||
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: "connect", listener: () => void): this;
|
||||
prependListener(event: "error", listener: (err: Error, info: { name: string }) => void): this;
|
||||
prependListener(event: "close", listener: () => void): this;
|
||||
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: "connect", listener: () => void): this;
|
||||
prependOnceListener(event: "error", listener: (err: Error, info: { name: string }) => void): this;
|
||||
prependOnceListener(event: "close", listener: () => void): this;
|
||||
|
||||
/**
|
||||
* Adds a new 'setup handler'. setup(channel, [cb]) is a function to call when a new underlying channel is created -
|
||||
* handy for asserting exchanges and queues exists, and whatnot. The channel object here is a ConfirmChannel from amqplib.
|
||||
* The setup function should return a Promise (or optionally take a callback) - no messages will be sent until this Promise resolves.
|
||||
* If there is a connection, setup() will be run immediately, and the addSetup Promise/callback won't resolve until setup is complete.
|
||||
* Note that in this case, if the setup throws an error, no 'error' event will be emitted, since you can just handle the error here
|
||||
* (although the setup will still be added for future reconnects, even if it throws an error.)
|
||||
* Setup functions should, ideally, not throw errors, but if they do then the ChannelWrapper will emit an 'error' event.
|
||||
* @param func
|
||||
*/
|
||||
addSetup(func: SetupFunc): Promise<void>;
|
||||
|
||||
/**
|
||||
* @see amqplib
|
||||
* @param exchange
|
||||
* @param routingKey
|
||||
* @param content
|
||||
* @param options
|
||||
* @param callback
|
||||
*/
|
||||
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean;
|
||||
|
||||
/**
|
||||
* @see amqplib
|
||||
* @param queue
|
||||
* @param content
|
||||
* @param options
|
||||
* @param callback
|
||||
*/
|
||||
sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean;
|
||||
|
||||
/**
|
||||
* @see amqplib
|
||||
* @param message
|
||||
* @param allUpTo
|
||||
*/
|
||||
ack(message: Message, allUpTo?: boolean): void;
|
||||
|
||||
/**
|
||||
* @see amqplib
|
||||
* @param message
|
||||
* @param allUpTo
|
||||
* @param requeue
|
||||
*/
|
||||
nack(message: Message, allUpTo?: boolean, requeue?: boolean): void;
|
||||
|
||||
/**
|
||||
* Returns a count of messages currently waiting to be sent to the underlying channel.
|
||||
*/
|
||||
queueLength(): number;
|
||||
|
||||
/**
|
||||
* Close a channel, clean up resources associated with it.
|
||||
*/
|
||||
close(): Promise<void>;
|
||||
}
|
||||
@@ -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",
|
||||
"amqp-connection-manager-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"strict-export-declare-modifiers": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false
|
||||
}
|
||||
}
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/squaremo/amqp.node
|
||||
// Definitions by: Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone>, Nick Zelei <https://github.com/zelein>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
@@ -214,11 +214,18 @@ mod.factory({
|
||||
name1(foo: any) {},
|
||||
name2: ['foo', (foo: any) => {}]
|
||||
});
|
||||
mod.filter('name', ($scope: ng.IScope) => {});
|
||||
mod.filter('name', ['$scope', ($scope: ng.IScope) => {}]);
|
||||
mod.filter('name', ($scope: ng.IScope) => () => {});
|
||||
mod.filter('name', ['$scope', ($scope: ng.IScope) => () => {}]);
|
||||
mod.filter({
|
||||
name1(foo: any) {},
|
||||
name2: ['foo', (foo: any) => {}]
|
||||
name1(foo: any) { return () => {}; },
|
||||
name2: ['foo', (foo: any) => () => {}],
|
||||
});
|
||||
const customStatefulFilter: ng.IFilterFunction = (s) => 1;
|
||||
mod.filter('name', () => customStatefulFilter);
|
||||
mod.filter('name', ['$scope', () => customStatefulFilter]);
|
||||
mod.filter({
|
||||
name1: () => customStatefulFilter,
|
||||
name2: ['foo', () => customStatefulFilter],
|
||||
});
|
||||
mod.provider('name', ($scope: ng.IScope) => ({ $get: () => { } }));
|
||||
mod.provider('name', TestProvider);
|
||||
|
||||
Vendored
+11
-2
@@ -250,8 +250,8 @@ declare namespace angular {
|
||||
*/
|
||||
factory(name: string, $getFn: Injectable<Function>): IModule;
|
||||
factory(object: {[name: string]: Injectable<Function>}): IModule;
|
||||
filter(name: string, filterFactoryFunction: Injectable<Function>): IModule;
|
||||
filter(object: {[name: string]: Injectable<Function>}): IModule;
|
||||
filter(name: string, filterFactoryFunction: Injectable<FilterFactory>): IModule;
|
||||
filter(object: {[name: string]: Injectable<FilterFactory>}): IModule;
|
||||
provider(name: string, serviceProviderFactory: IServiceProviderFactory): IModule;
|
||||
provider(name: string, serviceProviderConstructor: IServiceProviderClass): IModule;
|
||||
provider(name: string, inlineAnnotatedConstructor: any[]): IModule;
|
||||
@@ -2237,4 +2237,13 @@ declare namespace angular {
|
||||
interface IHttpParamSerializer {
|
||||
(obj: Object): string;
|
||||
}
|
||||
|
||||
interface IFilterFunction extends Function {
|
||||
/**
|
||||
* By default, filters are only run once the input value changes. By marking the filter as `$stateful`, the filter will be run on every `$digest` to update the output. **This is strongly discouraged.**
|
||||
* See https://docs.angularjs.org/guide/filter#stateful-filters
|
||||
*/
|
||||
$stateful?: boolean;
|
||||
}
|
||||
type FilterFactory = (...I: any[]) => IFilterFunction;
|
||||
}
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
import { Token } from './Token';
|
||||
import { Interval } from './IntervalSet';
|
||||
|
||||
export class BufferedTokenStream {
|
||||
tokenSource: any;
|
||||
tokens: Token[];
|
||||
index: number;
|
||||
fetchEOF: boolean;
|
||||
|
||||
mark(): number;
|
||||
|
||||
release(marker: number): number;
|
||||
|
||||
reset(): void;
|
||||
|
||||
seek(index: number): void;
|
||||
|
||||
get(index: number): Token;
|
||||
|
||||
consume(): void;
|
||||
|
||||
sync(i: number): boolean;
|
||||
|
||||
fetch(n: number): number;
|
||||
|
||||
getTokens(start: number, stop: number, types: any): Token[];
|
||||
|
||||
LA(i: number): any;
|
||||
|
||||
LB(k: number): Token;
|
||||
|
||||
LT(k: number): Token;
|
||||
|
||||
adjustSeekIndex(i: number): number;
|
||||
|
||||
lazyInit(): void;
|
||||
|
||||
setup(): void;
|
||||
|
||||
setTokenSource(tokenSource: any): void;
|
||||
|
||||
nextTokenOnChannel(i: number, channel: any): number;
|
||||
|
||||
previousTokenOnChannel(i: number, channel: any): number;
|
||||
|
||||
getHiddenTokensToRight(tokenIndex: number, channel: any): Token[];
|
||||
|
||||
getSourceName(): any;
|
||||
|
||||
getText(interval: Interval): any;
|
||||
|
||||
fill(): void;
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
import { BufferedTokenStream } from './BufferedTokenStream';
|
||||
import { Token } from './Token';
|
||||
import { Lexer } from './Lexer';
|
||||
|
||||
export class CommonTokenStream extends BufferedTokenStream {
|
||||
constructor(lexer: Lexer, channel?: any);
|
||||
|
||||
adjustSeekIndex(i: number): any;
|
||||
|
||||
LB(k: number): Token;
|
||||
|
||||
LT(k: number): Token;
|
||||
|
||||
getNumberOfOnChannelTokens(): number;
|
||||
}
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
export class InputStream {
|
||||
readonly index: number;
|
||||
readonly size: number;
|
||||
|
||||
constructor(data: string, decodeToUnicodeCodePoints?: boolean);
|
||||
|
||||
reset(): void;
|
||||
|
||||
consume(): void;
|
||||
|
||||
LA(offset: number): string;
|
||||
|
||||
LT(offset: number): string;
|
||||
|
||||
mark(): number;
|
||||
|
||||
release(marker: any): number;
|
||||
|
||||
seek(index: number): void;
|
||||
|
||||
getText(start: number, stop: number): string;
|
||||
|
||||
toString(): string;
|
||||
}
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
import { Token } from './Token';
|
||||
|
||||
export class Interval {
|
||||
readonly length: number;
|
||||
readonly start: number;
|
||||
readonly stop: number;
|
||||
|
||||
constructor(start: number, stop: number);
|
||||
|
||||
contains(item: number): boolean;
|
||||
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export class IntervalSet {
|
||||
readonly readOnly: boolean;
|
||||
readonly intervals: Interval[];
|
||||
readonly length: boolean;
|
||||
|
||||
first(): number;
|
||||
|
||||
addOne(v: number): void;
|
||||
|
||||
addRange(l: number, h: number): void;
|
||||
|
||||
addInterval(interval: Interval): void;
|
||||
|
||||
addSet(other: IntervalSet): void;
|
||||
|
||||
reduce(k: number): void;
|
||||
|
||||
complement(start: number, stop: number): IntervalSet;
|
||||
|
||||
contains(item: number): boolean;
|
||||
|
||||
removeRange(interval: Interval): boolean;
|
||||
|
||||
removeOne(v: number): boolean;
|
||||
|
||||
toString(literalNames?: string[], symbolicNames?: string[], elemsAreChar?: boolean): string;
|
||||
|
||||
toCharString(): string;
|
||||
|
||||
toIndexString(): string;
|
||||
|
||||
toTokenString(literalNames: string[], symbolicNames: string[]): string;
|
||||
|
||||
elementName(literalNames: string[], symbolicNames: string[], token: Token): string;
|
||||
}
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
import { Recognizer } from './Recognizer';
|
||||
import { Token } from './Token';
|
||||
import { RecognitionException } from './error/Errors';
|
||||
|
||||
export class Lexer extends Recognizer {
|
||||
inputStream: any;
|
||||
sourceName: any;
|
||||
type: any;
|
||||
line: any;
|
||||
column: any;
|
||||
text: string;
|
||||
|
||||
reset(): void;
|
||||
|
||||
nextToken(): Token;
|
||||
|
||||
skip(): void;
|
||||
|
||||
more(): void;
|
||||
|
||||
pushMode(mode: any): void;
|
||||
|
||||
popMode(): any;
|
||||
|
||||
emitToken(): void;
|
||||
|
||||
emit(): Token;
|
||||
|
||||
emitEOF(): Token;
|
||||
|
||||
charIndex(): number;
|
||||
|
||||
getAllTokens(): Token[];
|
||||
|
||||
notifyListeners(e: RecognitionException): void;
|
||||
|
||||
getErrorDisplay(s: string): string;
|
||||
|
||||
getErrorDisplayForChar(c: string): string;
|
||||
|
||||
getCharErrorDisplay(c: string): string;
|
||||
|
||||
recover(re: RecognitionException): void;
|
||||
|
||||
static readonly DEFAULT_MODE: number;
|
||||
static readonly MORE: number;
|
||||
static readonly SKIP: number;
|
||||
static readonly DEFAULT_TOKEN_CHANNEL: any;
|
||||
static readonly HIDDEN: any;
|
||||
static readonly MIN_CHAR_VALUE: number;
|
||||
static readonly MAX_CHAR_VALUE: number;
|
||||
}
|
||||
Vendored
+90
@@ -0,0 +1,90 @@
|
||||
import { CommonTokenStream } from './CommonTokenStream';
|
||||
import { Recognizer } from './Recognizer';
|
||||
import { Token } from './Token';
|
||||
import { ParseTreeListener } from './tree/Tree';
|
||||
import { Lexer } from './Lexer';
|
||||
import { InputStream } from './InputStream';
|
||||
import { ParserRuleContext } from './ParserRuleContext';
|
||||
import { ErrorStrategy } from './error/ErrorStrategy';
|
||||
|
||||
export class Parser extends Recognizer {
|
||||
constructor(input: CommonTokenStream);
|
||||
|
||||
buildParseTrees: boolean;
|
||||
|
||||
_errHandler: ErrorStrategy;
|
||||
|
||||
reset(): void;
|
||||
|
||||
match(): Token;
|
||||
|
||||
matchWildcard(): Token;
|
||||
|
||||
getParseListeners(): ParseTreeListener[];
|
||||
|
||||
addParseListener(lister: ParseTreeListener): void;
|
||||
|
||||
removeParseListener(lister: ParseTreeListener): void;
|
||||
|
||||
removeParseListeners(): void;
|
||||
|
||||
triggerEnterRuleEvent(): void;
|
||||
|
||||
triggerExitRuleEvent(): void;
|
||||
|
||||
getTokenFactory(): any;
|
||||
|
||||
setTokenFactory(factory: any): void;
|
||||
|
||||
getATNWithBypassAlts(): any;
|
||||
|
||||
compileParseTreePattern(pattern: any, patternRuleIndex: any, lexer: Lexer): any;
|
||||
|
||||
getInputStream(): InputStream;
|
||||
|
||||
getTokenStream(): any;
|
||||
|
||||
setTokenStream(stream: any): any;
|
||||
|
||||
getCurrentToken(): Token;
|
||||
|
||||
notifyErrorListeners(msg: string, offendingToken: Token, err: any): void;
|
||||
|
||||
consume(): any;
|
||||
|
||||
addContextToParseTree(): any;
|
||||
|
||||
enterRule(localCtx: ParserRuleContext, state: any, ruleIndex: number): void;
|
||||
|
||||
exitRule(): void;
|
||||
|
||||
enterOuterAlt(): void;
|
||||
|
||||
getPrecedence(): any;
|
||||
|
||||
enterRecursionRule(localCtx: ParserRuleContext, state: any, ruleIndex: any, precedence: any): void;
|
||||
|
||||
pushNewRecursionContext(localCtx: ParserRuleContext, state: any, ruleIndex: any, precedence: any): void;
|
||||
|
||||
unrollRecursionContexts(parentCtx: ParserRuleContext): void;
|
||||
|
||||
getInvokingContext(ruleIndex: number): any;
|
||||
|
||||
isExpectedToken(symbol: Token): boolean;
|
||||
|
||||
getExpectedTokens(): Token[];
|
||||
|
||||
getExpectedTokensWithinCurrentRule(): Token[];
|
||||
|
||||
getRuleIndex(ruleName: string): number;
|
||||
|
||||
getRuleInvocationStack(p: any): any;
|
||||
|
||||
getDFAStrings(): any;
|
||||
|
||||
dumpDFA(): void;
|
||||
|
||||
getSourceName(): any;
|
||||
|
||||
setTrace(trace: boolean): void;
|
||||
}
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
import { RuleContext } from './RuleContext';
|
||||
import { Token } from './Token';
|
||||
import { ErrorNode, ParseTreeListener } from './tree/Tree';
|
||||
import { Interval } from './IntervalSet';
|
||||
import { RecognitionException } from './error/Errors';
|
||||
|
||||
export class ParserRuleContext extends RuleContext {
|
||||
readonly start: Token;
|
||||
readonly stop: Token;
|
||||
readonly ruleIndex: number;
|
||||
readonly exception: RecognitionException;
|
||||
|
||||
constructor(parent: any, invokingState: number);
|
||||
|
||||
copyFrom(ctx: any): void;
|
||||
|
||||
enterRule(listener: ParseTreeListener): void;
|
||||
|
||||
exitRule(listener: ParseTreeListener): void;
|
||||
|
||||
addChild(child: any): any;
|
||||
|
||||
removeLastChild(): void;
|
||||
|
||||
addTokenNode(token: Token): Token;
|
||||
|
||||
addErrorNode(badToken: Token): ErrorNode;
|
||||
|
||||
getChild(i: number, type?: any): any;
|
||||
|
||||
getToken(ttype: number, i: number): Token;
|
||||
|
||||
getTokens(ttype: number): Token[];
|
||||
|
||||
getTypedRuleContext(cxtType: any, i: number): any;
|
||||
|
||||
getTypedRuleContexts(cxtType: any): any[];
|
||||
|
||||
getChildCount(): number;
|
||||
|
||||
getSourceInterval(): Interval;
|
||||
|
||||
static readonly EMPTY: ParserRuleContext;
|
||||
}
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
import { ErrorListener, ProxyErrorListener } from './error/ErrorListener';
|
||||
import { Token } from './Token';
|
||||
import { ParserRuleContext } from './ParserRuleContext';
|
||||
|
||||
export class Recognizer {
|
||||
state: number;
|
||||
|
||||
checkVersion(toolVersion: number): void;
|
||||
|
||||
addErrorListener(listener: ErrorListener): void;
|
||||
|
||||
removeErrorListeners(): void;
|
||||
|
||||
getTokenTypeMap(): any;
|
||||
|
||||
getRuleIndexMap(): any;
|
||||
|
||||
getTokenType(tokenName: string): any;
|
||||
|
||||
getErrorHeader(e: any): string;
|
||||
|
||||
getTokenErrorDisplay(t: Token): string;
|
||||
|
||||
getErrorListenerDispatch(): ProxyErrorListener;
|
||||
|
||||
sempred(localCtx: ParserRuleContext, ruleIndex: number, actionIndex: number): boolean;
|
||||
|
||||
precpred(localCtx: ParserRuleContext, precedence: any): boolean;
|
||||
}
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
import { ParseTreeVisitor, RuleNode } from './tree/Tree';
|
||||
import { Interval } from './IntervalSet';
|
||||
import { ParserRuleContext } from './ParserRuleContext';
|
||||
|
||||
export class RuleContext extends RuleNode {
|
||||
readonly invokingState: number;
|
||||
readonly parentCtx: ParserRuleContext;
|
||||
|
||||
constructor(parent: any, invokingState: number);
|
||||
|
||||
depth(): number;
|
||||
|
||||
isEmpty(): boolean;
|
||||
|
||||
getSourceInterval(): Interval;
|
||||
|
||||
getRuleContext(): RuleContext;
|
||||
|
||||
getPayload(): RuleContext;
|
||||
|
||||
getText(): string;
|
||||
|
||||
getAltNumber(): number;
|
||||
|
||||
setAltNumber(altNumber: number): void;
|
||||
|
||||
getChild(i: number): any;
|
||||
|
||||
getChildCount(): number;
|
||||
|
||||
accept(visitor: ParseTreeVisitor): void;
|
||||
|
||||
toStringTree(ruleNames: string[], recog: any): string;
|
||||
}
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
export class Token {
|
||||
readonly text: string;
|
||||
source: any;
|
||||
type: any;
|
||||
channel: any;
|
||||
start: number;
|
||||
stop: number;
|
||||
tokenIndex: number;
|
||||
line: number;
|
||||
column: number;
|
||||
|
||||
getTokenSource(): any;
|
||||
|
||||
getInputStream(): any;
|
||||
|
||||
static readonly INVALID_TYPE: number;
|
||||
static readonly EPSILON: number;
|
||||
static readonly MIN_USER_TOKEN_TYPE: number;
|
||||
static readonly EOF: number;
|
||||
static readonly HIDDEN_CHANNEL: number;
|
||||
}
|
||||
|
||||
export class CommonToken extends Token {
|
||||
constructor(source: any, type: any, channel: any, start: number, stop: number);
|
||||
|
||||
clone(): Token;
|
||||
|
||||
toString(): string;
|
||||
|
||||
static readonly EMPTY_SOURCE: any;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
+15
@@ -0,0 +1,15 @@
|
||||
import { Recognizer } from '../Recognizer';
|
||||
import { Token } from '../Token';
|
||||
|
||||
export class ErrorListener {
|
||||
syntaxError(recognizer: Recognizer, offendingSymbol: Token, line: number, column: number, msg: string, e: any): void;
|
||||
reportAmbiguity(recognizer: Recognizer, dfa: any, startIndex: number, stopIndex: number, exact: any, ambigAlts: any, configs: any): void;
|
||||
reportAttemptingFullContext(recognizer: Recognizer, dfa: any, startIndex: number, stopIndex: number, conflictingAlts: any, configs: any): void;
|
||||
reportContextSensitivity(recognizer: Recognizer, dfa: any, startIndex: number, stopIndex: number, conflictingAlts: any, configs: any): void;
|
||||
}
|
||||
|
||||
export class ConsoleErrorListener extends ErrorListener {
|
||||
}
|
||||
|
||||
export class ProxyErrorListener extends ErrorListener {
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { Recognizer } from '../Recognizer';
|
||||
|
||||
export class ErrorStrategy {
|
||||
reset(recognizer: Recognizer): void;
|
||||
|
||||
recoverInline(recognizer: Recognizer): void;
|
||||
|
||||
recover(recognizer: Recognizer, e: Error): void;
|
||||
|
||||
sync(recognizer: Recognizer): void;
|
||||
|
||||
inErrorRecoveryMode(recognizer: Recognizer): void;
|
||||
|
||||
reportError(recognizer: Recognizer): void;
|
||||
}
|
||||
|
||||
export class DefaultErrorStrategy extends ErrorStrategy {
|
||||
}
|
||||
|
||||
export class BailErrorStrategy extends ErrorStrategy {
|
||||
}
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
import { ParserRuleContext } from '../ParserRuleContext';
|
||||
import { Recognizer } from '../Recognizer';
|
||||
import { InputStream } from '../InputStream';
|
||||
import { Token } from '../Token';
|
||||
|
||||
export class RecognitionException extends Error {
|
||||
message: string;
|
||||
ctx: ParserRuleContext;
|
||||
recognizer: Recognizer;
|
||||
input: InputStream;
|
||||
offendingToken: Token;
|
||||
offendingState: -1;
|
||||
getExpectedTokens(): Token[];
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export class LexerNoViableAltException extends RecognitionException {
|
||||
}
|
||||
|
||||
export class NoViableAltException extends RecognitionException {
|
||||
}
|
||||
|
||||
export class InputMismatchException extends RecognitionException {
|
||||
}
|
||||
|
||||
export class FailedPredicateException extends RecognitionException {
|
||||
}
|
||||
|
||||
export class ParseCancellationException extends RecognitionException {
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
export * from './ErrorListener';
|
||||
export * from './ErrorStrategy';
|
||||
export * from './Errors';
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// Type definitions for antlr4 4.7
|
||||
// Project: https://github.com/antlr/antlr4
|
||||
// Definitions by: Marlon Chatman <https://github.com/mcchatman8009>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
export * from './Lexer';
|
||||
export * from './Parser';
|
||||
export * from './Recognizer';
|
||||
export * from './ParserRuleContext';
|
||||
export * from './IntervalSet';
|
||||
export * from './CommonTokenStream';
|
||||
export * from './InputStream';
|
||||
export * from './Token';
|
||||
import { ParserRuleContext } from './ParserRuleContext';
|
||||
|
||||
export type AntlrRule = ParserRuleContext;
|
||||
Vendored
+80
@@ -0,0 +1,80 @@
|
||||
import { Interval } from '../IntervalSet';
|
||||
import { Token } from '../Token';
|
||||
import { ParserRuleContext } from '../ParserRuleContext';
|
||||
|
||||
export const INVALID_INTERVAL: Interval;
|
||||
|
||||
export class ParseTree {
|
||||
}
|
||||
|
||||
export class RuleNode extends ParseTree {
|
||||
}
|
||||
|
||||
export class TerminalNode implements ParseTree {
|
||||
constructor(symbol: Token);
|
||||
|
||||
getChild(i: number): any;
|
||||
|
||||
getSymbol(): Token;
|
||||
|
||||
getParent(): any;
|
||||
|
||||
getPayload(): Token;
|
||||
|
||||
getSourceInterval(): Interval;
|
||||
|
||||
getChildCount(): number;
|
||||
|
||||
accept(visitor: ParseTreeVisitor): any;
|
||||
|
||||
getText(): string;
|
||||
|
||||
toString(): string;
|
||||
|
||||
readonly parentCtx: any;
|
||||
readonly symbol: Token;
|
||||
}
|
||||
|
||||
export class ErrorNode extends TerminalNode {
|
||||
}
|
||||
|
||||
export class ParseTreeVisitor {
|
||||
visit(ctx: ParserRuleContext): any;
|
||||
|
||||
visitChildren(ctx: ParserRuleContext): any;
|
||||
|
||||
visitTerminal(node: TerminalNode): any;
|
||||
|
||||
visitErrorNode(node: ErrorNode): any;
|
||||
}
|
||||
|
||||
export interface ParseTreeListener {
|
||||
visitTerminal(node: TerminalNode): void;
|
||||
|
||||
visitErrorNode(node: ErrorNode): void;
|
||||
|
||||
enterEveryRule(node: ParserRuleContext): void;
|
||||
|
||||
exitEveryRule(node: ParserRuleContext): void;
|
||||
}
|
||||
|
||||
export class TerminalNodeImpl extends TerminalNode {
|
||||
}
|
||||
|
||||
export class ErrorNodeImpl extends TerminalNode {
|
||||
constructor(token: Token);
|
||||
|
||||
isErrorNode(): boolean;
|
||||
|
||||
accept(visitor: ParseTreeVisitor): any;
|
||||
}
|
||||
|
||||
export class ParseTreeWalker {
|
||||
static readonly DEFAULT: ParseTreeWalker;
|
||||
|
||||
walk(listener: ParseTreeListener, rule: any): void;
|
||||
|
||||
enterRule(listener: ParseTreeListener, rule: any): void;
|
||||
|
||||
exitRule(listener: ParseTreeListener, rule: any): void;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"error/ErrorListener.d.ts",
|
||||
"error/Errors.d.ts",
|
||||
"error/ErrorStrategy.d.ts",
|
||||
"error/index.d.ts",
|
||||
"tree/Tree.d.ts",
|
||||
"antlr4-tests.ts",
|
||||
"BufferedTokenStream.d.ts",
|
||||
"CommonTokenStream.d.ts",
|
||||
"index.d.ts",
|
||||
"InputStream.d.ts",
|
||||
"IntervalSet.d.ts",
|
||||
"Lexer.d.ts",
|
||||
"Parser.d.ts",
|
||||
"ParserRuleContext.d.ts",
|
||||
"Recognizer.d.ts",
|
||||
"RuleContext.d.ts",
|
||||
"Token.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { createUploadLink, ReactNativeFile } from "apollo-upload-client";
|
||||
|
||||
new ReactNativeFile({
|
||||
name: "its coming home",
|
||||
type: "its coming",
|
||||
uri: "football's coming home",
|
||||
});
|
||||
|
||||
createUploadLink({
|
||||
fetch: (uri, options) => fetch(`http://localhost/${uri}`, options),
|
||||
fetchOptions: { method: "GET" },
|
||||
headers: { special: "Special header value" },
|
||||
includeExtensions: true,
|
||||
uri: "http://localhost",
|
||||
credentials: "beepboop",
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// Type definitions for apollo-upload-client 8.1
|
||||
// Project: https://github.com/jaydenseric/apollo-upload-client#readme
|
||||
// Definitions by: Edward Sammut Alessi <https://github.com/Slessi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import { ApolloLink } from "apollo-link";
|
||||
import { HttpOptions } from "apollo-link-http-common";
|
||||
|
||||
export { ReactNativeFile } from "extract-files";
|
||||
|
||||
/**
|
||||
* `createUploadLink` options match `createHttpLink` options
|
||||
* @param linkOptions `HttpOptions`
|
||||
*/
|
||||
export function createUploadLink(linkOptions?: HttpOptions): ApolloLink;
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"apollo-link": "^1.0.0",
|
||||
"apollo-link-http-common": "^0.2.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6", "dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"apollo-upload-client-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+3275
-1490
File diff suppressed because it is too large
Load Diff
Vendored
+101
-24
@@ -1,4 +1,4 @@
|
||||
// Type definitions for ArcGIS API for JavaScript 3.24
|
||||
// Type definitions for ArcGIS API for JavaScript 3.25
|
||||
// Project: https://developers.arcgis.com/javascript/3/
|
||||
// Definitions by: Esri <https://github.com/Esri>
|
||||
// Bjorn Svensson <https://github.com/bsvensson>
|
||||
@@ -45,7 +45,6 @@ declare module "esri" {
|
||||
import PrintTemplate = require("esri/tasks/PrintTemplate");
|
||||
import QueryTask = require("esri/tasks/QueryTask");
|
||||
import DataProviderGE = require("esri/dijit/geoenrichment/ReportPlayer/DataProviderGE");
|
||||
import PlayerResizeModes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes");
|
||||
import PlayerThemes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerThemes");
|
||||
import TextSymbol = require("esri/symbols/TextSymbol");
|
||||
import StandardGeographyQueryTask = require("esri/tasks/geoenrichment/StandardGeographyQueryTask");
|
||||
@@ -1896,14 +1895,29 @@ declare module "esri" {
|
||||
values: number[];
|
||||
}
|
||||
export interface ReportPlayerOptions {
|
||||
/** Indicates whether left and right arrows key can be used to paginate when viewMode is set to PlayerViewModes.PANELS_IN_SLIDES. */
|
||||
allowKeyboardNavigation?: boolean;
|
||||
/** Specifies which export options are available for the report. */
|
||||
dataProvider?: DataProviderGE;
|
||||
/** Indicate whether to display the report in slide view or full screen, defaults to false which is full view. */
|
||||
isSlidesView?: boolean;
|
||||
/** Specifies how the ReportPlayer should zoom by default. */
|
||||
defaultZoomBehavior?: string;
|
||||
/** Indicates whether interactive experience for panels should be enabled. */
|
||||
enableDataDrilling?: boolean;
|
||||
/** Specifies the resize mode of the ReportPlayer. */
|
||||
resizeMode?: PlayerResizeModes;
|
||||
resizeMode?: string;
|
||||
/** If true, indicates that panels should scale to fit the window. */
|
||||
scaleSlidesToFitWindow?: boolean;
|
||||
/** Indicates whether the analysis area title will be shown in the toolbar. */
|
||||
showAreaTitle?: boolean;
|
||||
/** Indicates whether the toolbar will be shown in a compact popup view. */
|
||||
showToolbarInPopup?: boolean;
|
||||
/** Specifies the theme of the ReportPlayer. */
|
||||
theme?: PlayerThemes;
|
||||
/**
|
||||
* Specifies the display of the report in full page view, slide view, or stacked panel view.
|
||||
* @deprecated
|
||||
*/
|
||||
viewMode?: string;
|
||||
}
|
||||
export interface RingBufferOptions {
|
||||
/** The radii to use to create ring buffers */
|
||||
@@ -7549,22 +7563,45 @@ declare module "esri/dijit/geoenrichment/ReportPlayer/PlayerThemes" {
|
||||
export = PlayerThemes;
|
||||
}
|
||||
|
||||
declare module "esri/dijit/geoenrichment/ReportPlayer/PlayerViewModes" {
|
||||
/** An enumerator of available view modes displaying the Report Player. */
|
||||
class PlayerViewModes {
|
||||
/** Displays one full page at a time. */
|
||||
static FULL_PAGES: any;
|
||||
/** Panels will be shown in the slides view mode. */
|
||||
static PANELS_IN_SLIDES: any;
|
||||
/** Panels will be shown in a single stack. */
|
||||
static PANELS_IN_STACK: any;
|
||||
}
|
||||
export = PlayerViewModes;
|
||||
}
|
||||
|
||||
declare module "esri/dijit/geoenrichment/ReportPlayer/ReportPlayer" {
|
||||
import esri = require("esri");
|
||||
import DataProviderGE = require("esri/dijit/geoenrichment/ReportPlayer/DataProviderGE");
|
||||
import PlayerResizeModes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes");
|
||||
import PlayerThemes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerThemes");
|
||||
|
||||
/** The ReportPlayer widget runs infographic report templates for a provided analysis area. */
|
||||
class ReportPlayer {
|
||||
/** Indicates whether left and right arrows key can be used to paginate when viewMode is set to PlayerViewModes.PANELS_IN_SLIDES. */
|
||||
allowKeyboardNavigation: boolean;
|
||||
/** Data Provider for the ReportPlayer which allows you to specify which export options are available when running the report. */
|
||||
dataProvider: DataProviderGE;
|
||||
/** Indicate whether to display the report in slide view or full screen, defaults to false which is full view. */
|
||||
isSlidesView: boolean;
|
||||
/** Specifies how the ReportPlayer should zoom by default. */
|
||||
defaultZoomBehavior: string;
|
||||
/** Indicates whether interactive experience for panels should be enabled. */
|
||||
enableDataDrilling: boolean;
|
||||
/** Specifies the resize mode of the ReportPlayer. */
|
||||
resizeModes: PlayerResizeModes;
|
||||
resizeMode: string;
|
||||
/** If true, indicates that panels should scale to fit the window. */
|
||||
scaleSlidesToFitWindow: boolean;
|
||||
/** Indicates whether the analysis area title will be shown in the toolbar. */
|
||||
showAreaTitle: boolean;
|
||||
/** Indicates whether the toolbar will be shown in a compact popup view. */
|
||||
showToolbarInPopup: boolean;
|
||||
/** Specifies the theme of the ReportPlayer. */
|
||||
theme: PlayerThemes;
|
||||
theme: string;
|
||||
/** Specifies the display of the report in full page view, slide view, or stacked panel view. */
|
||||
viewMode: string;
|
||||
/**
|
||||
* Creates a new ReportPlayer dijit using the given DOM node.
|
||||
* @param params Various parameters that can be used to configure the ReportPlayer.
|
||||
@@ -7577,6 +7614,22 @@ declare module "esri/dijit/geoenrichment/ReportPlayer/ReportPlayer" {
|
||||
* @param playParams See the object specifications table below for the structure of the playParams object.
|
||||
*/
|
||||
playReport(dataProviderParams: any, playParams?: any): any;
|
||||
/**
|
||||
* Sets the width and height of the ReportPlayer when resizeMode is set to PlayerResizeModes.MANUAL.
|
||||
* @param width The width in pixels.
|
||||
* @param height The height in pixels.
|
||||
*/
|
||||
resize(width?: number, height?: number): any;
|
||||
/**
|
||||
* Sets the maximum height for the Report Player.
|
||||
* @param number The height in pixels.
|
||||
*/
|
||||
setMaxHeight(number: number): number;
|
||||
/**
|
||||
* Sets the maximum width for the Report Player.
|
||||
* @param number The width in pixels.
|
||||
*/
|
||||
setMaxWidth(number: number): number;
|
||||
}
|
||||
export = ReportPlayer;
|
||||
}
|
||||
@@ -11463,6 +11516,8 @@ declare module "esri/layers/VectorTileLayer" {
|
||||
|
||||
/** A VectorTileLayer renders cached tiles of data. */
|
||||
class VectorTileLayer extends Layer {
|
||||
/** The current style information of the VectorTileLayer. */
|
||||
currentStyleInfo: any;
|
||||
/** The full extent of the layer. */
|
||||
fullExtent: Extent;
|
||||
/** The initial extent of the layer. */
|
||||
@@ -11608,7 +11663,7 @@ declare module "esri/layers/WCSLayer" {
|
||||
import Point = require("esri/geometry/Point");
|
||||
import Layer = require("esri/layers/layer");
|
||||
|
||||
/** (Currently in beta) The WCSLayer works with OGC Web Coverage Services. */
|
||||
/** The WCSLayer works with OGC Web Coverage Services. */
|
||||
class WCSLayer {
|
||||
/** Resamples pixel by bilinear interpolation. */
|
||||
static INTERPOLATION_BILINEAR: any;
|
||||
@@ -12566,7 +12621,7 @@ declare module "esri/opsdashboard/DataSourceProxy" {
|
||||
import Query = require("esri/tasks/query");
|
||||
import Graphic = require("esri/graphic");
|
||||
|
||||
/** DataSourceProxy is a proxy class that represents a operations dashboard data source. */
|
||||
/** (Currently in Mature Support) DataSourceProxy is a proxy class that represents a operations dashboard data source. */
|
||||
class DataSourceProxy {
|
||||
/** Read-only: The name of the display field. */
|
||||
displayFieldName: string;
|
||||
@@ -12634,7 +12689,7 @@ declare module "esri/opsdashboard/ExtensionBase" {
|
||||
import esri = require("esri");
|
||||
import MapWidgetProxy = require("esri/opsdashboard/MapWidgetProxy");
|
||||
|
||||
/** ExtensionBase is a base class used by all the extension proxies. */
|
||||
/** (Currently in Mature Support) ExtensionBase is a base class used by all the extension proxies. */
|
||||
class ExtensionBase {
|
||||
/** "circle" */
|
||||
static CIRCLE: any;
|
||||
@@ -12712,7 +12767,7 @@ declare module "esri/opsdashboard/ExtensionBase" {
|
||||
declare module "esri/opsdashboard/ExtensionConfigurationBase" {
|
||||
import ExtensionBase = require("esri/opsdashboard/ExtensionBase");
|
||||
|
||||
/** ExtensionConfigurationBase is a base class used by all the extension configuration proxies. */
|
||||
/** (Currently in Mature Support) ExtensionConfigurationBase is a base class used by all the extension configuration proxies. */
|
||||
class ExtensionConfigurationBase extends ExtensionBase {
|
||||
/** The object that will store the Widget/MapTool/FeatureAction configuration. */
|
||||
config: any;
|
||||
@@ -12728,7 +12783,7 @@ declare module "esri/opsdashboard/ExtensionConfigurationBase" {
|
||||
declare module "esri/opsdashboard/FeatureActionConfigurationProxy" {
|
||||
import ExtensionConfigurationBase = require("esri/opsdashboard/ExtensionConfigurationBase");
|
||||
|
||||
/** FeatureActionConfigurationProxy is a class used to provide the configuration user experience for an operations dashboard extension feature action. */
|
||||
/** (Currently in Mature Support) FeatureActionConfigurationProxy is a class used to provide the configuration user experience for an operations dashboard extension feature action. */
|
||||
class FeatureActionConfigurationProxy extends ExtensionConfigurationBase {
|
||||
}
|
||||
export = FeatureActionConfigurationProxy;
|
||||
@@ -12738,7 +12793,7 @@ declare module "esri/opsdashboard/FeatureActionFeatures" {
|
||||
import DataSourceProxy = require("esri/opsdashboard/DataSourceProxy");
|
||||
import Graphic = require("esri/graphic");
|
||||
|
||||
/** FeatureActionFeatures is a specialized collection of features used by WidgetProxy to hold the collection of features for the associated feature actions. */
|
||||
/** (Currently in Mature Support) FeatureActionFeatures is a specialized collection of features used by WidgetProxy to hold the collection of features for the associated feature actions. */
|
||||
class FeatureActionFeatures {
|
||||
/** The DataSourceProxy from which the collection of features belongs to. */
|
||||
dataSourceProxy: DataSourceProxy;
|
||||
@@ -12782,7 +12837,7 @@ declare module "esri/opsdashboard/GraphicsLayerProxy" {
|
||||
import Renderer = require("esri/renderers/Renderer");
|
||||
import Graphic = require("esri/graphic");
|
||||
|
||||
/** GraphicsLayerProxy is a proxy class that represents a graphics layer in a map widget in the host application. */
|
||||
/** (Currently in Mature Support) GraphicsLayerProxy is a proxy class that represents a graphics layer in a map widget in the host application. */
|
||||
class GraphicsLayerProxy {
|
||||
/** Read-only: The current host graphics layer maximum visible scale. */
|
||||
maxScale: number;
|
||||
@@ -12843,7 +12898,7 @@ declare module "esri/opsdashboard/GraphicsLayerProxy" {
|
||||
declare module "esri/opsdashboard/MapToolConfigurationProxy" {
|
||||
import ExtensionConfigurationBase = require("esri/opsdashboard/ExtensionConfigurationBase");
|
||||
|
||||
/** MapToolConfigurationProxy is a class used to provide the configuration user experience for an operations dashboard extension map tool. */
|
||||
/** (Currently in Mature Support) MapToolConfigurationProxy is a class used to provide the configuration user experience for an operations dashboard extension map tool. */
|
||||
class MapToolConfigurationProxy extends ExtensionConfigurationBase {
|
||||
}
|
||||
export = MapToolConfigurationProxy;
|
||||
@@ -12854,7 +12909,7 @@ declare module "esri/opsdashboard/MapToolProxy" {
|
||||
import MapWidgetProxy = require("esri/opsdashboard/MapWidgetProxy");
|
||||
import Geometry = require("esri/geometry/Geometry");
|
||||
|
||||
/** MapToolProxy is a class used to define an operations dashboard extension map tool. */
|
||||
/** (Currently in Mature Support) MapToolProxy is a class used to define an operations dashboard extension map tool. */
|
||||
class MapToolProxy {
|
||||
/** Read-only: The available size for the map tool user experience on the host map widget. */
|
||||
availableDisplaySize: number;
|
||||
@@ -12907,7 +12962,7 @@ declare module "esri/opsdashboard/MapWidgetProxy" {
|
||||
import Point = require("esri/geometry/Point");
|
||||
import Extent = require("esri/geometry/Extent");
|
||||
|
||||
/** MapWidgetProxy is a proxy class that represents a operations dashboard map widget. */
|
||||
/** (Currently in Mature Support) MapWidgetProxy is a proxy class that represents a operations dashboard map widget. */
|
||||
class MapWidgetProxy {
|
||||
/** Read-only: The map id. */
|
||||
id: string;
|
||||
@@ -12954,7 +13009,7 @@ declare module "esri/opsdashboard/WidgetConfigurationProxy" {
|
||||
import DataSourceProxy = require("esri/opsdashboard/DataSourceProxy");
|
||||
import MapWidgetProxy = require("esri/opsdashboard/MapWidgetProxy");
|
||||
|
||||
/** WidgetConfigurationProxy is a class used to provide the configuration user experience for an operations dashboard extension widget. */
|
||||
/** (Currently in Mature Support) WidgetConfigurationProxy is a class used to provide the configuration user experience for an operations dashboard extension widget. */
|
||||
class WidgetConfigurationProxy extends ExtensionConfigurationBase {
|
||||
/**
|
||||
* Called by the host application when the user has changed the selected data source in the data source selector.
|
||||
@@ -12990,7 +13045,7 @@ declare module "esri/opsdashboard/WidgetProxy" {
|
||||
import Graphic = require("esri/graphic");
|
||||
import Geometry = require("esri/geometry/Geometry");
|
||||
|
||||
/** WidgetProxy is a class used to define an operations dashboard extension widget. */
|
||||
/** (Currently in Mature Support) WidgetProxy is a class used to define an operations dashboard extension widget. */
|
||||
class WidgetProxy extends ExtensionBase {
|
||||
/** Read-only: If the widget was configured to consume data sources, the dataSourceConfig array will hold a collection of dataSourceConfig objects. */
|
||||
dataSourceConfigs: any[];
|
||||
@@ -13051,7 +13106,7 @@ declare module "esri/opsdashboard/featureActionProxy" {
|
||||
import DataSourceProxy = require("esri/opsdashboard/DataSourceProxy");
|
||||
import FeatureSet = require("esri/tasks/FeatureSet");
|
||||
|
||||
/** featureActionProxy is a singleton object that allows implementing an operations dashboard Feature Action extension. */
|
||||
/** (Currently in Mature Support) featureActionProxy is a singleton object that allows implementing an operations dashboard Feature Action extension. */
|
||||
class featureActionProxy extends ExtensionBase {
|
||||
/** Event raised when the feature action should execute for a set of features. */
|
||||
on(type: "execute", listener: (event: { config: any; dataSourceProxy: DataSourceProxy; featureSet: FeatureSet; target: featureActionProxy }) => void): esri.Handle;
|
||||
@@ -13903,6 +13958,11 @@ declare module "esri/renderers/smartMapping" {
|
||||
* @param params See the Object Specifications table below for the structure of the params object.
|
||||
*/
|
||||
createPredominanceRenderer(params: any): any;
|
||||
/**
|
||||
* Creates a renderer for exploring the relationship between two numeric attributes.
|
||||
* @param params See the object specifications table below for the structure of the params object.
|
||||
*/
|
||||
createRelationshipRenderer(params: any): any;
|
||||
/**
|
||||
* Defines the size of the symbol where feature size is proportional to data value.
|
||||
* @param params See the object specifications table below for the structure of the params object.
|
||||
@@ -15776,6 +15836,8 @@ declare module "esri/tasks/ImageServiceIdentifyParameters" {
|
||||
class ImageServiceIdentifyParameters {
|
||||
/** Input geometry that defines the location to be identified. */
|
||||
geometry: Geometry;
|
||||
/** If the returnCatalogItems parameter is set to true, this parameter will take effect. */
|
||||
maxItemCount: number;
|
||||
/** Specifies the mosaic rules defining the image sorting order. */
|
||||
mosaicRule: MosaicRule;
|
||||
/** The pixel or RGB color value representing no information. */
|
||||
@@ -15794,6 +15856,8 @@ declare module "esri/tasks/ImageServiceIdentifyParameters" {
|
||||
returnCatalogItems: boolean;
|
||||
/** When true, each feature in the catalog items includes the geometry. */
|
||||
returnGeometry: boolean;
|
||||
/** If true, returns the pixel values of all mosaicked raster catalog items under the requested geometry. */
|
||||
returnPixelValues: boolean;
|
||||
/** Specify a time extent. */
|
||||
timeExtent: TimeExtent;
|
||||
/** Creates a new ImageServiceIdentifyParameters object. */
|
||||
@@ -18456,3 +18520,16 @@ declare module "esri/workers/WorkerClient" {
|
||||
export = WorkerClient;
|
||||
}
|
||||
|
||||
declare module "sri/dijit/geoenrichment/ReportPlayer/PlayerZoomBehaviors" {
|
||||
/** Enumerator of available zoom behavior options for the ReportPlayer. */
|
||||
class PlayerZoomBehaviors {
|
||||
/** The Report Player zooms in to fit a full page in the viewable area. */
|
||||
static FIT_PAGE: any;
|
||||
/** The Report Player zooms to fit the full page's width in the viewable area. */
|
||||
static FIT_PAGE_WIDTH: any;
|
||||
/** The zoom will be set to 100% (not zoomed). */
|
||||
static RESET: any;
|
||||
}
|
||||
export = PlayerZoomBehaviors;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,3 +67,15 @@ archiver.use(() => {});
|
||||
archiver.finalize();
|
||||
|
||||
archiver.symlink('./path', './target');
|
||||
|
||||
function fakeHandler(err: Archiver.ArchiverError) {
|
||||
console.log(err.code);
|
||||
console.log(err.message);
|
||||
console.log(err.stack);
|
||||
console.log(err.data);
|
||||
}
|
||||
|
||||
const fakeError = new Archiver.ArchiverError('code', 'foo');
|
||||
|
||||
archiver.on('error', fakeHandler);
|
||||
archiver.on('warning', fakeHandler);
|
||||
|
||||
Vendored
+24
@@ -24,9 +24,26 @@ declare namespace archiver {
|
||||
mode?: number;
|
||||
}
|
||||
|
||||
interface ProgressData {
|
||||
entries: {
|
||||
total: number;
|
||||
processed: number;
|
||||
};
|
||||
fs: {
|
||||
totalBytes: number;
|
||||
processedBytes: number;
|
||||
};
|
||||
}
|
||||
|
||||
/** A function that lets you either opt out of including an entry (by returning false), or modify the contents of an entry as it is added (by returning an EntryData) */
|
||||
type EntryDataFunction = (entry: EntryData) => false | EntryData;
|
||||
|
||||
class ArchiverError extends Error {
|
||||
code: string; // Since archiver format support is modular, we cannot enumerate all possible error codes, as the modules can throw arbitrary ones.
|
||||
data: any;
|
||||
constructor(code: string, data: any);
|
||||
}
|
||||
|
||||
interface Archiver extends stream.Transform {
|
||||
abort(): this;
|
||||
append(source: stream.Readable | Buffer | string, name?: EntryData): this;
|
||||
@@ -44,6 +61,13 @@ declare namespace archiver {
|
||||
use(plugin: Function): this;
|
||||
|
||||
symlink(filepath: string, target: string): this;
|
||||
|
||||
on(event: 'error' | 'warning', listener: (error: ArchiverError) => void): this;
|
||||
on(event: 'data', listener: (data: EntryData) => void): this;
|
||||
on(event: 'progress', listener: (progress: ProgressData) => void): this;
|
||||
on(event: 'close' | 'drain' | 'finish', listener: () => void): this;
|
||||
on(event: 'pipe' | 'unpipe', listener: (src: stream.Readable) => void): this;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
type ArchiverOptions = CoreOptions & TransformOptions & ZipOptions & TarOptions;
|
||||
|
||||
Vendored
+1
-4
@@ -2,10 +2,7 @@
|
||||
// Project: https://github.com/Asana/node-asana
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="bluebird" />
|
||||
|
||||
// TypeScript Version: 2.8
|
||||
import * as Promise from 'bluebird';
|
||||
|
||||
declare namespace asana {
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import asap = require("asap");
|
||||
import rawAsap = require("asap/raw");
|
||||
|
||||
class Callable {
|
||||
call(): void {
|
||||
"'Callable' invoked";
|
||||
}
|
||||
}
|
||||
function f(): void {
|
||||
"'f' invoked";
|
||||
}
|
||||
|
||||
// $ExpectType void
|
||||
asap(f);
|
||||
|
||||
// $ExpectType void
|
||||
asap((): void => {
|
||||
"'arrow' invoked";
|
||||
});
|
||||
|
||||
// $ExpectType void
|
||||
asap(new Callable());
|
||||
|
||||
// $ExpectType void
|
||||
rawAsap(f);
|
||||
|
||||
// $ExpectType void
|
||||
rawAsap((): void => {
|
||||
"'arrow' invoked";
|
||||
});
|
||||
|
||||
// $ExpectType void
|
||||
rawAsap(new Callable());
|
||||
|
||||
// $ExpectType void
|
||||
rawAsap.requestFlush();
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// Type definitions for asap 2.0
|
||||
// Project: https://github.com/kriskowal/asap
|
||||
// Definitions by: fpascutti <https://github.com/fpascutti>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface Task {
|
||||
call(...args: any[]): any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a task as soon as possible.
|
||||
* @param task Function or any object that implements `call()`.
|
||||
*/
|
||||
declare function asap(task: Task): void;
|
||||
export = asap;
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
interface Task {
|
||||
call(...args: any[]): any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a task as soon as possible.
|
||||
* @param task Function or any object that implements `call()`.
|
||||
*/
|
||||
declare function rawAsap(task: Task): void;
|
||||
declare namespace rawAsap {
|
||||
/**
|
||||
* Flushes the event queue.
|
||||
*/
|
||||
function requestFlush(): void;
|
||||
}
|
||||
export = rawAsap;
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"asap-tests.ts",
|
||||
"index.d.ts",
|
||||
"raw.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { Settings } from "./settings";
|
||||
|
||||
declare class CrowdApi {
|
||||
settings: Settings;
|
||||
constructor(settings: Settings);
|
||||
request(method: string, path: string, data?: any): Promise<any>;
|
||||
log(...args: any[]): void;
|
||||
}
|
||||
|
||||
export = CrowdApi;
|
||||
@@ -0,0 +1,44 @@
|
||||
import CrowdClient = require("atlassian-crowd-client");
|
||||
import Attributes = require("atlassian-crowd-client/lib/models/attributes");
|
||||
import Group = require("atlassian-crowd-client/lib/models/group");
|
||||
import Session = require("atlassian-crowd-client/lib/models/session");
|
||||
import User = require("atlassian-crowd-client/lib/models/user");
|
||||
|
||||
// Initialize the Crowd client:
|
||||
const crowd = new CrowdClient({
|
||||
baseUrl: "https://crowd.example.com/",
|
||||
application: {
|
||||
name: "demo",
|
||||
password: "example"
|
||||
}
|
||||
});
|
||||
|
||||
// Create a new user:
|
||||
crowd.user.create(new User("John", "Doe", "John Doe", "johndoe@example.com", "johndoe", "secret"));
|
||||
// Remove
|
||||
crowd.user.remove("johndoe");
|
||||
|
||||
// Authenticate to Crowd:
|
||||
crowd.session.create("someusername", "somepassword").then((session: Session) => {
|
||||
// Fetch the user profile:
|
||||
crowd.session.getUser(session.token).then((user: User) => {
|
||||
console.log("Hello, " + user.displayname);
|
||||
});
|
||||
});
|
||||
|
||||
// Find all active groups (using Crowd Query Language):
|
||||
crowd.search.group("active=true").then((groups: string[] | Group[]) => {
|
||||
console.log("Found groups: " + groups.length);
|
||||
});
|
||||
|
||||
const group = new Group("testgroup1", "Test group");
|
||||
|
||||
const attributes = new Attributes({
|
||||
foo: "Foo",
|
||||
bar: ["Bar", "Baz"],
|
||||
obj: { a: "A" }
|
||||
});
|
||||
|
||||
crowd.group.attributes.set(group.groupname, attributes).then(() => {
|
||||
console.log("Group attribute is set.");
|
||||
});
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
// Type definitions for atlassian-crowd-client 2.0
|
||||
// Project: https://github.com/ghengeveld/atlassian-crowd-client
|
||||
// Definitions by: mtgto <https://github.com/mtgto>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import CrowdApi = require("./api");
|
||||
import { Settings } from "./settings";
|
||||
import Attributes = require("./lib/models/attributes");
|
||||
import Group = require("./lib/models/group");
|
||||
import User = require("./lib/models/user");
|
||||
import Session = require("./lib/models/session");
|
||||
import ValidationFactors = require("./lib/models/validation-factors");
|
||||
|
||||
export = CrowdClient;
|
||||
declare class CrowdClient extends CrowdApi {
|
||||
settings: Settings;
|
||||
|
||||
constructor(settings: Settings);
|
||||
|
||||
user: {
|
||||
get: (username: string, withAttributes?: boolean) => Promise<User>;
|
||||
create: (user: User) => Promise<User>;
|
||||
update: (username: string, user: User) => Promise<User>;
|
||||
rename: (oldname: string, newname: string) => Promise<void>;
|
||||
remove: (username: string) => Promise<void>;
|
||||
attributes: {
|
||||
list: (username: string) => Promise<Attributes>;
|
||||
set: (username: string, attributes: Attributes) => Promise<Attributes>;
|
||||
remove: (username: string, attributename: string) => Promise<void>;
|
||||
password: {
|
||||
set: (username: string, password: string) => Promise<void>;
|
||||
reset: (username: string) => Promise<void>;
|
||||
};
|
||||
username: {
|
||||
request: (email: string) => Promise<void>;
|
||||
};
|
||||
};
|
||||
groups: {
|
||||
get: (username: string, groupname: string, nested?: boolean) => Promise<string>;
|
||||
list: (username: string, nested?: boolean, startIndex?: number, maxResults?: number) => Promise<string[]>;
|
||||
add: (username: string, groupname: string) => Promise<void>;
|
||||
remove: (username: string, groupname: string) => Promise<void>;
|
||||
};
|
||||
};
|
||||
group: {
|
||||
get: (groupname: string, withAttributes?: boolean) => Promise<Group>;
|
||||
create: (group: Group) => Promise<Group>;
|
||||
update: (groupname: string, group: Group) => Promise<Group>;
|
||||
remove: (groupname: string) => Promise<void>;
|
||||
attributes: {
|
||||
list: (groupname: string) => Promise<Attributes>;
|
||||
set: (groupname: string, attributes: Attributes) => Promise<Attributes>;
|
||||
remove: (groupname: string, attributename: string) => Promise<void>;
|
||||
};
|
||||
users: {
|
||||
get: (groupname: string, username: string, nested?: boolean) => Promise<string>;
|
||||
list: (
|
||||
groupname: string,
|
||||
nested?: boolean,
|
||||
startIndex?: number,
|
||||
maxResults?: number,
|
||||
expand?: boolean,
|
||||
) => Promise<string[] | User[]>;
|
||||
add: (groupname: string, username: string) => Promise<void>;
|
||||
remove: (groupname: string, username: string) => Promise<void>;
|
||||
};
|
||||
parents: {
|
||||
get: (groupname: string, parentname: string, nested?: boolean) => Promise<string>;
|
||||
list: (groupname: string, nested?: boolean, startIndex?: number, maxResults?: number) => Promise<string[]>;
|
||||
add: (groupname: string, parentname: string) => Promise<void>;
|
||||
};
|
||||
children: {
|
||||
get: (groupname: string, childname: string, nested?: boolean) => Promise<string>;
|
||||
list: (groupname: string, nested?: boolean, startIndex?: number, maxResults?: number) => Promise<string[]>;
|
||||
add: (groupname: string, childname: string) => Promise<void>;
|
||||
remove: (groupname: string, childname: string) => Promise<void>;
|
||||
};
|
||||
membership: () => Promise<string>;
|
||||
};
|
||||
authentication: {
|
||||
authenticate: (username: string, password: string) => Promise<User>;
|
||||
};
|
||||
search: {
|
||||
user: (
|
||||
restriction: string,
|
||||
expand?: boolean,
|
||||
startIndex?: number,
|
||||
maxResults?: number,
|
||||
) => Promise<string[] | User[]>;
|
||||
group: (
|
||||
restriction: string,
|
||||
expand?: boolean,
|
||||
startIndex?: number,
|
||||
maxResults?: number,
|
||||
) => Promise<string[] | Group[]>;
|
||||
};
|
||||
session: {
|
||||
getUser: (token: string) => Promise<User>;
|
||||
validate: (token: string, validationFactors?: ValidationFactors) => Promise<Session>;
|
||||
create: (
|
||||
username: string,
|
||||
password: string,
|
||||
validationFactors?: ValidationFactors,
|
||||
duration?: number,
|
||||
) => Promise<Session>;
|
||||
createUnvalidated: (
|
||||
username: string,
|
||||
validationFactors?: ValidationFactors,
|
||||
duration?: number,
|
||||
) => Promise<Session>;
|
||||
remove: (token: string) => Promise<void>;
|
||||
removeAll: (username: string, exclude?: string) => Promise<void>;
|
||||
};
|
||||
config: {
|
||||
cookie: () => Promise<any>;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export = Attributes;
|
||||
declare class Attributes {
|
||||
readonly attributes: {[name: string]: any};
|
||||
|
||||
constructor(attributePairs: {[name: string]: any});
|
||||
toCrowd(stringify?: (attr: any) => string): any;
|
||||
static fromCrowd(attributesArr: ReadonlyArray<{name: string}>, parse?: (json: string) => any): Attributes;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
export = Group;
|
||||
declare class Group {
|
||||
readonly groupname: string;
|
||||
readonly description: string;
|
||||
readonly active: boolean;
|
||||
readonly attributes?: any;
|
||||
|
||||
constructor(groupname: string, description?: string, active?: boolean, attributes?: any);
|
||||
toCrowd(): GroupObj;
|
||||
static fromCrowd(obj: {name: string, description?: string, active?: boolean, attributes: any}): Group;
|
||||
}
|
||||
|
||||
interface GroupObj {
|
||||
readonly type: "GROUP";
|
||||
readonly name: string;
|
||||
readonly description: string;
|
||||
readonly active: boolean;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
export = Session;
|
||||
declare class Session {
|
||||
readonly token: string;
|
||||
readonly createdAt: Date;
|
||||
readonly expiresAt: Date;
|
||||
|
||||
constructor(token: string, createdAt: Date, expiresAt: Date);
|
||||
toCrowd(): SessionObj;
|
||||
static fromCrowd(obj: SessionObj): Session;
|
||||
}
|
||||
|
||||
interface SessionObj {
|
||||
readonly token: string;
|
||||
readonly "created-date": number;
|
||||
readonly "expiry-date": number;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
export = User;
|
||||
declare class User {
|
||||
readonly firstname: string;
|
||||
readonly lastname: string;
|
||||
readonly displayname: string;
|
||||
readonly email: string;
|
||||
readonly username: string;
|
||||
readonly password?: string;
|
||||
readonly active: boolean;
|
||||
readonly attributes: {[key: string]: any};
|
||||
|
||||
constructor(firstname: string, lastname: string, displayname: string, email: string, username: string, password?: string, active?: boolean, attributes?: any);
|
||||
toCrowd(): UserObj;
|
||||
static fromCrowd(userObj: UserObj): User;
|
||||
}
|
||||
|
||||
interface UserObj {
|
||||
readonly "name": string;
|
||||
readonly "first-name": string;
|
||||
readonly "last-name": string;
|
||||
readonly "display-name": string;
|
||||
readonly "email": string;
|
||||
readonly "active": boolean;
|
||||
readonly "password"?: { value: string };
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
export = ValidationFactors;
|
||||
declare class ValidationFactors {
|
||||
readonly validationFactors: any;
|
||||
|
||||
constructor(validationFactorPairs: any);
|
||||
toCrowd(): ValidationFactorsObj;
|
||||
static fromCrowd(validationFactorsObj: ValidationFactorsObj): ValidationFactors;
|
||||
}
|
||||
|
||||
interface ValidationFactorsObj {
|
||||
validationFactors: any[];
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
export interface Settings {
|
||||
readonly baseUrl: string;
|
||||
readonly application: {
|
||||
readonly name: string;
|
||||
readonly password: string;
|
||||
}
|
||||
readonly nesting?: boolean;
|
||||
readonly sessionTimeout?: number;
|
||||
readonly debug?: boolean;
|
||||
readonly attributesParser?: (json: string) => any;
|
||||
readonly attributesEncoder?: (obj: any) => string;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"atlassian-crowd-client-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+1
-1
@@ -2,6 +2,6 @@
|
||||
// Project: https://git.coolaj86.com/coolaj86/atob.js.git
|
||||
// Definitions by: John Wright <https://github.com/johngeorgewright>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
export default function(str: string): string;
|
||||
|
||||
Vendored
+2
-2
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/auth0/node-auth0
|
||||
// Definitions by: Wilson Hobbs <https://github.com/wbhob>, Seth Westphal <https://github.com/westy92>, Amiram Korach <https://github.com/amiram>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as Promise from 'bluebird';
|
||||
|
||||
@@ -264,7 +264,7 @@ export interface CreateClientGrant {
|
||||
scope: string[];
|
||||
}
|
||||
|
||||
export type Strategy =
|
||||
export type Strategy =
|
||||
'ad' | 'adfs' | 'amazon' | 'dropbox' | 'bitbucket' | 'aol' | 'auth0-adldap' | 'auth0-oidc' |
|
||||
'auth0' | 'baidu' | 'bitly' | 'box' | 'custom' | 'daccount' | 'dwolla' | 'email' |
|
||||
'evernote-sandbox' | 'evernote' | 'exact' | 'facebook' | 'fitbit' | 'flickr' | 'github' |
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
import autoBind = require("auto-bind");
|
||||
|
||||
const emptyConfig: autoBind.AutoBindOptions = {};
|
||||
const onlyIncludeInConfig: autoBind.AutoBindOptions = {
|
||||
include: []
|
||||
};
|
||||
const onlyExcludeInConfig: autoBind.AutoBindOptions = {
|
||||
exclude: []
|
||||
};
|
||||
const emptyArraysInConfig: autoBind.AutoBindOptions = {
|
||||
include: [],
|
||||
exclude: []
|
||||
};
|
||||
const regexConfig: autoBind.AutoBindOptions = {
|
||||
include: [/test[123]/],
|
||||
exclude: [/test[123]/, /^regex[123]$/]
|
||||
};
|
||||
const stringConfig: autoBind.AutoBindOptions = {
|
||||
include: ["test"],
|
||||
exclude: ["123", "abc"]
|
||||
};
|
||||
const mixConfig: autoBind.AutoBindOptions = {
|
||||
include: ["test", /test[123]/],
|
||||
exclude: ["123", /test[123]/]
|
||||
};
|
||||
|
||||
class TestConfigs {
|
||||
constructor() {
|
||||
// no config
|
||||
autoBind(this);
|
||||
autoBind.react(this);
|
||||
|
||||
// empty configs
|
||||
autoBind(this, emptyConfig);
|
||||
autoBind.react(this, emptyConfig);
|
||||
|
||||
// include only configs
|
||||
autoBind(this, onlyIncludeInConfig);
|
||||
autoBind.react(this, onlyIncludeInConfig);
|
||||
|
||||
// exclude only configs
|
||||
autoBind(this, onlyExcludeInConfig);
|
||||
autoBind.react(this, onlyExcludeInConfig);
|
||||
|
||||
// empty array configs
|
||||
autoBind(this, emptyArraysInConfig);
|
||||
autoBind.react(this, emptyArraysInConfig);
|
||||
|
||||
// regex configs
|
||||
autoBind(this, regexConfig);
|
||||
autoBind.react(this, regexConfig);
|
||||
|
||||
// string configs
|
||||
autoBind(this, stringConfig);
|
||||
autoBind.react(this, stringConfig);
|
||||
|
||||
// mix configs
|
||||
autoBind(this, mixConfig);
|
||||
autoBind.react(this, mixConfig);
|
||||
}
|
||||
|
||||
shutUpNoUnnecessaryClass() {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for auto-bind 1.2
|
||||
// Project: https://github.com/sindresorhus/auto-bind#readme
|
||||
// Definitions by: Sindre Seppola <https://github.com/sseppola>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
declare namespace autoBind {
|
||||
interface AutoBindOptions {
|
||||
include?: Array<string | RegExp>;
|
||||
exclude?: Array<string | RegExp>;
|
||||
}
|
||||
|
||||
type AutoBindFunction<selfT = object> = (
|
||||
self: selfT,
|
||||
options?: AutoBindOptions
|
||||
) => selfT;
|
||||
}
|
||||
|
||||
interface AutoBindModule<selfT = object>
|
||||
extends autoBind.AutoBindFunction<selfT> {
|
||||
react: autoBind.AutoBindFunction<selfT>;
|
||||
}
|
||||
|
||||
declare const autoBind: AutoBindModule;
|
||||
export = autoBind;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es5"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"auto-bind-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -398,7 +398,10 @@ namespace v1Changes {
|
||||
namespace Collection {
|
||||
function test_fetch() {
|
||||
var collection = new EmployeeCollection;
|
||||
collection.fetch({ reset: true });
|
||||
collection.fetch({
|
||||
reset: true,
|
||||
remove: false
|
||||
});
|
||||
}
|
||||
|
||||
function test_create() {
|
||||
|
||||
Vendored
+4
-2
@@ -1,6 +1,8 @@
|
||||
// Type definitions for Backbone 1.3.3
|
||||
// Project: http://backbonejs.org/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov>, Natan Vivo <https://github.com/nvivo>
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov>
|
||||
// Natan Vivo <https://github.com/nvivo>
|
||||
// kenjiru <https://github.com/kenjiru>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -76,7 +78,7 @@ declare namespace Backbone {
|
||||
interface ModelDestroyOptions extends Waitable, PersistenceOptions {
|
||||
}
|
||||
|
||||
interface CollectionFetchOptions extends PersistenceOptions, Parseable {
|
||||
interface CollectionFetchOptions extends PersistenceOptions, Parseable, CollectionSetOptions {
|
||||
reset?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import { BarbellWeight } from "barbellweights";
|
||||
|
||||
let calculator: BarbellWeight;
|
||||
let results: any;
|
||||
|
||||
calculator = new BarbellWeight(200, "bench press");
|
||||
results = calculator.getResults();
|
||||
|
||||
calculator = new BarbellWeight(500, "deadlift");
|
||||
results = calculator.getResults();
|
||||
|
||||
calculator = new BarbellWeight(400, "squat");
|
||||
results = calculator.getResults();
|
||||
|
||||
calculator = new BarbellWeight(400, "deadlift", { program: "QUARTER" });
|
||||
results = calculator.getResults();
|
||||
|
||||
calculator = new BarbellWeight(400, "deadlift", { bar: 45 });
|
||||
results = calculator.getResults();
|
||||
|
||||
calculator = new BarbellWeight(400, "deadlift", { plates: [45, 10, 5] });
|
||||
results = calculator.getResults();
|
||||
|
||||
calculator = new BarbellWeight(400, "deadlift", { warmup_round_to: 5 });
|
||||
results = calculator.getResults();
|
||||
|
||||
calculator = new BarbellWeight(300, "squat", {
|
||||
program: "STARTING_STRENGTH",
|
||||
bar: 45,
|
||||
plates: [45, 25, 10, 5],
|
||||
warmup_round_to: 5
|
||||
});
|
||||
results = calculator.getResults();
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// Type definitions for barbellweights 0.4
|
||||
// Project: https://github.com/toddhibbs/barbellweight#readme
|
||||
// Definitions by: evelijn <https://github.com/evelijn>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface options {
|
||||
program?: string;
|
||||
bar?: number;
|
||||
plates?: number[];
|
||||
warmup_round_to?: number;
|
||||
}
|
||||
|
||||
export class BarbellWeight {
|
||||
constructor(workingWeight: number, lift: string, options?: options);
|
||||
getResults(): any;
|
||||
}
|
||||
|
||||
export namespace BarbellWeight {
|
||||
namespace BarbellWeight {
|
||||
function getResults(): void;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"barbellweights-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference types="bluebird" />
|
||||
|
||||
import tape = require('blue-tape');
|
||||
import P = require('bluebird');
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/spion/blue-tape
|
||||
// Definitions by: Haoqun Jiang <https://github.com/sodatea>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/petkaantonov/bluebird
|
||||
// Definitions by: d-ph <https://github.com/d-ph>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
/*
|
||||
* 1. Why use `bluebird-global` instead of `bluebird`?
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/// <reference types="bluebird-global" />
|
||||
/// <reference types="jquery" />
|
||||
|
||||
// Pulls in bluebird-global to test compatibility.
|
||||
// Fixes https://github.com/DefinitelyTyped/DefinitelyTyped/issues/26328.
|
||||
@@ -19,6 +19,7 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"bluebird-global-tests.ts"
|
||||
"bluebird-global-tests.ts",
|
||||
"test/jquery-tests.ts"
|
||||
]
|
||||
}
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/jut-io/bluebird-retry
|
||||
// Definitions by: Pascal Vomhoff <https://github.com/pvomhoff>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import Promise = require('bluebird');
|
||||
|
||||
|
||||
@@ -590,25 +590,39 @@ obj = fooProm.toJSON();
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
barProm = fooArrProm.spread<Bar>((one: Foo, two: Bar, twotwo: Foo) => {
|
||||
barProm = fooArrProm.spread((one: Foo, two: Foo, twotwo: Foo) => {
|
||||
return bar;
|
||||
});
|
||||
|
||||
// - - - - - - - - - - - - - - - - -
|
||||
|
||||
barProm = fooArrProm.spread<Bar>((one: Foo, two: Bar, twotwo: Foo) => {
|
||||
barProm = fooArrProm.spread((one: Foo, two: Foo, twotwo: Foo) => {
|
||||
return barThen;
|
||||
});
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// TODO fix collection inference
|
||||
fooArrProm = fooArrProm.all();
|
||||
|
||||
// $ExpectType Bluebird<never>
|
||||
fooProm.all();
|
||||
|
||||
barArrProm = fooProm.all<Bar>();
|
||||
fooInspectionPromise = fooProm.reflect();
|
||||
barProm = fooProm.any<Bar>();
|
||||
barArrProm = fooProm.some<Bar>(num);
|
||||
barProm = fooProm.race<Bar>();
|
||||
|
||||
fooProm = fooArrProm.any();
|
||||
|
||||
// $ExpectType Bluebird<never>
|
||||
fooProm.any();
|
||||
|
||||
fooArrProm = fooArrProm.some(num);
|
||||
|
||||
// $ExpectType Bluebird<never>
|
||||
fooProm.some(num);
|
||||
|
||||
fooProm = fooArrProm.race();
|
||||
|
||||
// $ExpectType Bluebird<never>
|
||||
fooProm.race();
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
@@ -649,21 +663,19 @@ Promise.all([fooProm, barProm, fooProm]).then(result => {
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// TODO fix collection inference
|
||||
|
||||
barArrProm = fooArrProm.map<Foo, Bar>((item: Foo, index: number, arrayLength: number) => {
|
||||
barArrProm = fooArrProm.map((item: Foo, index: number, arrayLength: number) => {
|
||||
return bar;
|
||||
});
|
||||
barArrProm = fooArrProm.map<Foo, Bar>((item: Foo) => {
|
||||
barArrProm = fooArrProm.map((item: Foo) => {
|
||||
return bar;
|
||||
});
|
||||
|
||||
barArrProm = fooArrProm.map<Foo, Bar>((item: Foo, index: number, arrayLength: number) => {
|
||||
barArrProm = fooArrProm.map((item: Foo, index: number, arrayLength: number) => {
|
||||
return bar;
|
||||
}, {
|
||||
concurrency: 1
|
||||
});
|
||||
barArrProm = fooArrProm.map<Foo, Bar>((item: Foo) => {
|
||||
barArrProm = fooArrProm.map((item: Foo) => {
|
||||
return bar;
|
||||
}, {
|
||||
concurrency: 1
|
||||
@@ -671,37 +683,37 @@ barArrProm = fooArrProm.map<Foo, Bar>((item: Foo) => {
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
barArrProm = fooArrProm.mapSeries<Foo, Bar>((item: Foo, index: number, arrayLength: number) => {
|
||||
barArrProm = fooArrProm.mapSeries((item: Foo, index: number, arrayLength: number) => {
|
||||
return bar;
|
||||
});
|
||||
barArrProm = fooArrProm.mapSeries<Foo, Bar>((item: Foo) => {
|
||||
barArrProm = fooArrProm.mapSeries((item: Foo) => {
|
||||
return bar;
|
||||
});
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
barProm = fooArrProm.reduce<Foo, Bar>((memo: Bar, item: Foo, index: number, arrayLength: number) => {
|
||||
barProm = fooArrProm.reduce((memo: Bar, item: Foo, index: number, arrayLength: number) => {
|
||||
return memo;
|
||||
});
|
||||
barProm = fooArrProm.reduce<Foo, Bar>((memo: Bar, item: Foo) => {
|
||||
barProm = fooArrProm.reduce((memo: Bar, item: Foo) => {
|
||||
return memo;
|
||||
}, bar);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
fooArrProm = fooArrProm.filter<Foo>((item: Foo, index: number, arrayLength: number) => {
|
||||
fooArrProm = fooArrProm.filter((item: Foo, index: number, arrayLength: number) => {
|
||||
return bool;
|
||||
});
|
||||
fooArrProm = fooArrProm.filter<Foo>((item: Foo) => {
|
||||
fooArrProm = fooArrProm.filter((item: Foo) => {
|
||||
return bool;
|
||||
});
|
||||
|
||||
fooArrProm = fooArrProm.filter<Foo>((item: Foo, index: number, arrayLength: number) => {
|
||||
fooArrProm = fooArrProm.filter((item: Foo, index: number, arrayLength: number) => {
|
||||
return bool;
|
||||
}, {
|
||||
concurrency: 1
|
||||
});
|
||||
fooArrProm = fooArrProm.filter<Foo>((item: Foo) => {
|
||||
fooArrProm = fooArrProm.filter((item: Foo) => {
|
||||
return bool;
|
||||
}, {
|
||||
concurrency: 1
|
||||
@@ -709,10 +721,10 @@ fooArrProm = fooArrProm.filter<Foo>((item: Foo) => {
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
fooArrProm = fooArrProm.each<Foo, Bar>((item: Foo): Bar => bar);
|
||||
fooArrProm = fooArrProm.each<Foo, Bar>((item: Foo, index: number): Bar => index ? bar : null);
|
||||
fooArrProm = fooArrProm.each<Foo, Bar>((item: Foo, index: number, arrayLength: number): Bar => bar);
|
||||
fooArrProm = fooArrProm.each<Foo, Bar>((item: Foo, index: number, arrayLength: number): Promise<Bar> => barProm);
|
||||
fooArrProm = fooArrProm.each((item: Foo): Bar => bar);
|
||||
fooArrProm = fooArrProm.each((item: Foo, index: number): Bar => index ? bar : null);
|
||||
fooArrProm = fooArrProm.each((item: Foo, index: number, arrayLength: number): Bar => bar);
|
||||
fooArrProm = fooArrProm.each((item: Foo, index: number, arrayLength: number): Promise<Bar> => barProm);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
Vendored
+13
-19
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/petkaantonov/bluebird
|
||||
// Definitions by: Leonard Hecker <https://github.com/lhecker>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
/*!
|
||||
* The code following this comment originates from:
|
||||
@@ -36,6 +36,8 @@
|
||||
*/
|
||||
|
||||
type CatchFilter<E> = (new (...args: any[]) => E) | ((error: E) => boolean) | (object & E);
|
||||
type IterableItem<R> = R extends Iterable<infer U> ? U : never;
|
||||
type IterableOrNever<R> = R extends Iterable<any> ? R : never;
|
||||
|
||||
declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
|
||||
/**
|
||||
@@ -453,14 +455,12 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
|
||||
/**
|
||||
* Like calling `.then`, but the fulfillment value or rejection reason is assumed to be an array, which is flattened to the formal parameters of the handlers.
|
||||
*/
|
||||
spread<U, W>(fulfilledHandler: (...values: W[]) => U | PromiseLike<U>): Bluebird<U>;
|
||||
spread<U>(fulfilledHandler: (...args: any[]) => U | PromiseLike<U>): Bluebird<U>;
|
||||
spread<U>(fulfilledHandler: (...values: Array<IterableItem<R>>) => U | PromiseLike<U>): Bluebird<U>;
|
||||
|
||||
/**
|
||||
* Same as calling `Promise.all(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
|
||||
*/
|
||||
// TODO type inference from array-resolving promise?
|
||||
all<U>(): Bluebird<U[]>;
|
||||
all(): Bluebird<IterableOrNever<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.
|
||||
@@ -471,48 +471,42 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
// TODO type inference from array-resolving promise?
|
||||
any<U>(): Bluebird<U>;
|
||||
any(): Bluebird<IterableItem<R>>;
|
||||
|
||||
/**
|
||||
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
|
||||
*/
|
||||
// TODO type inference from array-resolving promise?
|
||||
some<U>(count: number): Bluebird<U[]>;
|
||||
some(count: number): Bluebird<IterableOrNever<R>>;
|
||||
|
||||
/**
|
||||
* Same as calling `Promise.race(thisPromise, count)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
|
||||
*/
|
||||
// TODO type inference from array-resolving promise?
|
||||
race<U>(): Bluebird<U>;
|
||||
race(): Bluebird<IterableItem<R>>;
|
||||
|
||||
/**
|
||||
* Same as calling `Bluebird.map(thisPromise, mapper)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
|
||||
*/
|
||||
// TODO type inference from array-resolving promise?
|
||||
map<Q, U>(mapper: (item: Q, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Bluebird.ConcurrencyOption): Bluebird<U[]>;
|
||||
map<U>(mapper: (item: IterableItem<R>, index: number, arrayLength: number) => U | PromiseLike<U>, options?: Bluebird.ConcurrencyOption): Bluebird<R extends Iterable<any> ? U[] : never>;
|
||||
|
||||
/**
|
||||
* Same as calling `Promise.reduce(thisPromise, Function reducer, initialValue)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
|
||||
*/
|
||||
// TODO type inference from array-resolving promise?
|
||||
reduce<Q, U>(reducer: (memo: U, item: Q, index: number, arrayLength: number) => U | PromiseLike<U>, initialValue?: U): Bluebird<U>;
|
||||
reduce<U>(reducer: (memo: U, item: IterableItem<R>, index: number, arrayLength: number) => U | PromiseLike<U>, initialValue?: U): Bluebird<R extends Iterable<any> ? U : never>;
|
||||
|
||||
/**
|
||||
* Same as calling ``Promise.filter(thisPromise, filterer)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
|
||||
*/
|
||||
// TODO type inference from array-resolving promise?
|
||||
filter<U>(filterer: (item: U, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, options?: Bluebird.ConcurrencyOption): Bluebird<U[]>;
|
||||
filter(filterer: (item: IterableItem<R>, index: number, arrayLength: number) => boolean | PromiseLike<boolean>, options?: Bluebird.ConcurrencyOption): Bluebird<IterableOrNever<R>>;
|
||||
|
||||
/**
|
||||
* Same as calling ``Bluebird.each(thisPromise, iterator)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
|
||||
*/
|
||||
each<R, U>(iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<R[]>;
|
||||
each<U>(iterator: (item: IterableItem<R>, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<IterableOrNever<R>>;
|
||||
|
||||
/**
|
||||
* Same as calling ``Bluebird.mapSeries(thisPromise, iterator)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
|
||||
*/
|
||||
mapSeries<R, U>(iterator: (item: R, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<U[]>;
|
||||
mapSeries<U>(iterator: (item: IterableItem<R>, index: number, arrayLength: number) => U | PromiseLike<U>): Bluebird<R extends Iterable<any> ? U[] : never>;
|
||||
|
||||
/**
|
||||
* Cancel this `promise`. Will not do anything if this promise is already settled or if the cancellation feature has not been enabled
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Project: http://bookshelfjs.org/
|
||||
// Definitions by: Andrew Schurman <https://github.com/arcticwaters>, Vesa Poikajärvi <https://github.com/vesse>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import Knex = require('knex');
|
||||
import knex = require('knex');
|
||||
|
||||
@@ -56,6 +56,10 @@ $("#carousel").carousel({
|
||||
pause: false,
|
||||
});
|
||||
|
||||
$("#carousel").carousel({
|
||||
interval: false,
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Collapse
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
Vendored
+1
-1
@@ -46,7 +46,7 @@ export interface CarouselOption {
|
||||
*
|
||||
* @default 5000
|
||||
*/
|
||||
interval?: number;
|
||||
interval?: false | number;
|
||||
|
||||
/**
|
||||
* Whether the carousel should react to keyboard events.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import * as BPMNModdle from "bpmn-moddle";
|
||||
|
||||
const moddle: BPMNModdle.Moddle = {} as any;
|
||||
|
||||
const element1 = moddle.create("bpmn:UserTask"); // Expect type User Task
|
||||
element1.$type = "bpmn:UserTask"; // Expect to check against type correctly
|
||||
|
||||
const bpmnModdle: BPMNModdle.BPMNModdle = {} as any;
|
||||
|
||||
bpmnModdle.fromXML("", (err, definitions, parseContext) => {
|
||||
err; // type of error
|
||||
definitions; // type of definition
|
||||
parseContext; // type of any
|
||||
});
|
||||
|
||||
const definition: BPMNModdle.Definitions = {} as any;
|
||||
|
||||
// Expect type of process or undefined
|
||||
const maybeProcess = definition.rootElements.find(
|
||||
i => i.$type === "bpmn:Process"
|
||||
);
|
||||
|
||||
// Expect process to have additional typings to base element1
|
||||
const process = maybeProcess as BPMNModdle.Process;
|
||||
Vendored
+1068
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "bpmn-moddle-tests.ts"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -9,7 +9,7 @@ let Long = bson.Long;
|
||||
let doc = { long: Long.fromNumber(100) }
|
||||
|
||||
// Serialize a document
|
||||
let data = BSON.serialize(doc, false, true, false);
|
||||
let data = BSON.serialize(doc);
|
||||
console.log("data:", data);
|
||||
|
||||
// Deserialize the resulting Buffer
|
||||
|
||||
Vendored
+270
-94
@@ -1,4 +1,4 @@
|
||||
// Type definitions for bson 1.0.4
|
||||
// Type definitions for bson 1.0.6
|
||||
// Project: https://github.com/mongodb/js-bson
|
||||
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>
|
||||
// Federico Caselli <https://github.com/CaselIT>
|
||||
@@ -6,34 +6,81 @@
|
||||
|
||||
/// <reference types="node"/>
|
||||
|
||||
interface CommonSerializeOptions {
|
||||
/** {default:false}, the serializer will check if keys are valid. */
|
||||
checkKeys?: boolean;
|
||||
/** {default:false}, serialize the javascript functions. */
|
||||
serializeFunctions?: boolean;
|
||||
/** {default:true}, ignore undefined fields. */
|
||||
ignoreUndefined?: boolean;
|
||||
}
|
||||
|
||||
export interface SerializeOptions extends CommonSerializeOptions {
|
||||
/** {default:1024*1024*17}, minimum size of the internal temporary serialization buffer. */
|
||||
minInternalBufferSize?: number;
|
||||
}
|
||||
|
||||
export interface SerializeWithBufferAndIndexOptions extends CommonSerializeOptions {
|
||||
/** {default:0}, the index in the buffer where we wish to start serializing into. */
|
||||
index?: number;
|
||||
}
|
||||
|
||||
export interface DeserializeOptions {
|
||||
/** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized. */
|
||||
/** {default:false}, evaluate functions in the BSON document scoped to the object deserialized. */
|
||||
evalFunctions?: boolean;
|
||||
/** {Boolean, default:false}, cache evaluated functions for reuse. */
|
||||
/** {default:false}, cache evaluated functions for reuse. */
|
||||
cacheFunctions?: boolean;
|
||||
/** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function. */
|
||||
/** {default:false}, use a crc32 code for caching, otherwise use the string of the function. */
|
||||
cacheFunctionsCrc32?: boolean;
|
||||
/** {Boolean, default:false}, deserialize Binary data directly into node.js Buffer object. */
|
||||
/** {default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits. */
|
||||
promoteLongs?: boolean;
|
||||
/** {default:false}, deserialize Binary data directly into node.js Buffer object. */
|
||||
promoteBuffers?: boolean;
|
||||
/** {default:false}, when deserializing will promote BSON values to their Node.js closest equivalent types. */
|
||||
promoteValues?: boolean;
|
||||
/** {default:null}, allow to specify if there what fields we wish to return as unserialized raw buffer. */
|
||||
fieldsAsRaw?: { readonly [fieldName: string]: boolean };
|
||||
/** {default:false}, return BSON regular expressions as BSONRegExp instances. */
|
||||
bsonRegExp?: boolean;
|
||||
}
|
||||
|
||||
export interface CalculateObjectSizeOptions {
|
||||
/** {Boolean, default:false}, serialize the javascript functions */
|
||||
/** {default:false}, serialize the javascript functions */
|
||||
serializeFunctions?: boolean;
|
||||
/** {Boolean, default:true}, ignore undefined fields. */
|
||||
/** {default:true}, ignore undefined fields. */
|
||||
ignoreUndefined?: boolean;
|
||||
}
|
||||
|
||||
export class BSON {
|
||||
|
||||
/**
|
||||
* @param {Object} object the Javascript object to serialize.
|
||||
* @param {Boolean} checkKeys the serializer will check if keys are valid.
|
||||
* @param {Boolean} asBuffer return the serialized object as a Buffer object (ignore).
|
||||
* @param {Boolean} serializeFunctions serialize the javascript functions (default:false)
|
||||
* @return {Buffer} returns a TypedArray or Array depending on what your browser supports
|
||||
* Serialize a Javascript object.
|
||||
*
|
||||
* @param object The Javascript object to serialize.
|
||||
* @param options Serialize options.
|
||||
* @return The Buffer object containing the serialized object.
|
||||
*/
|
||||
serialize(object: any, checkKeys?: boolean, asBuffer?: boolean, serializeFunctions?: boolean): Buffer;
|
||||
deserialize(buffer: Buffer, options?: DeserializeOptions, isArray?: boolean): any;
|
||||
serialize(object: any, options?: SerializeOptions): Buffer;
|
||||
|
||||
/**
|
||||
* Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.
|
||||
*
|
||||
* @param object The Javascript object to serialize.
|
||||
* @param buffer The Buffer you pre-allocated to store the serialized BSON object.
|
||||
* @param options Serialize options.
|
||||
* @returns The index pointing to the last written byte in the buffer
|
||||
*/
|
||||
serializeWithBufferAndIndex(object: any, buffer: Buffer, options?: SerializeWithBufferAndIndexOptions): number;
|
||||
|
||||
/**
|
||||
* Deserialize data as BSON.
|
||||
*
|
||||
* @param buffer The buffer containing the serialized set of BSON documents.
|
||||
* @param options Deserialize options.
|
||||
* @returns The deserialized Javascript Object.
|
||||
*/
|
||||
deserialize(buffer: Buffer, options?: DeserializeOptions): any;
|
||||
|
||||
/**
|
||||
* Calculate the bson size for a passed in Javascript object.
|
||||
*
|
||||
@@ -42,17 +89,44 @@ export class BSON {
|
||||
* @return {Number} returns the number of bytes the BSON object will take up.
|
||||
*/
|
||||
calculateObjectSize(object: any, options?: CalculateObjectSizeOptions): number;
|
||||
|
||||
/**
|
||||
* Deserialize stream data as BSON documents.
|
||||
*
|
||||
* @param data The buffer containing the serialized set of BSON documents.
|
||||
* @param startIndex The start index in the data Buffer where the deserialization is to start.
|
||||
* @param numberOfDocuments Number of documents to deserialize
|
||||
* @param documents An array where to store the deserialized documents
|
||||
* @param docStartIndex The index in the documents array from where to start inserting documents
|
||||
* @param options Additional options used for the deserialization
|
||||
* @returns The next index in the buffer after deserialization of the `numberOfDocuments`
|
||||
*/
|
||||
deserializeStream(
|
||||
data: Buffer,
|
||||
startIndex: number,
|
||||
numberOfDocuments: number,
|
||||
documents: Array<any>,
|
||||
docStartIndex: number,
|
||||
options?: DeserializeOptions
|
||||
): number;
|
||||
|
||||
}
|
||||
|
||||
/** A class representation of the BSON Binary type. */
|
||||
export class Binary {
|
||||
static SUBTYPE_DEFAULT: number;
|
||||
static SUBTYPE_FUNCTION: number;
|
||||
static SUBTYPE_BYTE_ARRAY: number;
|
||||
static SUBTYPE_UUID_OLD: number;
|
||||
static SUBTYPE_UUID: number;
|
||||
static SUBTYPE_MD5: number;
|
||||
static SUBTYPE_USER_DEFINED: number;
|
||||
|
||||
static readonly SUBTYPE_DEFAULT: number;
|
||||
static readonly SUBTYPE_FUNCTION: number;
|
||||
static readonly SUBTYPE_BYTE_ARRAY: number;
|
||||
static readonly SUBTYPE_UUID_OLD: number;
|
||||
static readonly SUBTYPE_UUID: number;
|
||||
static readonly SUBTYPE_MD5: number;
|
||||
static readonly SUBTYPE_USER_DEFINED: number;
|
||||
|
||||
/**
|
||||
* @param buffer A buffer object containing the binary data
|
||||
* @param subType Binary data subtype
|
||||
*/
|
||||
constructor(buffer: Buffer, subType?: number);
|
||||
|
||||
/** The underlying Buffer which stores the binary data. */
|
||||
@@ -69,80 +143,193 @@ export class Binary {
|
||||
/** Writes a buffer or string to the binary */
|
||||
write(buffer: Buffer | string, offset: number): void;
|
||||
}
|
||||
|
||||
/** A class representation of the BSON Code type. */
|
||||
export class Code {
|
||||
/**
|
||||
* @param code A string or function.
|
||||
* @param scope An optional scope for the function.
|
||||
*/
|
||||
constructor(code: string | Function, scope?: any);
|
||||
}
|
||||
|
||||
/**
|
||||
* A class representation of the BSON DBRef type.
|
||||
* @deprecated
|
||||
*/
|
||||
export class DBRef {
|
||||
/**
|
||||
* @param namespace The collection name.
|
||||
* @param oid The reference ObjectID.
|
||||
* @param db Optional db name, if omitted the reference is local to the current db
|
||||
*/
|
||||
constructor(namespace: string, oid: ObjectID, db?: string);
|
||||
|
||||
namespace: string;
|
||||
oid: ObjectID;
|
||||
db?: string;
|
||||
}
|
||||
|
||||
/** A class representation of the BSON Double type. */
|
||||
export class Double {
|
||||
/**
|
||||
* @param value The number we want to represent as a double.
|
||||
*/
|
||||
constructor(value: number);
|
||||
|
||||
valueOf(): number;
|
||||
}
|
||||
export class Long {
|
||||
static MAX_VALUE: Long;
|
||||
static MIN_VALUE: Long;
|
||||
static NEG_ONE: Long;
|
||||
static ONE: Long;
|
||||
static ZERO: Long;
|
||||
|
||||
static fromInt(i: number): Long;
|
||||
static fromNumber(n: number): Long;
|
||||
static fromBits(lowBits: number, highBits: number): Long;
|
||||
static fromString(s: string, opt_radix?: number): Long;
|
||||
/**
|
||||
* Base class for Long and Timestamp.
|
||||
* In original js-node@1.0.x code 'Timestamp' is a 100% copy-paste of 'Long'
|
||||
* with 'Long' replaced by 'Timestamp' (changed to inheritance in js-node@2.0.0)
|
||||
*/
|
||||
declare class LongLike<T> {
|
||||
|
||||
/**
|
||||
* @param low The low (signed) 32 bits.
|
||||
* @param high The high (signed) 32 bits.
|
||||
*/
|
||||
constructor(low: number, high: number);
|
||||
|
||||
add(other: Long): Long;
|
||||
and(other: Long): Long;
|
||||
compare(other: Long): number;
|
||||
div(other: Long): Long;
|
||||
equals(other: Long): boolean;
|
||||
/** Returns the sum of `this` and the `other`. */
|
||||
add(other: T): T;
|
||||
/** Returns the bitwise-AND of `this` and the `other`. */
|
||||
and(other: T): T;
|
||||
/**
|
||||
* Compares `this` with the given `other`.
|
||||
* @returns 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
|
||||
*/
|
||||
compare(other: T): number;
|
||||
/** Returns `this` divided by the given `other`. */
|
||||
div(other: T): T;
|
||||
/** Return whether `this` equals the `other` */
|
||||
equals(other: T): boolean;
|
||||
/** Return the high 32-bits value. */
|
||||
getHighBits(): number;
|
||||
/** Return the low 32-bits value. */
|
||||
getLowBits(): number;
|
||||
/** Return the low unsigned 32-bits value. */
|
||||
getLowBitsUnsigned(): number;
|
||||
/** Returns the number of bits needed to represent the absolute value of `this`. */
|
||||
getNumBitsAbs(): number;
|
||||
greaterThan(other: Long): number;
|
||||
greaterThanOrEqual(other: Long): number;
|
||||
/** Return whether `this` is greater than the `other`. */
|
||||
greaterThan(other: T): boolean;
|
||||
/** Return whether `this` is greater than or equal to the `other`. */
|
||||
greaterThanOrEqual(other: T): boolean;
|
||||
/** Return whether `this` value is negative. */
|
||||
isNegative(): boolean;
|
||||
/** Return whether `this` value is odd. */
|
||||
isOdd(): boolean;
|
||||
/** Return whether `this` value is zero. */
|
||||
isZero(): boolean;
|
||||
lessThan(other: Long): boolean;
|
||||
lessThanOrEqual(other: Long): boolean;
|
||||
modulo(other: Long): Long;
|
||||
multiply(other: Long): Long;
|
||||
negate(): Long;
|
||||
not(): Long;
|
||||
notEquals(other: Long): boolean;
|
||||
or(other: Long): Long;
|
||||
shiftLeft(other: number): Long;
|
||||
shiftRight(other: number): Long;
|
||||
shiftRightUnsigned(other: number): Long;
|
||||
subtract(other: Long): Long;
|
||||
/** Return whether `this` is less than the `other`. */
|
||||
lessThan(other: T): boolean;
|
||||
/** Return whether `this` is less than or equal to the `other`. */
|
||||
lessThanOrEqual(other: T): boolean;
|
||||
/** Returns `this` modulo the given `other`. */
|
||||
modulo(other: T): T;
|
||||
/** Returns the product of `this` and the given `other`. */
|
||||
multiply(other: T): T;
|
||||
/** The negation of this value. */
|
||||
negate(): T;
|
||||
/** The bitwise-NOT of this value. */
|
||||
not(): T;
|
||||
/** Return whether `this` does not equal to the `other`. */
|
||||
notEquals(other: T): boolean;
|
||||
/** Returns the bitwise-OR of `this` and the given `other`. */
|
||||
or(other: T): T;
|
||||
/**
|
||||
* Returns `this` with bits shifted to the left by the given amount.
|
||||
* @param numBits The number of bits by which to shift.
|
||||
*/
|
||||
shiftLeft(numBits: number): T;
|
||||
/**
|
||||
* Returns `this` with bits shifted to the right by the given amount.
|
||||
* @param numBits The number of bits by which to shift.
|
||||
*/
|
||||
shiftRight(numBits: number): T;
|
||||
/**
|
||||
* Returns `this` with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
|
||||
* @param numBits The number of bits by which to shift.
|
||||
*/
|
||||
shiftRightUnsigned(numBits: number): T;
|
||||
/** Returns the difference of `this` and the given `other`. */
|
||||
subtract(other: T): T;
|
||||
/** Return the int value (low 32 bits). */
|
||||
toInt(): number;
|
||||
/** Return the JSON value. */
|
||||
toJSON(): string;
|
||||
/** Returns closest floating-point representation to `this` value */
|
||||
toNumber(): number;
|
||||
/**
|
||||
* Return as a string
|
||||
* @param radix the radix in which the text should be written. {default:10}
|
||||
*/
|
||||
toString(radix?: number): string;
|
||||
xor(other: Long): Long;
|
||||
/** Returns the bitwise-XOR of `this` and the given `other`. */
|
||||
xor(other: T): T;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A class representation of the BSON Long type, a 64-bit two's-complement
|
||||
* integer value, which faithfully simulates the behavior of a Java "Long". This
|
||||
* implementation is derived from LongLib in GWT.
|
||||
*/
|
||||
export class Long extends LongLike<Long> {
|
||||
|
||||
static readonly MAX_VALUE: Long;
|
||||
static readonly MIN_VALUE: Long;
|
||||
static readonly NEG_ONE: Long;
|
||||
static readonly ONE: Long;
|
||||
static readonly ZERO: Long;
|
||||
|
||||
/** Returns a Long representing the given (32-bit) integer value. */
|
||||
static fromInt(i: number): Long;
|
||||
/** Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. */
|
||||
static fromNumber(n: number): Long;
|
||||
/**
|
||||
* Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
|
||||
* @param lowBits The low 32-bits.
|
||||
* @param highBits The high 32-bits.
|
||||
*/
|
||||
static fromBits(lowBits: number, highBits: number): Long;
|
||||
/**
|
||||
* Returns a Long representation of the given string
|
||||
* @param opt_radix The radix in which the text is written. {default:10}
|
||||
*/
|
||||
static fromString(s: string, opt_radix?: number): Long;
|
||||
|
||||
}
|
||||
|
||||
/** A class representation of the BSON Decimal128 type. */
|
||||
export class Decimal128 {
|
||||
|
||||
/** Create a Decimal128 instance from a string representation. */
|
||||
static fromString(s: string): Decimal128;
|
||||
|
||||
/**
|
||||
* @param bytes A buffer containing the raw Decimal128 bytes.
|
||||
*/
|
||||
constructor(bytes: Buffer);
|
||||
|
||||
toJSON(): string;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** A class representation of the BSON MaxKey type. */
|
||||
export class MaxKey {
|
||||
constructor();
|
||||
}
|
||||
|
||||
/** A class representation of the BSON MinKey type. */
|
||||
export class MinKey {
|
||||
constructor();
|
||||
}
|
||||
|
||||
/** A class representation of the BSON ObjectID type. */
|
||||
export class ObjectID {
|
||||
/**
|
||||
* Create a new ObjectID instance
|
||||
@@ -173,10 +360,10 @@ export class ObjectID {
|
||||
static isValid(id: string | number | ObjectID): boolean;
|
||||
/**
|
||||
* Compares the equality of this ObjectID with `otherID`.
|
||||
* @param {object} otherID ObjectID instance to compare against.
|
||||
* @param {ObjectID|string} otherID ObjectID instance to compare against.
|
||||
* @return {boolean} the result of comparing two ObjectID's
|
||||
*/
|
||||
equals(otherID: ObjectID): boolean;
|
||||
equals(otherID: ObjectID | string): boolean;
|
||||
/**
|
||||
* Generate a 12 byte id string used in ObjectID's
|
||||
* @param {number} time optional parameter allowing to pass in a second based timestamp.
|
||||
@@ -185,7 +372,7 @@ export class ObjectID {
|
||||
generate(time?: number): Buffer;
|
||||
/**
|
||||
* Returns the generation date (accurate up to the second) that this ID was generated.
|
||||
* @return {date} the generation date
|
||||
* @return {Date} the generation date
|
||||
*/
|
||||
getTimestamp(): Date;
|
||||
/**
|
||||
@@ -194,56 +381,45 @@ export class ObjectID {
|
||||
*/
|
||||
toHexString(): string;
|
||||
}
|
||||
|
||||
export { ObjectID as ObjectId };
|
||||
|
||||
/** A class representation of the BSON RegExp type. */
|
||||
export class BSONRegExp {
|
||||
constructor(pattern: string, options: string);
|
||||
}
|
||||
|
||||
/**
|
||||
* A class representation of the BSON Symbol type.
|
||||
* @deprecated
|
||||
*/
|
||||
export class Symbol {
|
||||
constructor(value: string);
|
||||
}
|
||||
export class Timestamp {
|
||||
constructor(low: number, high: number);
|
||||
|
||||
static MAX_VALUE: Timestamp;
|
||||
static MIN_VALUE: Timestamp;
|
||||
static NEG_ONE: Timestamp;
|
||||
static ONE: Timestamp;
|
||||
static ZERO: Timestamp;
|
||||
/** A class representation of the BSON Timestamp type. */
|
||||
export class Timestamp extends LongLike<Timestamp> {
|
||||
|
||||
static fromBits(lowBits: number, highBits: number): Timestamp;
|
||||
static readonly MAX_VALUE: Timestamp;
|
||||
static readonly MIN_VALUE: Timestamp;
|
||||
static readonly NEG_ONE: Timestamp;
|
||||
static readonly ONE: Timestamp;
|
||||
static readonly ZERO: Timestamp;
|
||||
|
||||
/** Returns a Timestamp represented by the given (32-bit) integer value */
|
||||
static fromInt(value: number): Timestamp;
|
||||
/** Returns a Timestamp representing the given number value, provided that it is a finite number. */
|
||||
static fromNumber(value: number): Timestamp;
|
||||
static fromString(str: string, radix?: number): Timestamp;
|
||||
/**
|
||||
* Returns a Timestamp for the given high and low bits. Each is assumed to use 32 bits.
|
||||
* @param lowBits The low 32-bits.
|
||||
* @param highBits The high 32-bits.
|
||||
*/
|
||||
static fromBits(lowBits: number, highBits: number): Timestamp;
|
||||
/**
|
||||
* Returns a Timestamp from the given string.
|
||||
* @param opt_radix The radix in which the text is written. {default:10}
|
||||
*/
|
||||
static fromString(str: string, opt_radix?: number): Timestamp;
|
||||
|
||||
add(other: Timestamp): Timestamp;
|
||||
and(other: Timestamp): Timestamp;
|
||||
compare(other: Timestamp): number;
|
||||
div(other: Timestamp): Timestamp;
|
||||
equals(other: Timestamp): boolean;
|
||||
getHighBits(): number;
|
||||
getLowBits(): number;
|
||||
getLowBitsUnsigned(): number;
|
||||
getNumBitsAbs(): number;
|
||||
greaterThan(other: Timestamp): number;
|
||||
greaterThanOrEqual(other: Timestamp): number;
|
||||
isNegative(): boolean;
|
||||
isOdd(): boolean;
|
||||
isZero(): boolean;
|
||||
lessThan(other: Timestamp): boolean;
|
||||
lessThanOrEqual(other: Timestamp): boolean;
|
||||
modulo(other: Timestamp): Timestamp;
|
||||
multiply(other: Timestamp): Timestamp;
|
||||
negate(): Timestamp;
|
||||
not(): Timestamp;
|
||||
notEquals(other: Timestamp): boolean;
|
||||
or(other: Timestamp): Timestamp;
|
||||
shiftLeft(other: number): Timestamp;
|
||||
shiftRight(other: number): Timestamp;
|
||||
shiftRightUnsigned(other: number): Timestamp;
|
||||
subtract(other: Timestamp): Timestamp;
|
||||
toInt(): number;
|
||||
toJSON(): string;
|
||||
toNumber(): number;
|
||||
toString(radix?: number): string;
|
||||
xor(other: Timestamp): Timestamp;
|
||||
}
|
||||
|
||||
Vendored
+16
-7
@@ -8,7 +8,7 @@
|
||||
// Oleg Repin <https://github.com/iamolegga>
|
||||
// David Koblas <https://github.com/koblas>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as Redis from "ioredis";
|
||||
import * as Promise from "bluebird";
|
||||
@@ -159,11 +159,6 @@ declare namespace Bull {
|
||||
}
|
||||
|
||||
interface RepeatOptions {
|
||||
/**
|
||||
* Cron pattern specifying when the job should execute
|
||||
*/
|
||||
cron: string;
|
||||
|
||||
/**
|
||||
* Timezone
|
||||
*/
|
||||
@@ -180,6 +175,20 @@ declare namespace Bull {
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
interface CronRepeatOptions extends RepeatOptions {
|
||||
/**
|
||||
* Cron pattern specifying when the job should execute
|
||||
*/
|
||||
cron: string;
|
||||
}
|
||||
|
||||
interface EveryRepeatOptions extends RepeatOptions {
|
||||
/**
|
||||
* Repeat every millis (cron setting cannot be used together with this setting.)
|
||||
*/
|
||||
every: number;
|
||||
}
|
||||
|
||||
interface JobOptions {
|
||||
/**
|
||||
* Optional priority value. ranges from 1 (highest priority) to MAX_INT (lowest priority).
|
||||
@@ -201,7 +210,7 @@ declare namespace Bull {
|
||||
/**
|
||||
* Repeat job according to a cron specification
|
||||
*/
|
||||
repeat?: RepeatOptions;
|
||||
repeat?: CronRepeatOptions | EveryRepeatOptions;
|
||||
|
||||
/**
|
||||
* Backoff setting for automatic retries if the job fails
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createAdapter } from "bunyan-winston-adapter";
|
||||
import { Logger, LoggerInstance, transports } from "winston";
|
||||
import { createLogger } from "winston";
|
||||
|
||||
const logger = new Logger();
|
||||
const logger = createLogger();
|
||||
const mapping = {
|
||||
trace: 'silly'
|
||||
};
|
||||
|
||||
+2
-2
@@ -5,6 +5,6 @@
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
import * as bunyan from "bunyan";
|
||||
import { LoggerInstance } from "winston";
|
||||
import { Logger } from "winston";
|
||||
|
||||
export function createAdapter(logger: LoggerInstance, mapping?: any): bunyan;
|
||||
export function createAdapter(logger: Logger, mapping?: any): bunyan;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"winston": "^3.0.0"
|
||||
}
|
||||
}
|
||||
Vendored
+2
@@ -118,6 +118,8 @@ declare namespace CanvasGauges {
|
||||
barProgress?: boolean,
|
||||
barShadow?: number
|
||||
}
|
||||
|
||||
export const GenericOptions: GenericOptions;
|
||||
|
||||
export interface RadialGaugeOptions extends GenericOptions {
|
||||
ticksAngle?: number,
|
||||
|
||||
Vendored
+80
-10
@@ -1,4 +1,4 @@
|
||||
// Type definitions for cesium 1.44
|
||||
// Type definitions for cesium 1.46
|
||||
// Project: http://cesiumjs.org
|
||||
// Definitions by: Aigars Zeiza <https://github.com/Zuzon>
|
||||
// Harry Nicholls <https://github.com/hnipps>
|
||||
@@ -1437,10 +1437,10 @@ declare namespace Cesium {
|
||||
}
|
||||
|
||||
class TerrainData {
|
||||
credits: Credit[];
|
||||
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement;
|
||||
interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number;
|
||||
isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean;
|
||||
createMesh(tilingScheme: TilingScheme, x: number, y: number, level: number): Promise<TerrainMesh>;
|
||||
upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise<TerrainData>;
|
||||
wasCreatedByUpsampling(): boolean;
|
||||
}
|
||||
@@ -1459,7 +1459,7 @@ declare namespace Cesium {
|
||||
}
|
||||
|
||||
abstract class TerrainProvider {
|
||||
availability: any; // TileAvailability
|
||||
availability: TileAvailability;
|
||||
credit: Credit;
|
||||
errorEvent: Event;
|
||||
hasVertexNormals: boolean;
|
||||
@@ -1475,6 +1475,15 @@ declare namespace Cesium {
|
||||
requestTileGeometry(x: number, y: number, level: number, throttleRequests?: boolean): Promise<TerrainData>;
|
||||
}
|
||||
|
||||
class TileAvailability {
|
||||
constructor(tilingScheme: TilingScheme, maximumLevel: number);
|
||||
addAvailableTileRange(level: number, startX: number, startY: number, endX: number, endY: number): void;
|
||||
computeBestAvailableLevelOverRectangle(rectangle: Rectangle): number;
|
||||
computeChildMaskForTile(level: number, x: number, y: number): number;
|
||||
computeMaximumLevelAtPosition(position: Cartographic): number;
|
||||
isTileAvailable(level: number, x: number, y: number): boolean;
|
||||
}
|
||||
|
||||
class TileProviderError {
|
||||
provider: ImageryProvider | TerrainProvider;
|
||||
message: string;
|
||||
@@ -3007,23 +3016,84 @@ declare namespace Cesium {
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
class GoogleEarthEnterpriseMetadata {
|
||||
imageryPresent: boolean;
|
||||
key: ArrayBuffer;
|
||||
negativeAltitudeExponentBias: number;
|
||||
negativeAltitudeThreshold: number;
|
||||
protoImagery: boolean;
|
||||
readonly proxy: Proxy;
|
||||
readonly readyPromise: Promise<boolean>;
|
||||
readonly resource: Resource;
|
||||
terrainPresent: boolean;
|
||||
readonly url: string;
|
||||
constructor(resourceOrUrl: Resource | string);
|
||||
static quadKeyToTileXY(quadkey: string): {x: number, y: number, level: number};
|
||||
static tileXYToQuadKey(x: number, y: number, level: number): string;
|
||||
}
|
||||
|
||||
class GoogleEarthEnterpriseImageryProvider extends ImageryProvider {
|
||||
url: string;
|
||||
path: string;
|
||||
channel: number;
|
||||
version: number;
|
||||
requestType: string;
|
||||
readonly url: string;
|
||||
constructor(options: {
|
||||
url: string;
|
||||
url: Resource | string;
|
||||
metadata: GoogleEarthEnterpriseMetadata;
|
||||
ellipsoid?: Ellipsoid;
|
||||
tileDiscardPolicy?: TileDiscardPolicy;
|
||||
credit?: Credit | string;
|
||||
});
|
||||
}
|
||||
|
||||
class GoogleEarthEnterpriseMapsProvider extends ImageryProvider {
|
||||
readonly channel: number;
|
||||
readonly path: string;
|
||||
readonly requestType: string;
|
||||
readonly url: string;
|
||||
readonly version: number;
|
||||
static logoUrl: string;
|
||||
constructor(options: {
|
||||
url: Resource | string;
|
||||
channel: number;
|
||||
path?: string;
|
||||
maximumLevel?: number;
|
||||
tileDiscardPolicy?: TileDiscardPolicy;
|
||||
ellipsoid?: Ellipsoid;
|
||||
proxy?: Proxy
|
||||
});
|
||||
}
|
||||
|
||||
class GoogleEarthEnterpriseTerrainData extends TerrainData {
|
||||
constructor(options: {
|
||||
buffer: ArrayBuffer;
|
||||
negativeAltitudeExponentBias: number;
|
||||
negativeElevationThreshold: number;
|
||||
childTileMask?: number;
|
||||
createdByUpsampling?: boolean;
|
||||
credits?: Credit[];
|
||||
});
|
||||
}
|
||||
|
||||
class GoogleEarthEnterpriseTerrainProvider {
|
||||
static heightmapTerrainQuality: number;
|
||||
availability: TileAvailability;
|
||||
credit: Credit;
|
||||
errorEvent: Event;
|
||||
hasVertexNormals: boolean;
|
||||
hasWaterMask: boolean;
|
||||
ready: boolean;
|
||||
readonly readyPromise: Promise<boolean>;
|
||||
tilingScheme: TilingScheme;
|
||||
constructor(options: {
|
||||
url: Resource | string;
|
||||
metadata: GoogleEarthEnterpriseMetadata;
|
||||
ellipsoid?: Ellipsoid;
|
||||
credit?: Credit | string;
|
||||
})
|
||||
static getEstimatedLevelZeroGeometricErrorForAHeightmap(ellipsoid: Ellipsoid, tileImageWidth: number, numberOfTilesAtLevelZero: number): number;
|
||||
static getRegularGridIndices(width: number, height: number): Uint16Array;
|
||||
getLevelMaximumGeometricError(level: number): number;
|
||||
getTileDataAvailable(x: number, y: number, level: number): boolean;
|
||||
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise<TerrainData>;
|
||||
}
|
||||
|
||||
class GridImageryProvider extends ImageryProvider {
|
||||
constructor(options?: {
|
||||
tilingScheme?: TilingScheme;
|
||||
|
||||
@@ -84,6 +84,10 @@ chai.request(app)
|
||||
.then((res: ChaiHttp.Response) => chai.expect(res).to.have.status(200))
|
||||
.catch((err: any) => { throw err; });
|
||||
|
||||
chai.request(app)
|
||||
.keepOpen()
|
||||
.close((err: any) => { throw err; });
|
||||
|
||||
const agent = chai.request.agent(app);
|
||||
|
||||
agent
|
||||
@@ -97,6 +101,8 @@ agent
|
||||
.then((res: ChaiHttp.Response) => chai.expect(res).to.have.status(200));
|
||||
});
|
||||
|
||||
agent.close((err: any) => { throw err; });
|
||||
|
||||
function test1() {
|
||||
const req = chai.request(app).get('/');
|
||||
req.then((res: ChaiHttp.Response) => {
|
||||
|
||||
Vendored
+2
@@ -64,6 +64,8 @@ declare global {
|
||||
del(url: string, callback?: (err: any, res: Response) => void): request.Request;
|
||||
options(url: string, callback?: (err: any, res: Response) => void): request.Request;
|
||||
patch(url: string, callback?: (err: any, res: Response) => void): request.Request;
|
||||
keepOpen(): Agent;
|
||||
close(callback?: (err: any) => void): Agent;
|
||||
}
|
||||
|
||||
interface TypeComparison {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"strict-export-declare-modifiers": false
|
||||
"strict-export-declare-modifiers": false,
|
||||
"use-default-type-parameter": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,14 @@ import { Chart, ChartData, Point } from "chart.js";
|
||||
// import chartjs = require('chart.js');
|
||||
// => chartjs.Chart
|
||||
|
||||
const plugin = {
|
||||
afterDraw: (chartInstance: Chart, easing: string, options?: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
const chart: Chart = new Chart(new CanvasRenderingContext2D(), {
|
||||
type: "bar",
|
||||
plugins: [plugin, plugin],
|
||||
data: {
|
||||
labels: ["group 1"],
|
||||
datasets: [
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user