mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 03:31:47 +00:00
Merge remote-tracking branch 'upstream/master' into fix-mongoose
This commit is contained in:
@@ -38,7 +38,7 @@ or just look for any ".d.ts" files in the package and manually include them with
|
||||
These can be used by TypeScript 1.0.
|
||||
|
||||
* [Typings](https://github.com/typings/typings)
|
||||
* ~~[NuGet](http://nuget.org/Tpackages?q=DefinitelyTyped)~~ (use preferred alternatives, nuget DT type publishing has been turned off)
|
||||
* ~~[NuGet](http://nuget.org/packages?q=DefinitelyTyped)~~ (use preferred alternatives, nuget DT type publishing has been turned off)
|
||||
* Manually download from the `master` branch of this repository
|
||||
|
||||
You may need to add manual [references](http://www.typescriptlang.org/docs/handbook/triple-slash-directives.html).
|
||||
|
||||
@@ -186,6 +186,12 @@
|
||||
"sourceRepoURL": "https://github.com/loopline-systems/electron-builder",
|
||||
"asOfVersion": "2.8.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "error-stack-parser",
|
||||
"typingsPackageName": "error-stack-parser",
|
||||
"sourceRepoURL": "https://github.com/stacktracejs/error-stack-parser",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "eventemitter2",
|
||||
"typingsPackageName": "eventemitter2",
|
||||
|
||||
Vendored
+51
-15
@@ -345,18 +345,47 @@ declare namespace AceAjax {
|
||||
insert(position: Position, text: string): any;
|
||||
|
||||
/**
|
||||
* Inserts the elements in `lines` into the document, starting at the row index given by `row`. This method also triggers the `'change'` event.
|
||||
* @param row The index of the row to insert at
|
||||
* @param lines An array of strings
|
||||
**/
|
||||
* @deprecated Use the insertFullLines method instead.
|
||||
*/
|
||||
insertLines(row: number, lines: string[]): any;
|
||||
|
||||
/**
|
||||
* Inserts a new line into the document at the current row's `position`. This method also triggers the `'change'` event.
|
||||
* @param position The position to insert at
|
||||
**/
|
||||
* Inserts the elements in `lines` into the document as full lines (does not merge with existing line), starting at the row index given by `row`. This method also triggers the `"change"` event.
|
||||
* @param {Number} row The index of the row to insert at
|
||||
* @param {Array} lines An array of strings
|
||||
* @returns {Object} Contains the final row and column, like this:
|
||||
* ```
|
||||
* {row: endRow, column: 0}
|
||||
* ```
|
||||
* If `lines` is empty, this function returns an object containing the current row, and column, like this:
|
||||
* ```
|
||||
* {row: row, column: 0}
|
||||
* ```
|
||||
*
|
||||
**/
|
||||
insertFullLines(row: number, lines: string[]): any;
|
||||
|
||||
/**
|
||||
* @deprecated Use insertMergedLines(position, ['', '']) instead.
|
||||
*/
|
||||
insertNewLine(position: Position): any;
|
||||
|
||||
/**
|
||||
* Inserts the elements in `lines` into the document, starting at the position index given by `row`. This method also triggers the `"change"` event.
|
||||
* @param {Number} row The index of the row to insert at
|
||||
* @param {Array} lines An array of strings
|
||||
* @returns {Object} Contains the final row and column, like this:
|
||||
* ```
|
||||
* {row: endRow, column: 0}
|
||||
* ```
|
||||
* If `lines` is empty, this function returns an object containing the current row, and column, like this:
|
||||
* ```
|
||||
* {row: row, column: 0}
|
||||
* ```
|
||||
*
|
||||
**/
|
||||
insertMergedLines(row: number, lines: string[]): any;
|
||||
|
||||
/**
|
||||
* Inserts `text` into the `position` at the current row. This method also triggers the `'change'` event.
|
||||
* @param position The position to insert at
|
||||
@@ -379,12 +408,19 @@ declare namespace AceAjax {
|
||||
removeInLine(row: number, startColumn: number, endColumn: number): any;
|
||||
|
||||
/**
|
||||
* Removes a range of full lines. This method also triggers the `'change'` event.
|
||||
* @param firstRow The first row to be removed
|
||||
* @param lastRow The last row to be removed
|
||||
**/
|
||||
* @deprecated Use the removeFullLines method instead.
|
||||
*/
|
||||
removeLines(firstRow: number, lastRow: number): string[];
|
||||
|
||||
/**
|
||||
* Removes a range of full lines. This method also triggers the `"change"` event.
|
||||
* @param {Number} firstRow The first row to be removed
|
||||
* @param {Number} lastRow The last row to be removed
|
||||
* @returns {[String]} Returns all the removed lines.
|
||||
*
|
||||
**/
|
||||
removeFullLines(firstRow: number, lastRow: number): string[];
|
||||
|
||||
/**
|
||||
* Removes the new line between `row` and the row immediately following it. This method also triggers the `'change'` event.
|
||||
* @param row The row to check
|
||||
@@ -474,9 +510,9 @@ declare namespace AceAjax {
|
||||
removeFold(arg: any): void;
|
||||
|
||||
expandFold(arg: any): void;
|
||||
|
||||
|
||||
foldAll(startRow?: number, endRow?: number, depth?: number): void
|
||||
|
||||
|
||||
unfold(arg1: any, arg2: boolean): void;
|
||||
|
||||
screenToDocumentColumn(row: number, column: number): void;
|
||||
@@ -2659,9 +2695,9 @@ declare namespace AceAjax {
|
||||
characterWidth: number;
|
||||
|
||||
lineHeight: number;
|
||||
|
||||
|
||||
setScrollMargin(top:number, bottom:number, left: number, right: number): void;
|
||||
|
||||
|
||||
screenToTextCoordinates(left: number, top: number): void;
|
||||
|
||||
/**
|
||||
|
||||
+25
@@ -35,6 +35,7 @@ export class ActionsSdkApp extends AssistantApp {
|
||||
constructor(options: ActionsSdkAppOptions);
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Validates whether request is from Assistant through signature verification.
|
||||
* Uses Google-Auth-Library to verify authorization token against given
|
||||
* Google Cloud Project ID. Auth token is given in request header with key,
|
||||
@@ -58,6 +59,30 @@ export class ActionsSdkApp extends AssistantApp {
|
||||
*/
|
||||
isRequestFromAssistant(projectId: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Validates whether request is from Google through signature verification.
|
||||
* Uses Google-Auth-Library to verify authorization token against given
|
||||
* Google Cloud Project ID. Auth token is given in request header with key,
|
||||
* "Authorization".
|
||||
*
|
||||
* @example
|
||||
* const app = new ActionsSdkApp({request, response});
|
||||
* app.isRequestFromGoogle('nodejs-cloud-test-project-1234')
|
||||
* .then(() => {
|
||||
* app.ask('Hey there, thanks for stopping by!');
|
||||
* })
|
||||
* .catch(err => {
|
||||
* response.status(400).send();
|
||||
* });
|
||||
*
|
||||
* @param projectId Google Cloud Project ID for the Assistant app.
|
||||
* @return Promise resolving with google-auth-library LoginTicket
|
||||
* if request is from a valid source, otherwise rejects with the error reason
|
||||
* for an invalid token.
|
||||
* @actionssdk
|
||||
*/
|
||||
isRequestFromGoogle(projectId: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Gets the request Conversation API version.
|
||||
*
|
||||
|
||||
+212
-53
@@ -10,58 +10,36 @@ import { ActionPaymentTransactionConfig, Cart, GooglePaymentTransactionConfig, L
|
||||
* @dialogflow
|
||||
*/
|
||||
export enum StandardIntents {
|
||||
/**
|
||||
* App fires MAIN intent for queries like [talk to $app].
|
||||
*/
|
||||
/** App fires MAIN intent for queries like [talk to $app]. */
|
||||
MAIN,
|
||||
/**
|
||||
* App fires TEXT intent when action issues ask intent.
|
||||
*/
|
||||
/** App fires TEXT intent when action issues ask intent. */
|
||||
TEXT,
|
||||
/**
|
||||
* App fires PERMISSION intent when action invokes askForPermission.
|
||||
*/
|
||||
/** App fires PERMISSION intent when action invokes askForPermission. */
|
||||
PERMISSION,
|
||||
/**
|
||||
* App fires OPTION intent when user chooses from options provided.
|
||||
*/
|
||||
/** App fires OPTION intent when user chooses from options provided. */
|
||||
OPTION,
|
||||
/**
|
||||
* App fires TRANSACTION_REQUIREMENTS_CHECK intent when action sets up transaction.
|
||||
*/
|
||||
/** App fires TRANSACTION_REQUIREMENTS_CHECK intent when action sets up transaction. */
|
||||
TRANSACTION_REQUIREMENTS_CHECK,
|
||||
/**
|
||||
* App fires DELIVERY_ADDRESS intent when action asks for delivery address.
|
||||
*/
|
||||
/** App fires DELIVERY_ADDRESS intent when action asks for delivery address. */
|
||||
DELIVERY_ADDRESS,
|
||||
/**
|
||||
* App fires TRANSACTION_DECISION intent when action asks for transaction decision.
|
||||
*/
|
||||
/** App fires TRANSACTION_DECISION intent when action asks for transaction decision. */
|
||||
TRANSACTION_DECISION,
|
||||
/**
|
||||
* App fires CONFIRMATION intent when requesting affirmation from user.
|
||||
*/
|
||||
/** App fires CONFIRMATION intent when requesting affirmation from user. */
|
||||
CONFIRMATION,
|
||||
/**
|
||||
* App fires DATETIME intent when requesting date/time from user.
|
||||
*/
|
||||
/** App fires DATETIME intent when requesting date/time from user. */
|
||||
DATETIME,
|
||||
/**
|
||||
* App fires SIGN_IN intent when requesting sign-in from user.
|
||||
*/
|
||||
/** App fires SIGN_IN intent when requesting sign-in from user. */
|
||||
SIGN_IN,
|
||||
/**
|
||||
* App fires NO_INPUT intent when user doesn't provide input.
|
||||
*/
|
||||
/** App fires NO_INPUT intent when user doesn't provide input. */
|
||||
NO_INPUT,
|
||||
/**
|
||||
* App fires CANCEL intent when user exits app mid-dialog.
|
||||
*/
|
||||
/** App fires CANCEL intent when user exits app mid-dialog. */
|
||||
CANCEL,
|
||||
/**
|
||||
* App fires NEW_SURFACE intent when requesting handoff to a new surface from user.
|
||||
*/
|
||||
/** App fires NEW_SURFACE intent when requesting handoff to a new surface from user. */
|
||||
NEW_SURFACE,
|
||||
/** App fires REGISTER_UPDATE intent when requesting the user to register for proactive updates. */
|
||||
REGISTER_UPDATE,
|
||||
/** App receives CONFIGURE_UPDATES intent to indicate a custom REGISTER_UPDATE intent should be sent. */
|
||||
CONFIGURE_UPDATES
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,6 +63,10 @@ export enum SupportedPermissions {
|
||||
* {@link https://developers.google.com/actions/reference/conversation#Location|Location object}.
|
||||
*/
|
||||
DEVICE_COARSE_LOCATION,
|
||||
/**
|
||||
* Confirmation to receive proactive content at any time from the app.
|
||||
*/
|
||||
UPDATE
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,6 +119,8 @@ export enum BuiltInArgNames {
|
||||
* New surface value argument.
|
||||
*/
|
||||
NEW_SURFACE,
|
||||
/** Update registration value argument. */
|
||||
REGISTER_UPDATE
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,8 +128,17 @@ export enum BuiltInArgNames {
|
||||
* {@link https://developers.google.com/actions/reference/conversation#Conversation|Conversation object}.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
* @deprecated Use {@link ConversationTypes} instead.
|
||||
*/
|
||||
export enum ConversationStages {
|
||||
export type ConversationStages = ConversationTypes;
|
||||
|
||||
/**
|
||||
* List of possible conversation types, as defined in the
|
||||
* {@link https://developers.google.com/actions/reference/conversation#Conversation|Conversation object}.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
*/
|
||||
export enum ConversationTypes {
|
||||
/**
|
||||
* Unspecified conversation state.
|
||||
*/
|
||||
@@ -224,6 +217,13 @@ export enum SignInStatus {
|
||||
ERROR
|
||||
}
|
||||
|
||||
/**
|
||||
* Possible update trigger time context frequencies.
|
||||
*/
|
||||
export enum TimeContextFrequency {
|
||||
DAILY
|
||||
}
|
||||
|
||||
/**
|
||||
* User provided date/time info.
|
||||
*/
|
||||
@@ -277,6 +277,17 @@ export interface User {
|
||||
userName: UserName;
|
||||
/** Unique Oauth2 token. Only available with account linking. */
|
||||
accessToken: string;
|
||||
/**
|
||||
* Timestamp for the last access from the user.
|
||||
* Retrieve using app.getLastSeen() to get a Date object or null if never seen.
|
||||
*/
|
||||
lastSeen: string;
|
||||
/**
|
||||
* A string persistent across sessions.
|
||||
* Retrieved and set using app.userStorage which allows you to store it like an JSON object
|
||||
* which is abstracted for convenience by the client library.
|
||||
*/
|
||||
userStorage: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -295,6 +306,17 @@ export interface Capability {
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intent Argument. For incoming intents, the argument value can be retrieved
|
||||
* using {@link AssistantApp#getArgument}.
|
||||
*/
|
||||
export interface IntentArgument {
|
||||
/** Name of the argument. */
|
||||
name: string;
|
||||
/** Text value of the argument. */
|
||||
textValue: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Actions on Google client library AssistantApp base class.
|
||||
*
|
||||
@@ -313,6 +335,20 @@ export class AssistantApp {
|
||||
*/
|
||||
data: object;
|
||||
|
||||
/**
|
||||
* The data persistent across sessions in JSON format.
|
||||
* It exists in the same context as getUser().userId
|
||||
*
|
||||
* @example
|
||||
* // Actions SDK
|
||||
* const app = new ActionsSdkApp({request: request, response: response});
|
||||
* app.userStorage.someProperty = 'someValue';
|
||||
* // Dialogflow
|
||||
* const app = new DialogflowApp({request: request, response: response});
|
||||
* app.userStorage.someProperty = 'someValue';
|
||||
*/
|
||||
userStorage: object;
|
||||
|
||||
/**
|
||||
* List of standard intents that the app provides.
|
||||
* @actionssdk
|
||||
@@ -339,8 +375,17 @@ export class AssistantApp {
|
||||
* {@link https://developers.google.com/actions/reference/conversation#Conversation|Conversation object}.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
* @deprecated Use {@link ConversationTypes} instead.
|
||||
*/
|
||||
readonly ConversationStages: typeof ConversationStages;
|
||||
readonly ConversationStages: typeof ConversationTypes;
|
||||
|
||||
/**
|
||||
* List of possible conversation types, as defined in the
|
||||
* {@link https://developers.google.com/actions/reference/conversation#Conversation|Conversation object}.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
*/
|
||||
readonly ConversationTypes: typeof ConversationTypes;
|
||||
|
||||
/**
|
||||
* List of surface capabilities supported by the app.
|
||||
@@ -368,6 +413,11 @@ export class AssistantApp {
|
||||
*/
|
||||
readonly Transactions: typeof TransactionValues;
|
||||
|
||||
/**
|
||||
* Possible update trigger time context frequencies.
|
||||
*/
|
||||
readonly TimeContextFrequency: typeof TimeContextFrequency;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Public APIs
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -477,7 +527,7 @@ export class AssistantApp {
|
||||
* @param permissions Array of permissions App supports, each of
|
||||
* which comes from AssistantApp.SupportedPermissions.
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkAssistant}.
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return A response is sent to Assistant to ask for the user's permission; for any
|
||||
* invalid input, we return null.
|
||||
* @actionssdk
|
||||
@@ -485,6 +535,58 @@ export class AssistantApp {
|
||||
*/
|
||||
askForPermissions(context: string, permissions: string[], dialogState?: object): express.Response | null;
|
||||
|
||||
/**
|
||||
* Prompts the user for permission to send proactive updates at any time.
|
||||
*
|
||||
* @example
|
||||
* const app = new DialogflowApp({request, response});
|
||||
* const REQUEST_PERMISSION_ACTION = 'request.permission';
|
||||
* const PERMISSION_REQUESTED = 'permission.requested';
|
||||
* const SHOW_IMAGE = 'show.image';
|
||||
*
|
||||
* function requestPermission (app) {
|
||||
* app.askForUpdatePermission('show.image', [
|
||||
* {
|
||||
* name: 'image_to_show',
|
||||
* textValue: 'image_type_1'
|
||||
* }
|
||||
* ]);
|
||||
* }
|
||||
*
|
||||
* function checkPermission (app) {
|
||||
* if (app.isPermissionGranted()) {
|
||||
* app.tell(`Great, I'll send an update whenever I notice a change`);
|
||||
* } else {
|
||||
* // Response shows that user did not grant permission
|
||||
* app.tell('Alright, just let me know whenever you need the weather!');
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* function showImage (app) {
|
||||
* showPicture(app.getArgument('image_to_show'));
|
||||
* }
|
||||
*
|
||||
* const actionMap = new Map();
|
||||
* actionMap.set(REQUEST_PERMISSION_ACTION, requestPermission);
|
||||
* actionMap.set(PERMISSION_REQUESTED, checkPermission);
|
||||
* actionMap.set(SHOW_IMAGE, showImage);
|
||||
* app.handleRequest(actionMap);
|
||||
*
|
||||
* @param intent If using Dialogflow, the action name of the intent
|
||||
* to be triggered when the update is received. If using Actions SDK, the
|
||||
* intent name to be triggered when the update is received.
|
||||
* @param intentArguments The necessary arguments
|
||||
* to fulfill the intent triggered on update. These can be retrieved using
|
||||
* {@link AssistantApp#getArgument}.
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return A response is sent to Assistant to ask for the user's permission; for any
|
||||
* invalid input, we return null.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
*/
|
||||
askForUpdatePermission(intent: string, intentArguments: IntentArgument[], dialogState?: object): express.Response | null;
|
||||
|
||||
/**
|
||||
* Checks whether user is in transactable state.
|
||||
*
|
||||
@@ -520,7 +622,7 @@ export class AssistantApp {
|
||||
* options and order options. Optional if order has no payment or
|
||||
* delivery.
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkAssistant}.
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return HTTP response.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
@@ -562,7 +664,7 @@ export class AssistantApp {
|
||||
* transactionConfig Configuration for the transaction. Includes payment
|
||||
* options and order options.
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkAssistant}.
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return HTTP response
|
||||
* @dialogflow
|
||||
*/
|
||||
@@ -737,7 +839,7 @@ export class AssistantApp {
|
||||
* query for an affirmative or negative response. If undefined or null,
|
||||
* Google will use a generic yes/no prompt.
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkAssistant}.
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return HTTP response.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
@@ -782,7 +884,7 @@ export class AssistantApp {
|
||||
* time if not provided by user. If undefined or null, Google will use a
|
||||
* generic prompt.
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkAssistant}.
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return HTTP response.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
@@ -795,11 +897,6 @@ export class AssistantApp {
|
||||
* Retrieve the access token in subsequent intents using
|
||||
* app.getUser().accessToken.
|
||||
*
|
||||
* Note: Currently this API requires enabling the app for Transactions APIs.
|
||||
* To do this, fill out the App Info section of the Actions Console project
|
||||
* and check the box indicating the use of Transactions under "Privacy and
|
||||
* consent".
|
||||
*
|
||||
* @example
|
||||
* const app = new DialogflowApp({ request, response });
|
||||
* const WELCOME_INTENT = 'input.welcome';
|
||||
@@ -824,7 +921,7 @@ export class AssistantApp {
|
||||
* app.handleRequest(actionMap);
|
||||
*
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkAssistant}.
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return HTTP response.
|
||||
* @actionssdk
|
||||
* @dialogflow
|
||||
@@ -872,13 +969,53 @@ export class AssistantApp {
|
||||
* @param capabilities The list of capabilities required in
|
||||
* the surface.
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkAssistant}.
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return HTTP response.
|
||||
* @dialogflow
|
||||
* @actionssdk
|
||||
*/
|
||||
askForNewSurface(context: string, notificationTitle: string, capabilities: SurfaceCapabilities[], dialogState?: object): express.Response | null;
|
||||
|
||||
/**
|
||||
* Requests the user to register for daily updates.
|
||||
*
|
||||
* @example
|
||||
* const app = new DialogflowApp({ request, response });
|
||||
* const WELCOME_INTENT = 'input.welcome';
|
||||
* const SHOW_IMAGE = 'show.image';
|
||||
*
|
||||
* function welcomeIntent (app) {
|
||||
* app.askToRegisterDailyUpdate('show.image', [
|
||||
* {
|
||||
* name: 'image_to_show',
|
||||
* textValue: 'image_type_1'
|
||||
* }
|
||||
* ]);
|
||||
* }
|
||||
*
|
||||
* function showImage (app) {
|
||||
* showPicture(app.getArgument('image_to_show'));
|
||||
* }
|
||||
*
|
||||
* const actionMap = new Map();
|
||||
* actionMap.set(WELCOME_INTENT, welcomeIntent);
|
||||
* actionMap.set(SHOW_IMAGE, showImage);
|
||||
* app.handleRequest(actionMap);
|
||||
*
|
||||
* @param intent If using Dialogflow, the action name of the intent
|
||||
* to be triggered when the update is received. If using Actions SDK, the
|
||||
* intent name to be triggered when the update is received.
|
||||
* @param intentArguments The necessary arguments
|
||||
* to fulfill the intent triggered on update. These can be retrieved using
|
||||
* {@link AssistantApp#getArgument}.
|
||||
* @param dialogState JSON object the app uses to hold dialog state that
|
||||
* will be circulated back by Assistant. Used in {@link ActionsSdkApp}.
|
||||
* @return HTTP response.
|
||||
* @dialogflow
|
||||
* @actionssdk
|
||||
*/
|
||||
askToRegisterDailyUpdate(intent: string, intentArguments: IntentArgument[], dialogState?: object): express.Response | null;
|
||||
|
||||
/**
|
||||
* Gets the {@link User} object.
|
||||
* The user object contains information about the user, including
|
||||
@@ -945,6 +1082,18 @@ export class AssistantApp {
|
||||
*/
|
||||
getUserLocale(): string;
|
||||
|
||||
/**
|
||||
* Get the user's last seen time as a Date object.
|
||||
* Not supported in V1.
|
||||
*
|
||||
* @example
|
||||
* const app = new DialogflowApp({request, response});
|
||||
* const lastSeen = app.getLastSeen();
|
||||
*
|
||||
* @return User's last seen date or null if never seen
|
||||
*/
|
||||
getLastSeen(): Date | null;
|
||||
|
||||
/**
|
||||
* If granted permission to device's location in previous intent, returns device's
|
||||
* location (see {@link AssistantApp#askForPermissions|askForPermissions}).
|
||||
@@ -1225,6 +1374,16 @@ export class AssistantApp {
|
||||
*/
|
||||
isFinalReprompt(): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if user accepted update registration request. Used with
|
||||
* {@link AssistantApp#askToRegisterDailyUpdate}
|
||||
*
|
||||
* @return True if user accepted update registration request.
|
||||
* @dialogflow
|
||||
* @actionssdk
|
||||
*/
|
||||
isUpdateRegistered(): boolean;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Response Builders
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for actions-on-google 1.5
|
||||
// Type definitions for actions-on-google 1.6
|
||||
// Project: https://github.com/actions-on-google/actions-on-google-nodejs
|
||||
// Definitions by: Joel Hegg <https://github.com/joelhegg>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
+19
-1
@@ -70,6 +70,24 @@ export interface OptionInfo {
|
||||
synonyms: string[];
|
||||
}
|
||||
|
||||
export interface StructuredResponse {
|
||||
orderUpdate: OrderUpdate;
|
||||
}
|
||||
|
||||
export interface RichResponseItemBasicCard {
|
||||
basicCard: BasicCard;
|
||||
}
|
||||
|
||||
export interface RichResponseItemSimpleResponse {
|
||||
simpleResponse: SimpleResponse;
|
||||
}
|
||||
|
||||
export interface RichResponseItemStructuredResponse {
|
||||
structuredResponse: StructuredResponse;
|
||||
}
|
||||
|
||||
export type RichResponseItem = RichResponseItemBasicCard | RichResponseItemSimpleResponse | RichResponseItemStructuredResponse;
|
||||
|
||||
/**
|
||||
* Class for initializing and constructing Rich Responses with chainable interface.
|
||||
*/
|
||||
@@ -85,7 +103,7 @@ export class RichResponse {
|
||||
* Ordered list of either SimpleResponse objects or BasicCard objects.
|
||||
* First item must be SimpleResponse. There can be at most one card.
|
||||
*/
|
||||
items: Array<SimpleResponse | BasicCard>;
|
||||
items: RichResponseItem[];
|
||||
|
||||
/**
|
||||
* Ordered list of text suggestions to display. Optional.
|
||||
|
||||
+132
-42
@@ -25,8 +25,8 @@ export interface Price {
|
||||
* Order rejection info.
|
||||
*/
|
||||
export interface RejectionInfo {
|
||||
/** One of Transaction.RejectionType. */
|
||||
type: RejectionType;
|
||||
/** One of Transaction.ReasonType. */
|
||||
type: ReasonType;
|
||||
/** Reason for the order rejection. */
|
||||
reason: string;
|
||||
}
|
||||
@@ -51,26 +51,16 @@ export interface CancellationInfo {
|
||||
* Order transit info.
|
||||
*/
|
||||
export interface TransitInfo {
|
||||
/** UTC timestamp of the transit update. */
|
||||
updatedTime: {
|
||||
/** Seconds since Unix epoch. */
|
||||
seconds: number;
|
||||
/** Partial seconds since Unix epoch. */
|
||||
nanos?: number;
|
||||
};
|
||||
/** UTC timestamp of the transit update as an RFC 3339 string. */
|
||||
updatedTime: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Order fulfillment info.
|
||||
*/
|
||||
export interface FulfillmentInfo {
|
||||
/** UTC timestamp of the fulfillment update. */
|
||||
deliveryTime: {
|
||||
/** Seconds since Unix epoch. */
|
||||
seconds: number;
|
||||
/** Partial seconds since Unix epoch. */
|
||||
nanos?: number;
|
||||
};
|
||||
/** UTC timestamp of the fulfillment update as an RFC 3339 string. */
|
||||
deliveryTime: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -140,7 +130,7 @@ export interface Location {
|
||||
*/
|
||||
export interface TransactionDecision {
|
||||
/** One of Transactions.ConfirmationDecision. */
|
||||
userDecision: ConfirmationDecision;
|
||||
userDecision: TransactionUserDecision;
|
||||
checkResult: {
|
||||
/** One of Transactions.ResultType. */
|
||||
resultType: ResultType;
|
||||
@@ -175,32 +165,61 @@ export interface TransactionDecision {
|
||||
export const TransactionValues: {
|
||||
/** List of transaction card networks available when paying with Google. */
|
||||
readonly CardNetwork: typeof CardNetwork;
|
||||
/**
|
||||
* List of possible item types.
|
||||
* @deprecated Use {@link TransactionValues.LineItemType} instead.
|
||||
*/
|
||||
readonly ItemType: typeof LineItemType;
|
||||
/** List of possible item types. */
|
||||
readonly ItemType: typeof ItemType;
|
||||
readonly LineItemType: typeof LineItemType;
|
||||
/** List of price types. */
|
||||
readonly PriceType: typeof PriceType;
|
||||
/** List of possible item types. */
|
||||
readonly PaymentType: typeof PaymentType;
|
||||
/** List of customer information properties that can be requested. */
|
||||
readonly CustomerInfoProperties: typeof CustomerInfoProperties;
|
||||
/**
|
||||
* List of possible order confirmation user decisions
|
||||
* @deprecated Use {@link TransactionValues.TransactionUserDecision} instead.
|
||||
*/
|
||||
readonly ConfirmationDecision: typeof TransactionUserDecision;
|
||||
/** List of possible order confirmation user decisions */
|
||||
readonly ConfirmationDecision: typeof ConfirmationDecision;
|
||||
readonly TransactionUserDecision: typeof TransactionUserDecision;
|
||||
/** List of possible order states. */
|
||||
readonly OrderState: typeof OrderState;
|
||||
/**
|
||||
* List of possible actions to take on the order.
|
||||
* @deprecated Use {@link TransactionValues.ActionType} instead.
|
||||
*/
|
||||
readonly OrderAction: typeof ActionType;
|
||||
/** List of possible actions to take on the order. */
|
||||
readonly OrderAction: typeof OrderAction;
|
||||
readonly ActionType: typeof ActionType;
|
||||
/**
|
||||
* List of possible types of order rejection.
|
||||
* @deprecated Use {@link TransactionValues.ReasonType} instead.
|
||||
*/
|
||||
readonly RejectionType: typeof ReasonType;
|
||||
/** List of possible types of order rejection. */
|
||||
readonly RejectionType: typeof RejectionType;
|
||||
readonly ReasonType: typeof ReasonType;
|
||||
/** List of possible order state objects. */
|
||||
readonly OrderStateInfo: typeof OrderStateInfo;
|
||||
/** List of possible order transaction requirements check result types. */
|
||||
readonly ResultType: typeof ResultType;
|
||||
/** List of possible user decisions to give delivery address. */
|
||||
readonly DeliveryAddressDecision: typeof DeliveryAddressDecision;
|
||||
readonly DeliveryAddressDecision: typeof DeliveryAddressUserDecision;
|
||||
/** List of possible user decisions to give delivery address. */
|
||||
readonly DeliveryAddressUserDecision: typeof DeliveryAddressUserDecision;
|
||||
/**
|
||||
* List of possible order location types.
|
||||
* @deprecated Use {@link TransactionValues.OrderLocationType} instead.
|
||||
*/
|
||||
readonly LocationType: typeof OrderLocationType;
|
||||
/** List of possible order location types. */
|
||||
readonly LocationType: typeof LocationType;
|
||||
readonly OrderLocationType: typeof OrderLocationType;
|
||||
/** List of possible order time types. */
|
||||
readonly TimeType: typeof TimeType;
|
||||
/** List of possible tokenization types for the payment method */
|
||||
readonly PaymentMethodTokenizationType: typeof PaymentMethodTokenizationType;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -235,8 +254,14 @@ export enum CardNetwork {
|
||||
|
||||
/**
|
||||
* List of possible item types.
|
||||
* @deprecated Use {@link TransactionValues.LineItemType} instead.
|
||||
*/
|
||||
export enum ItemType {
|
||||
export type ItemType = LineItemType;
|
||||
|
||||
/**
|
||||
* List of possible item types.
|
||||
*/
|
||||
export enum LineItemType {
|
||||
/**
|
||||
* Unspecified.
|
||||
*/
|
||||
@@ -323,13 +348,24 @@ export enum PaymentType {
|
||||
* List of customer information properties that can be requested.
|
||||
*/
|
||||
export enum CustomerInfoProperties {
|
||||
CUSTOMER_INFO_PROPERTY_UNSPECIFIED,
|
||||
EMAIL
|
||||
}
|
||||
|
||||
/**
|
||||
* List of possible order confirmation user decisions
|
||||
* @deprecated Use {@link TransactionValues.TransactionUserDecision} instead.
|
||||
*/
|
||||
export enum ConfirmationDecision {
|
||||
export type ConfirmationDecision = TransactionUserDecision;
|
||||
|
||||
/**
|
||||
* List of possible order confirmation user decisions
|
||||
*/
|
||||
export enum TransactionUserDecision {
|
||||
/**
|
||||
* Unspecified user decision.
|
||||
*/
|
||||
UNKNOWN_USER_DECISION,
|
||||
/**
|
||||
* Order was approved by user.
|
||||
*/
|
||||
@@ -353,6 +389,10 @@ export enum ConfirmationDecision {
|
||||
* List of possible order states.
|
||||
*/
|
||||
export enum OrderState {
|
||||
/**
|
||||
* Order was created at the integrator's system.
|
||||
*/
|
||||
CREATED,
|
||||
/**
|
||||
* Order was rejected.
|
||||
*/
|
||||
@@ -381,8 +421,18 @@ export enum OrderState {
|
||||
|
||||
/**
|
||||
* List of possible actions to take on the order.
|
||||
* @deprecated Use {@link TransactionValues.ActionType} instead.
|
||||
*/
|
||||
export enum OrderAction {
|
||||
export type OrderAction = ActionType;
|
||||
|
||||
/**
|
||||
* List of possible actions to take on the order.
|
||||
*/
|
||||
export enum ActionType {
|
||||
/**
|
||||
* Unknown action.
|
||||
*/
|
||||
UNKNOWN,
|
||||
/**
|
||||
* View details.
|
||||
*/
|
||||
@@ -418,13 +468,23 @@ export enum OrderAction {
|
||||
/**
|
||||
* Review.
|
||||
*/
|
||||
REVIEW
|
||||
REVIEW,
|
||||
/**
|
||||
* Customer Service.
|
||||
*/
|
||||
CUSTOMER_SERVICE
|
||||
}
|
||||
|
||||
/**
|
||||
* List of possible types of order rejection.
|
||||
* @deprecated Use {@link TransactionValues.ReasonType} instead.
|
||||
*/
|
||||
export enum RejectionType {
|
||||
export type RejectionType = ReasonType;
|
||||
|
||||
/**
|
||||
* List of possible types of order rejection.
|
||||
*/
|
||||
export enum ReasonType {
|
||||
/**
|
||||
* Unknown
|
||||
*/
|
||||
@@ -494,8 +554,14 @@ export enum ResultType {
|
||||
|
||||
/**
|
||||
* List of possible user decisions to give delivery address.
|
||||
* @deprecated Use {@link TransactionValues.DeliveryAddressUserDecision} instead.
|
||||
*/
|
||||
export enum DeliveryAddressDecision {
|
||||
export type DeliveryAddressDecision = DeliveryAddressUserDecision;
|
||||
|
||||
/**
|
||||
* List of possible user decisions to give delivery address.
|
||||
*/
|
||||
export enum DeliveryAddressUserDecision {
|
||||
/**
|
||||
* Unknown.
|
||||
*/
|
||||
@@ -512,8 +578,14 @@ export enum DeliveryAddressDecision {
|
||||
|
||||
/**
|
||||
* List of possible order location types.
|
||||
* @deprecated Use {@link TransactionValues.OrderLocationType} instead.
|
||||
*/
|
||||
export enum LocationType {
|
||||
export type LocationType = OrderLocationType;
|
||||
|
||||
/**
|
||||
* List of possible order location types.
|
||||
*/
|
||||
export enum OrderLocationType {
|
||||
/**
|
||||
* Unknown.
|
||||
*/
|
||||
@@ -533,7 +605,11 @@ export enum LocationType {
|
||||
/**
|
||||
* Destination of the order.
|
||||
*/
|
||||
DESTINATION
|
||||
DESTINATION,
|
||||
/**
|
||||
* Pick up location of the order.
|
||||
*/
|
||||
PICK_UP
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -558,6 +634,20 @@ export enum TimeType {
|
||||
RESERVATION_SLOT
|
||||
}
|
||||
|
||||
/**
|
||||
* List of possible tokenization types for the payment method
|
||||
*/
|
||||
export enum PaymentMethodTokenizationType {
|
||||
/**
|
||||
* Unspecified tokenization type.
|
||||
*/
|
||||
UNSPECIFIED_TOKENIZATION_TYPE,
|
||||
/**
|
||||
* Use external payment gateway tokenization API to tokenize selected payment method.
|
||||
*/
|
||||
PAYMENT_GATEWAY
|
||||
}
|
||||
|
||||
/**
|
||||
* Class for initializing and constructing Order with chainable interface.
|
||||
*/
|
||||
@@ -655,11 +745,11 @@ export class Order {
|
||||
/**
|
||||
* Adds an associated location to the order. Up to 2 locations can be added.
|
||||
*
|
||||
* @param type One of TransactionValues.LocationType.
|
||||
* @param type One of TransactionValues.OrderLocationType.
|
||||
* @param location Location to add.
|
||||
* @return Returns current constructed Order.
|
||||
*/
|
||||
addLocation(type: LocationType, location: Location): Order;
|
||||
addLocation(type: OrderLocationType, location: Location): Order;
|
||||
|
||||
/**
|
||||
* Sets an associated time to the order.
|
||||
@@ -780,9 +870,9 @@ export class LineItem {
|
||||
image?: Image;
|
||||
|
||||
/**
|
||||
* Type of the item. One of TransactionValues.ItemType.
|
||||
* Type of the item. One of TransactionValues.LineItemType.
|
||||
*/
|
||||
type?: ItemType;
|
||||
type?: LineItemType;
|
||||
|
||||
/**
|
||||
* Quantity of the item.
|
||||
@@ -834,10 +924,10 @@ export class LineItem {
|
||||
/**
|
||||
* Set the type of the item.
|
||||
*
|
||||
* @param type Type of the item. One of TransactionValues.ItemType.
|
||||
* @param type Type of the item. One of TransactionValues.LineItemType.
|
||||
* @return Returns current constructed LineItem.
|
||||
*/
|
||||
setType(type: ItemType): LineItem;
|
||||
setType(type: LineItemType): LineItem;
|
||||
|
||||
/**
|
||||
* Set the quantity of the item.
|
||||
@@ -898,9 +988,9 @@ export class OrderUpdate {
|
||||
lineItemUpdates: object;
|
||||
|
||||
/**
|
||||
* UTC timestamp of the order update.
|
||||
* UTC timestamp of the order update as an RFC 3339 string.
|
||||
*/
|
||||
updateTime?: object;
|
||||
updateTime?: string;
|
||||
|
||||
/**
|
||||
* Actionable items presented to the user to manage the order.
|
||||
@@ -946,7 +1036,7 @@ export class OrderUpdate {
|
||||
* Set the update time of the order.
|
||||
*
|
||||
* @param seconds Seconds since Unix epoch.
|
||||
* @param nanos Partial time units.
|
||||
* @param nanos Partial time units. It is rounded to the nearest millisecond.
|
||||
* @return Returns current constructed OrderUpdate.
|
||||
*/
|
||||
setUpdateTime(seconds: number, nanos?: number): OrderUpdate;
|
||||
@@ -974,12 +1064,12 @@ export class OrderUpdate {
|
||||
/**
|
||||
* Adds an actionable item for the user to manage the order.
|
||||
*
|
||||
* @param type One of TransactionValues.OrderActions.
|
||||
* @param type One of TransactionValues.ActionType.
|
||||
* @param label Button label.
|
||||
* @param url URL to open when button is clicked.
|
||||
* @return Returns current constructed OrderUpdate.
|
||||
*/
|
||||
addOrderManagementAction(type: OrderAction, label: string, url: string): OrderUpdate;
|
||||
addOrderManagementAction(type: ActionType, label: string, url: string): OrderUpdate;
|
||||
|
||||
/**
|
||||
* Adds a single price update for a particular line item in the order.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Global
|
||||
|
||||
const threeCamera = new AFRAME.THREE.Camera();
|
||||
AFRAME.TWEEN.Easing;
|
||||
|
||||
@@ -42,9 +41,18 @@ entity.addEventListener('child-detached', (event) => {
|
||||
const Component = AFRAME.registerComponent('test', {});
|
||||
|
||||
// Scene
|
||||
|
||||
const scene = document.querySelector('a-scene');
|
||||
scene.hasLoaded;
|
||||
|
||||
// System
|
||||
const system = scene.systems['systemName'];
|
||||
|
||||
// Register Custom Geometry
|
||||
AFRAME.registerGeometry('a-test-geometry', {
|
||||
schema: {
|
||||
groupIndex: { default: 0 }
|
||||
},
|
||||
init(data) {
|
||||
this.geometry = new THREE.Geometry();
|
||||
}
|
||||
});
|
||||
|
||||
Vendored
+9
-4
@@ -1,6 +1,7 @@
|
||||
// Type definitions for AFRAME 0.5
|
||||
// Type definitions for AFRAME 0.7
|
||||
// Project: https://aframe.io/
|
||||
// Definitions by: Paul Shannon <https://github.com/devpaul>
|
||||
// Roberto Ritger <https://github.com/bertoritger>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -40,7 +41,7 @@ declare namespace AFrame {
|
||||
primitives: { [ key: string ]: Entity };
|
||||
registerComponent(name: string, component: ComponentDefinition): ComponentConstructor;
|
||||
registerElement(name: string, element: ANode): void;
|
||||
registerGeometry(name: string, geometery: THREE.Geometry): Geometry;
|
||||
registerGeometry(name: string, geometry: GeometryDefinition): Geometry;
|
||||
registerPrimitive(name: string, primitive: PrimitiveDefinition): void;
|
||||
registerShader(name: string, shader: any): void;
|
||||
registerSystem(name: string, definition: SystemDefinition): void;
|
||||
@@ -101,7 +102,7 @@ declare namespace AFrame {
|
||||
name: string;
|
||||
schema: Schema;
|
||||
|
||||
init(): void;
|
||||
init(data?: any): void;
|
||||
pause(): void;
|
||||
play(): void;
|
||||
remove(): void;
|
||||
@@ -124,7 +125,7 @@ declare namespace AFrame {
|
||||
multiple?: boolean;
|
||||
schema?: Schema;
|
||||
|
||||
init?(): void;
|
||||
init?(data?: any): void;
|
||||
pause?(): void;
|
||||
play?(): void;
|
||||
remove?(): void;
|
||||
@@ -222,6 +223,10 @@ declare namespace AFrame {
|
||||
[ key: string ]: any;
|
||||
}
|
||||
|
||||
interface GeometryDefinition extends ComponentDefinition {
|
||||
geometry?: THREE.Geometry;
|
||||
}
|
||||
|
||||
interface GeometryDescriptor {
|
||||
Geometry: Geometry;
|
||||
schema: Schema;
|
||||
|
||||
Vendored
+4
-5
@@ -1,4 +1,4 @@
|
||||
// Type definitions for algoliasearch-client-js 3.24.5
|
||||
// Type definitions for algoliasearch-client-js 3.24.6
|
||||
// Project: https://github.com/algolia/algoliasearch-client-js
|
||||
// Definitions by: Baptiste Coquelle <https://github.com/cbaptiste>
|
||||
// Haroen Viaene <https://github.com/haroenv>
|
||||
@@ -809,8 +809,8 @@ declare namespace algoliasearch {
|
||||
}: {
|
||||
facetName: string;
|
||||
facetQuery: string;
|
||||
qp: AlgoliaQueryParameters;
|
||||
}): Promise<any>;
|
||||
} & AlgoliaQueryParameters
|
||||
): Promise<any>;
|
||||
/**
|
||||
* Search in an index
|
||||
* @param params query parameter
|
||||
@@ -826,8 +826,7 @@ declare namespace algoliasearch {
|
||||
}: {
|
||||
facetName: string;
|
||||
facetQuery: string;
|
||||
qp: AlgoliaQueryParameters;
|
||||
},
|
||||
} & AlgoliaQueryParameters,
|
||||
cb: (err: Error, res: any) => void
|
||||
): void;
|
||||
/**
|
||||
|
||||
Vendored
+208
-45
@@ -2191,27 +2191,45 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
chart.addGraph(graph);
|
||||
*/
|
||||
class AmGraph {
|
||||
/** Text which screen readers will read if user rolls-over the bullet/column or sets focus using tab key (this is possible only if tabIndex property of AmGraph is set to some number). Text is added as aria-label tag. Note - not all screen readers and browsers support this.
|
||||
@default "[[title]] [[category]] [[value]]"
|
||||
*/
|
||||
accessibleLabel: string;
|
||||
/** Name of the alpha field in your dataProvider. */
|
||||
alphaField: string;
|
||||
/** If you set this to true before chart is drawn, the animation of this graph won't be played.
|
||||
@default false
|
||||
*/
|
||||
animationPlayed: boolean;
|
||||
/** Allows customizing graphs balloons individually (only when ChartCursor is used). Note: the balloon object is not created automatically, you should create it before setting properties */
|
||||
balloon: AmBalloon;
|
||||
/** Value balloon color. Will use graph or data item color if not set. */
|
||||
balloonColor: string;
|
||||
/** If you set some function, the graph will call it and pass GraphDataItem and AmGraph object to it. This function should return a string which will be displayed in a balloon. */
|
||||
/** If you set some function, the graph will call it and pass GraphDataItem and AmGraph objects to it. This function should return a string which will be displayed in a balloon. */
|
||||
balloonFunction(graphDataItem: GraphDataItem, amGraph: AmGraph): string;
|
||||
/** Balloon text. You can use tags like [[value]], [[description]], [[percents]], [[open]], [[category]] [[value]] */
|
||||
/** Balloon text. You can use tags like [[value]], [[description]], [[percents]], [[open]], [[category]] or any other field name from your data provider. HTML tags can also be used.
|
||||
@default [[value]]
|
||||
*/
|
||||
balloonText: string;
|
||||
/** Specifies if the line graph should be placed behind column graphs */
|
||||
/** Specifies if the line graph should be placed behind column graphs
|
||||
@default false
|
||||
*/
|
||||
behindColumns: boolean;
|
||||
/** Type of the bullets. Possible values are: "none", "round", "square", "triangleUp", "triangleDown", "bubble", "custom". none */
|
||||
/** Type of the bullets. Possible values are: "none", "round", "square", "triangleUp", "triangleDown", "triangleLeft", "triangleRight", "bubble", "diamond", "xError", "yError" and "custom".
|
||||
@default "none"
|
||||
*/
|
||||
bullet: string;
|
||||
/** Opacity of bullets. Value range is 0 - 1.
|
||||
@default 1
|
||||
*/
|
||||
bulletAlpha: number;
|
||||
/** bulletAxis value is used when you are building error chart. Error chart is a regular serial or XY chart with bullet type set to "xError" or "yError". The graph should know which axis should be used to determine the size of this bullet - that's when bulletAxis should be set. Besides that, you should also set graph.errorField. You can also use other bullet types with this feature too. For example, if you set bulletAxis for XY chart, the size of a bullet will change as you zoom the chart. */
|
||||
bulletAxis: ValueAxis;
|
||||
/** Bullet border opacity.
|
||||
@default 1
|
||||
@default 0
|
||||
*/
|
||||
bulletBorderAlpha: number;
|
||||
/** Bullet border color. Will use lineColor if not set. */
|
||||
/** Bullet border color. Will use lineColor if not set. */
|
||||
bulletBorderColor: string;
|
||||
/** Bullet border thickness.
|
||||
@default 2
|
||||
@@ -2221,7 +2239,11 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
bulletColor: string;
|
||||
/** Name of the bullet field in your dataProvider. */
|
||||
bulletField: string;
|
||||
/** Bullet offset. Distance from the actual data point to the bullet. Can be used to place custom bullets above the columns. */
|
||||
/** Useful for touch devices - if you set it to 20 or so, the bullets of a graph will have invisible circle around the actual bullet (bullets should still be enabled), which will be easier to touch (bullets usually are smaller and hard to hit). */
|
||||
bulletHitAreaSize: number;
|
||||
/** Bullet offset. Distance from the actual data point to the bullet. Can be used to place custom bullets above the columns.
|
||||
@default 0
|
||||
*/
|
||||
bulletOffset: number;
|
||||
/** Bullet size.
|
||||
@default 8
|
||||
@@ -2229,17 +2251,31 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
bulletSize: number;
|
||||
/** Name of the bullet size field in your dataProvider. */
|
||||
bulletSizeField: string;
|
||||
/** If this field is set and addClassNames is enabled, the chart will look for a class name string in data using this setting and apply additional class names to elements of the particular data points, such as bullets. */
|
||||
classNameField: string;
|
||||
/** Name of the close field (used by candlesticks and ohlc) in your dataProvider. */
|
||||
closeField: string;
|
||||
/** In case you want to place this graph's columns in front of other columns, set this to false. In case "true", the columns will be clustered next to each other.
|
||||
|
||||
NOTE: clustering works only for graphs of type "column".
|
||||
@default true
|
||||
*/
|
||||
clustered: boolean;
|
||||
/** Color of value labels. Will use chart's color if not set. */
|
||||
color: string;
|
||||
/** Name of the color field in your dataProvider. */
|
||||
colorField: string;
|
||||
/** Specifies whether to connect data points if data is missing. The default value is true.
|
||||
/** You can use this property with non-stacked column graphs and specify order of columns of each category (starting from 0). Important: this feature does not work in stacked columns scenarios as well as with graph toggling enabled in legend. */
|
||||
columnIndexField: string;
|
||||
/** You can specify custom column width for each graph individually. Value range is 0 - 1 (we set relative width, not pixel width here). */
|
||||
columnWidth: number;
|
||||
/** Specifies whether to connect data points if data is missing. The default value is true. This feature does not work with XY chart.
|
||||
@default true
|
||||
*/
|
||||
connect: boolean;
|
||||
/** Corner radius of column. It can be set both in pixels or in percents. The chart's depth and angle styles must be set to 0. The default value is 0. Note, cornerRadiusTop will be applied for all corners of the column, JavaScript charts do not have a possibility to set separate corner radius for top and bottom. As we want all the property names to be the same both on JS and Flex, we didn't change this too. */
|
||||
/** Corner radius of column. It can be set both in pixels or in percents. The chart's depth and angle styles must be set to 0. The default value is 0. Note, cornerRadiusTop will be applied for all corners of the column, JavaScript charts do not have a possibility to set separate corner radius for top and bottom. As we want all the property names to be the same both on JS and Flex, we didn't change this too.
|
||||
@default 0
|
||||
*/
|
||||
cornerRadiusTop: number;
|
||||
/** If bulletsEnabled of ChartCurosor is true, a bullet on each graph follows the cursor. You can set opacity of each graphs bullet. In case you want to disable these bullets for a certain graph, set opacity to 0.
|
||||
@default 1
|
||||
@@ -2249,55 +2285,108 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
customBullet: string;
|
||||
/** Name of the custom bullet field in your dataProvider. */
|
||||
customBulletField: string;
|
||||
/** Dash length. If you set it to a value greater than 0, the graph line will be dashed. */
|
||||
/** Path to the image for legend marker. */
|
||||
customMarker: string;
|
||||
/** Dash length. If you set it to a value greater than 0, the graph line (or columns border) will be dashed.
|
||||
@default 0
|
||||
*/
|
||||
dashLength: number;
|
||||
/** Name of the dash length field in your dataProvider. This property adds a possibility to change graphs’ line from solid to dashed on any data point. You can also make columns border dashed using this setting. Note, this won't work with smoothedLineGraph. */
|
||||
dashLengthField: string;
|
||||
/** Used to format balloons if value axis is date-based.
|
||||
@default "MMM DD, YYYY"
|
||||
*/
|
||||
dateFormat: string;
|
||||
/** Name of the description field in your dataProvider. */
|
||||
descriptionField: string;
|
||||
/** Opacity of fill. Plural form is used to keep the same property names as our Flex charts'. Flex charts can accept array of numbers to generate gradients. Although you can set array here, only first value of this array will be used. */
|
||||
/** Name of error value field in your data provider. */
|
||||
errorField: string;
|
||||
/** Opacity of fill. Plural form is used to keep the same property names as our Flex charts'. Flex charts can accept array of numbers to generate gradients. Although you can set array here, only first value of this array will be used.
|
||||
@default 0
|
||||
*/
|
||||
fillAlphas: number;
|
||||
/** Fill color. Will use lineColor if not set. */
|
||||
fillColors: any;
|
||||
/** Name of the fill colors field in your dataProvider. */
|
||||
/** Fill color. Will use lineColor if not set. You can also set array of colors here. */
|
||||
fillColors: string;
|
||||
/** Name of the fill colors field in your dataProvider. This property adds a possibility to change line graphs’ fill color on any data point to create highlighted sections of the graph. Works only with AmSerialChart. */
|
||||
fillColorsField: string;
|
||||
/** You can set another graph here and if fillAlpha is >0, the area from this graph to fillToGraph will be filled (instead of filling the area to the X axis). */
|
||||
/** XY chart only. If you set this property to id or reference of your X or Y axis, and the fillAlphas is > 0, the area between graph and axis will be filled with color, like in this demo. */
|
||||
fillToAxis: ValueAxis;
|
||||
/** You can set another graph here and if fillAlpha is >0, the area from this graph to fillToGraph will be filled (instead of filling the area to the X axis). This feature is not supported by smoothedLine graphs and Radar chart. */
|
||||
fillToGraph: AmGraph;
|
||||
/** Column width in pixels. If you set this property, columns will be of a fixed width and won't adjust to the available space. */
|
||||
fixedColumnWidth: number;
|
||||
/** Size of value labels text. Will use chart's fontSize if not set. */
|
||||
fontSize: string;
|
||||
/** Orientation of the gradient fills (only for "column" graph type). Possible values are "vertical" and "horizontal". vertical */
|
||||
fontSize: number;
|
||||
/** If this is set `true`, the graph will always break the line if the distance in time between two adjacent data points is bigger than `gapPeriod x minPeriod`, even if `connect` is set to `true`.
|
||||
@default false
|
||||
*/
|
||||
forceGap: boolean;
|
||||
/** Name of the gap field in your dataProvider. You can force graph to show gap at a desired data point using this feature. This feature does not work with XY chart. */
|
||||
gapField: string;
|
||||
/** Using this property you can specify when graph should display gap - if the time difference between data points is bigger than duration of minPeriod * gapPeriod, and connect property of a graph is set to false, graph will display gap.
|
||||
@default 1.1
|
||||
*/
|
||||
gapPeriod: number;
|
||||
/** Orientation of the gradient fills (only for "column" graph type). Possible values are "vertical" and "horizontal".
|
||||
@default "vertical"
|
||||
*/
|
||||
gradientOrientation: string;
|
||||
/** Specifies whether the graph is hidden. Do not use this to show/hide the graph, use hideGraph(graph) and showGraph(graph) methods instead. */
|
||||
/** Specifies whether the graph is hidden. Do not use this to show/hide the graph, use hideGraph(graph) and showGraph(graph) methods instead.
|
||||
@default false
|
||||
*/
|
||||
hidden: boolean;
|
||||
/** If there are more data points than hideBulletsCount, the bullets will not be shown. 0 means the bullets will always be visible. */
|
||||
/** If there are more data points than hideBulletsCount, the bullets will not be shown. 0 means the bullets will always be visible.
|
||||
@default 0
|
||||
*/
|
||||
hideBulletsCount: number;
|
||||
/** Name of the high field (used by candlesticks and ohlc) in your dataProvider. */
|
||||
highField: string;
|
||||
|
||||
/** Unique id of a graph. It is not required to set one, unless you want to use this graph for as your scrollbar's graph and need to indicate which graph should be used.*/
|
||||
id?: string;
|
||||
|
||||
/** Unique id of a graph. It is not required to set one, unless you want to use this graph for as your scrollbar's graph and need to indicate which graph should be used. */
|
||||
id: string;
|
||||
/** Whether to include this graph when calculating min and max value of the axis.
|
||||
@default true
|
||||
*/
|
||||
includeInMinMax: boolean;
|
||||
/** Data label text anchor.
|
||||
@default "auto"
|
||||
*/
|
||||
labelAnchor: string;
|
||||
/** Name of label color field in data provider. */
|
||||
labelColorField: string;
|
||||
/** Position of value label. Possible values are: "bottom", "top", "right", "left", "inside", "middle". Sometimes position is changed by the chart, depending on a graph type, rotation, etc. top */
|
||||
/** You can use it to format labels of data items in any way you want. Graph will call this function and pass reference to GraphDataItem and formatted text as attributes. This function should return string which will be displayed as label. */
|
||||
labelFunction(value: number, valueText: string, valueAxis: ValueAxis): string;
|
||||
labelFunction(valueText: string, data: Date, valueAxis: ValueAxis): string;
|
||||
/** Offset of data label.
|
||||
@default 0
|
||||
*/
|
||||
labelOffset: number;
|
||||
/** Position of value label. Possible values are: "bottom", "top", "right", "left", "inside", "middle". Sometimes position is changed by the chart, depending on a graph type, rotation, etc.
|
||||
@default "top"
|
||||
*/
|
||||
labelPosition: string;
|
||||
/** Rotation of a data label.
|
||||
@default 0
|
||||
*/
|
||||
labelRotation: number;
|
||||
/** Value label text. You can use tags like [[value]], [[description]], [[percents]], [[open]], [[category]]. */
|
||||
labelText: string;
|
||||
/** Legend marker opacity. Will use lineAlpha if not set. Value range is 0 - 1. */
|
||||
legendAlpha: number;
|
||||
/** Legend marker color. Will use lineColor if not set. */
|
||||
legendColor: string;
|
||||
/** It is called and the following attributes are passed: dataItem, formattedText, periodValues, periodPercentValues. It should return hex color code which will be used for legend marker. */
|
||||
legendColorFunction: Object;
|
||||
/** The text which will be displayed in the value portion of the legend when user is not hovering above any data point. The tags should be made out of two parts - the name of a field (value / open / close / high / low) and the value of the period you want to be show - open / close / high / low / sum / average / count. For example: [[value.sum]] means that sum of all data points of value field in the selected period will be displayed. */
|
||||
legendPeriodValueText: string;
|
||||
/** Legend value text. You can use tags like [[value]], [[description]], [[percents]], [[open]], [[category]] You can also use custom fields from your dataProvider. If not set, uses Legend's valueText. */
|
||||
legendValueText: string;
|
||||
/** Opacity of the line (or column border). Value range is 0 - 1.
|
||||
@default 1
|
||||
*/
|
||||
lineAlpha: number;
|
||||
/** Color of the line (or column border). If you do not set any, the color from [[AmCoordinateChart */
|
||||
/** Color of the line (or column border). If you do not set any, the color from AmCoordinateChart.colors array will be used for each subsequent graph. */
|
||||
lineColor: string;
|
||||
/** Name of the line color field (used by columns and candlesticks only) in your dataProvider. */
|
||||
/** Name of the line color field in your dataProvider. This property adds a possibility to change graphs’ line color on any data point to create highlighted sections of the graph. Works only with AmSerialChart. */
|
||||
lineColorField: string;
|
||||
/** Specifies thickness of the graph line (or column border).
|
||||
@default 1
|
||||
@@ -2305,55 +2394,125 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
lineThickness: number;
|
||||
/** Name of the low field (used by candlesticks and ohlc) in your dataProvider. */
|
||||
lowField: string;
|
||||
/** Legend marker type. You can set legend marker (key) type for individual graphs. Possible values are: "square", "circle", "line", "dashedLine", "triangleUp", "triangleDown", "bubble". */
|
||||
/** Legend marker type. You can set legend marker (key) type for individual graphs. Possible values are: square, circle, diamond, triangleUp, triangleDown, triangleLeft, triangleDown, bubble, line, none. */
|
||||
markerType: string;
|
||||
/** Specifies size of the bullet which value is the biggest (XY chart).
|
||||
@default 50
|
||||
*/
|
||||
maxBulletSize: number;
|
||||
/** Specifies minimum size of the bullet (XY chart). */
|
||||
/** Specifies minimum size of the bullet (XY chart).
|
||||
@default 4
|
||||
*/
|
||||
minBulletSize: number;
|
||||
/** If you use different colors for your negative values, a graph below zero line is filled with negativeColor. With this property you can define a different base value at which colors should be changed to negative colors. */
|
||||
/** It is useful if you have really lots of data points. Based on this property the graph will omit some of the lines (if the distance between points is less that minDistance, in pixels). This will not affect the bullets or indicator in anyway, so the user will not see any difference (unless you set minValue to a bigger value, let say 5), but will increase performance as less lines will be drawn. By setting value to a bigger number you can also make your lines look less jagged.
|
||||
@default 1
|
||||
*/
|
||||
minDistance: number;
|
||||
/** If you use different colors for your negative values, a graph below zero line is filled with negativeColor. With this property you can define a different base value at which colors should be changed to negative colors.
|
||||
@default 0
|
||||
*/
|
||||
negativeBase: number;
|
||||
/** Fill opacity of negative part of the graph. Will use fillAlphas if not set. */
|
||||
negativeFillAlphas: number;
|
||||
/** Fill color of negative part of the graph. Will use fillColors if not set. */
|
||||
negativeFillColors: any; //String /Array;
|
||||
negativeFillColors: string;
|
||||
/** Opacity of the negative portion of the line (or column border). Value range is 0 - 1.
|
||||
@default 1
|
||||
*/
|
||||
negativeLineAlpha: number;
|
||||
/** Color of the line (or column) when the values are negative. In case the graph type is candlestick or ohlc, negativeLineColor is used when close value is less then open value. */
|
||||
negativeLineColor: string;
|
||||
/** Example: {precision:-1, decimalSeparator:'.', thousandsSeparator:','}. The graph uses this object's values to format the numbers. Uses chart's numberFormatter if not defined. */
|
||||
numberFormatter: Object;
|
||||
/** If you set it to true, column chart will begin new stack. This allows having Clustered and Stacked column/bar chart. */
|
||||
newStack: boolean;
|
||||
/** Name of the open field (used by floating columns, candlesticks and ohlc) in your dataProvider.
|
||||
@default 50
|
||||
/** If you set it to true, column chart will begin new stack. This allows having Clustered and Stacked column/bar chart.
|
||||
@default false
|
||||
*/
|
||||
newStack: boolean;
|
||||
/** In case you want to have a step line graph without risers, you should set this to true.
|
||||
@default false
|
||||
*/
|
||||
noStepRisers: boolean;
|
||||
/** Name of the open field (used by floating columns, candlesticks and ohlc) in your dataProvider. */
|
||||
openField: string;
|
||||
/**Precision of values. Will use chart's precision if not set any.*/
|
||||
precision: number;
|
||||
/** Specifies where data points should be placed - on the beginning of the period (day, hour, etc) or in the middle (only when parseDates property of categoryAxis is set to true). This setting affects Serial chart only. Possible values are "start" and "middle". middle */
|
||||
/** Value of pattern should be object with url, width, height of an image, optionally it might have x, y, randomX and randomY values. For example: {"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4}. If you want to have individual patterns for each column, define patterns in data provider and set graph.patternField property. Check amcharts/patterns folder for some patterns. You can create your own patterns and use them. Note, x, y, randomX and randomY properties won't work with IE8 and older. 3D bar/Pie charts won't work properly with patterns. */
|
||||
pattern: Object;
|
||||
/** Field name in your data provider which holds pattern information. Value of pattern should be object with url, width, height of an image, optionally it might have x, y, randomX and randomY values. For example: {"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4}. Check amcharts/patterns folder for some patterns. You can create your own patterns and use them. Note, x, y, randomX and randomY properties won't work with IE8 and older. 3D bar/Pie charts won't work properly with patterns. */
|
||||
patternField: string;
|
||||
/** This property can be used by step graphs - you can set how many periods one horizontal line should span.
|
||||
@default 1
|
||||
*/
|
||||
periodSpan: number;
|
||||
/** Specifies where data points should be placed - on the beginning of the period (day, hour, etc) or in the middle (only when parseDates property of categoryAxis is set to true). This setting affects Serial chart only. Possible values are "start", "middle" and "end"
|
||||
@default "middle"
|
||||
*/
|
||||
pointPosition: string;
|
||||
/** If graph's type is column and labelText is set, graph hides labels which do not fit into the column's space. If you don't want these labels to be hidden, set this to true. */
|
||||
/** Precision of values. Will use chart's precision if not set any. */
|
||||
precision: number;
|
||||
/** If this is set to true, candlesticks will be colored in a different manner - if current close is less than current open, the candlestick will be empty, otherwise - filled with color. If previous close is less than current close, the candlestick will use positive color, otherwise - negative color.
|
||||
@default false
|
||||
*/
|
||||
proCandlesticks: boolean;
|
||||
/** Gantt chart only. Contains unmodified segment object from data provider. */
|
||||
segmentData: Object;
|
||||
/** If graph's type is column and labelText is set, graph hides labels which do not fit into the column's space or go outside plot area. If you don't want these labels to be hidden, set this to true.
|
||||
@default false
|
||||
*/
|
||||
showAllValueLabels: boolean;
|
||||
/** Specifies whether the value balloon of this graph is shown when mouse is over data item or chart's indicator is over some series.
|
||||
@default true
|
||||
*/
|
||||
showBalloon: boolean;
|
||||
/** Specifies graphs value at which cursor is showed. This is only important for candlestick and ohlc charts, also if column chart has "open" value. Possible values are: "open", "close", "high", "low". close */
|
||||
/** Specifies graphs value at which cursor is showed. This is only important for candlestick and ohlc charts, also if column chart has "open" value. Possible values are: "open", "close", "high", "low". "top" and "bottom" values will glue the balloon to top/bottom of the plot area.
|
||||
@default "close"
|
||||
*/
|
||||
showBalloonAt: string;
|
||||
/** Works with candlestick graph type, you can set it to open, close, high, low. If you set it to high, the events will be shown at the tip of the high line.
|
||||
@default "close"
|
||||
*/
|
||||
showBulletsAt: string;
|
||||
/** If you want mouse pointer to change to hand when hovering the graph, set this property to true.
|
||||
@default false
|
||||
*/
|
||||
showHandOnHover: boolean;
|
||||
/** It can only be used together with topRadius (when columns look like cylinders). If you set it to true, the cylinder will be lowered down so that the center of it's bottom circle would be right on category axis.
|
||||
@default false
|
||||
*/
|
||||
showOnAxis: boolean;
|
||||
/** If the value axis of this graph has stack types like "regular" or "100%" You can exclude this graph from stacking.
|
||||
@default true
|
||||
*/
|
||||
stackable: boolean;
|
||||
/** Step graph only. Specifies to which direction step should be drawn.
|
||||
@default "right"
|
||||
*/
|
||||
stepDirection: string;
|
||||
/** If you set it to false, the graph will not be hidden when user clicks on legend entry.
|
||||
@default true
|
||||
*/
|
||||
switchable: boolean;
|
||||
/** In case you set it to some number, the chart will set focus on bullet/column (starting from first) when user clicks tab key. When a focus is set, screen readers like NVDA Screen reader will read label which is set using accessibleLabel property of AmGraph. Note, not all browsers and readers support this. */
|
||||
tabIndex: number;
|
||||
/** Graph title. */
|
||||
title: string;
|
||||
/** Type of the graph. Possible values are: "line", "column", "step", "smoothedLine", "candlestick", "ohlc". XY and Radar charts can only display "line" type graphs. line */
|
||||
/** If you set this to 1, columns will become cylinders (must set depth3D and angle properties of a chart to >0 values in order this to be visible). you can make columns look like cones (set topRadius to 0) or even like some glasses (set to bigger than 1). We strongly recommend setting grid opacity to 0 in order this to look good. */
|
||||
topRadius: number;
|
||||
/** Type of the graph. Possible values are: "line", "column", "step", "smoothedLine", "candlestick", "ohlc". XY and Radar charts can only display "line" type graphs.
|
||||
@default "line"
|
||||
*/
|
||||
type: string;
|
||||
/** Name of the url field in your dataProvider. */
|
||||
urlField: string;
|
||||
/** Target to open URLs in, i.e. _blank, _top, etc. */
|
||||
urlTarget: string;
|
||||
/** Specifies which value axis the graph will use. Will use the first value axis if not set. */
|
||||
/** If set to true, the bullet border will take the same color as graph line.
|
||||
@default false
|
||||
*/
|
||||
useLineColorForBulletBorder: boolean;
|
||||
/** If negativeLineColor and/or negativeFillColors are set and useNegativeColorIfDown is set to true (default is false), the line, step and column graphs will use these colors for lines, bullets or columns if previous value is bigger than current value. In case you set openField for the graph, the graph will compare current value with openField value instead of comparing to previous value. Here is a demo.
|
||||
@default false
|
||||
*/
|
||||
useNegativeColorIfDown: boolean;
|
||||
/** Specifies which value axis the graph will use. Will use the first value axis if not set. You can use reference to the real ValueAxis object or set value axis id.
|
||||
@default ValueAxis
|
||||
*/
|
||||
valueAxis: ValueAxis;
|
||||
/** Name of the value field in your dataProvider. */
|
||||
valueField: string;
|
||||
@@ -2361,11 +2520,15 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
|
||||
@default true
|
||||
*/
|
||||
visibleInLegend: boolean;
|
||||
/** XY chart only. A horizontal value axis object to attach graph to. */
|
||||
/** XY chart only. A horizontal value axis object to attach graph to.
|
||||
@default ValueAxis
|
||||
*/
|
||||
xAxis: ValueAxis;
|
||||
/** XY chart only. Name of the x field in your dataProvider. */
|
||||
xField: string;
|
||||
/** XY chart only. A vertical value axis object to attach graph to. */
|
||||
/** XY chart only. A vertical value axis object to attach graph to.
|
||||
@default ValueAxis
|
||||
*/
|
||||
yAxis: ValueAxis;
|
||||
/** XY chart only. Name of the y field in your dataProvider. */
|
||||
yField: string;
|
||||
|
||||
Vendored
+1
-1
@@ -63,4 +63,4 @@ export interface ConfirmChannel extends Channel {
|
||||
waitForConfirms(): Promise<void>;
|
||||
}
|
||||
|
||||
export function connect(url: string, socketOptions?: any): Promise<Connection>;
|
||||
export function connect(url: string | Options.Connect, socketOptions?: any): Promise<Connection>;
|
||||
|
||||
Vendored
+59
-1
@@ -21,6 +21,64 @@ export namespace Replies {
|
||||
}
|
||||
|
||||
export namespace Options {
|
||||
interface Connect {
|
||||
/**
|
||||
* The to be used protocol
|
||||
*
|
||||
* Default value: 'amqp'
|
||||
*/
|
||||
protocol?: string;
|
||||
/**
|
||||
* Hostname used for connecting to the server.
|
||||
*
|
||||
* Default value: 'localhost'
|
||||
*/
|
||||
hostname?: string;
|
||||
/**
|
||||
* Port used for connecting to the server.
|
||||
*
|
||||
* Default value: 5672
|
||||
*/
|
||||
port?: number;
|
||||
/**
|
||||
* Username used for authenticating against the server.
|
||||
*
|
||||
* Default value: 'guest'
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* Password used for authenticating against the server.
|
||||
*
|
||||
* Default value: 'guest'
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* The desired locale for error messages. RabbitMQ only ever uses en_US
|
||||
*
|
||||
* Default value: 'en_US'
|
||||
*/
|
||||
locale?: string;
|
||||
/**
|
||||
* The size in bytes of the maximum frame allowed over the connection. 0 means
|
||||
* no limit (but since frames have a size field which is an unsigned 32 bit integer, it’s perforce 2^32 - 1).
|
||||
*
|
||||
* Default value: 0x1000 (4kb) - That's the allowed minimum, it will fit many purposes
|
||||
*/
|
||||
frameMax?: number;
|
||||
/**
|
||||
* The period of the connection heartbeat in seconds.
|
||||
*
|
||||
* Default value: 0
|
||||
*/
|
||||
heartbeat?: number;
|
||||
/**
|
||||
* What VHost shall be used.
|
||||
*
|
||||
* Default value: '/'
|
||||
*/
|
||||
vhost?: string;
|
||||
}
|
||||
|
||||
interface AssertQueue {
|
||||
exclusive?: boolean;
|
||||
durable?: boolean;
|
||||
@@ -85,4 +143,4 @@ export interface Message {
|
||||
content: Buffer;
|
||||
fields: any;
|
||||
properties: any;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
## What is it?
|
||||
|
||||
This is a typescript interface to be used with [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys/).
|
||||
|
||||
## What are declaration files?
|
||||
|
||||
See the [TypeScript handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html).
|
||||
|
||||
|
||||
## How do I get them?
|
||||
|
||||
### npm
|
||||
|
||||
This is the preferred method. This is only available for TypeScript 2.0+ users. For these typings:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @types/angular-hotkeys
|
||||
```
|
||||
|
||||
The types should then be automatically included by the compiler.
|
||||
See more in the [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html).
|
||||
|
||||
|
||||
### Other methods
|
||||
|
||||
These can be used by TypeScript 1.0.
|
||||
|
||||
* [Typings](https://github.com/typings/typings)
|
||||
* ~~[NuGet](http://nuget.org/Tpackages?q=DefinitelyTyped)~~ (use preferred alternatives, nuget DT type publishing has been turned off)
|
||||
* Manually download from the `master` branch of this repository
|
||||
|
||||
You may need to add manual [references](http://www.typescriptlang.org/docs/handbook/triple-slash-directives.html).
|
||||
|
||||
## How to use
|
||||
|
||||
After installing a package you can import the definition file and begin using it as so:
|
||||
|
||||
```ts
|
||||
|
||||
import * as hotkeys from '../../node_modules/@types/angular-hotkeys'
|
||||
|
||||
class FooController {
|
||||
static $inject = [
|
||||
'hotkeys'
|
||||
];
|
||||
|
||||
constructor(
|
||||
private hotkeys: ng.hotkeys.HotkeysProvider
|
||||
) { }
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
for a detailed explanation of the behavior of angular-hotkeys please refer to [its documentation](https://github.com/chieffancypants/angular-hotkeys/)
|
||||
|
||||
@@ -1,30 +1,67 @@
|
||||
var scope: ng.IScope;
|
||||
var hotkeyProvider: ng.hotkeys.HotkeysProvider;
|
||||
var hotkeyObj: ng.hotkeys.Hotkey;
|
||||
import { HotkeysProvider, Hotkey } from 'angular-hotkeys';
|
||||
import { module } from 'angular';
|
||||
|
||||
hotkeyProvider.add("mod+s", "saves a file", (event: Event, hotkey: ng.hotkeys.Hotkey) => {} );
|
||||
hotkeyProvider.add(["mod+s"], "saves a file", (event: Event, hotkey: ng.hotkeys.Hotkey) => {} );
|
||||
hotkeyProvider.add(hotkeyObj);
|
||||
hotkeyProvider.bindTo(scope);
|
||||
hotkeyProvider.del("mod+s");
|
||||
hotkeyProvider.del(["mod+s"]);
|
||||
hotkeyProvider.get("mod+s");
|
||||
hotkeyProvider.get(["mod+s"]);
|
||||
hotkeyProvider.toggleCheatSheet();
|
||||
|
||||
hotkeyProvider.add(hotkeyObj.combo, hotkeyObj.description ,hotkeyObj.callback);
|
||||
|
||||
hotkeyProvider.bindTo(scope)
|
||||
.add(hotkeyObj)
|
||||
.add(hotkeyObj)
|
||||
.add({
|
||||
combo: 'w',
|
||||
description: 'blah blah',
|
||||
callback: function() {}
|
||||
})
|
||||
.add({
|
||||
combo: ['w', 'mod+w'],
|
||||
description: 'blah blah',
|
||||
callback: function() {}
|
||||
module('myApp', ['cfp.hotkeys'])
|
||||
.config((hotkeysProvider: HotkeysProvider) => {
|
||||
hotkeysProvider.includeCheatSheet = false;
|
||||
const somehotKeyObj: Hotkey = {
|
||||
combo: '',
|
||||
callback: () => { }
|
||||
};
|
||||
});
|
||||
|
||||
function someInjectionService(
|
||||
scope: ng.IScope,
|
||||
hotkeyProvider: ng.hotkeys.HotkeysProvider,
|
||||
hotkeyObj: ng.hotkeys.Hotkey
|
||||
) {
|
||||
hotkeyProvider.add("mod+s", "saves a file", (event: Event, hotkey: ng.hotkeys.Hotkey) => { });
|
||||
hotkeyProvider.add(["mod+s"], "saves a file", (event: Event, hotkey: ng.hotkeys.Hotkey) => { });
|
||||
hotkeyProvider.add(hotkeyObj);
|
||||
hotkeyProvider.bindTo(scope);
|
||||
hotkeyProvider.del("mod+s");
|
||||
hotkeyProvider.del(["mod+s"]);
|
||||
hotkeyProvider.get("mod+s");
|
||||
hotkeyProvider.get(["mod+s"]);
|
||||
hotkeyProvider.toggleCheatSheet();
|
||||
|
||||
hotkeyProvider.add(hotkeyObj.combo, hotkeyObj.description, hotkeyObj.callback);
|
||||
|
||||
hotkeyProvider.bindTo(scope)
|
||||
.add(hotkeyObj)
|
||||
.add(hotkeyObj)
|
||||
.add({
|
||||
combo: 'w',
|
||||
description: 'blah blah',
|
||||
callback: () => { }
|
||||
})
|
||||
.add({
|
||||
combo: ['w', 'mod+w'],
|
||||
description: 'blah blah',
|
||||
callback: () => { }
|
||||
});
|
||||
|
||||
hotkeyProvider.add({
|
||||
combo: 'ctrl+w',
|
||||
description: 'Description goes here',
|
||||
callback: (event, hotkey) => {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
hotkeyProvider.add({
|
||||
combo: 'ctrl+x',
|
||||
callback: (event, hotkey) => {
|
||||
//
|
||||
}
|
||||
});
|
||||
|
||||
hotkeyProvider.add({
|
||||
combo: 'ctrl+w',
|
||||
description: 'Description goes here',
|
||||
allowIn: ['INPUT', 'SELECT', 'TEXTAREA'],
|
||||
callback(event, hotkey) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Vendored
+99
-24
@@ -1,12 +1,10 @@
|
||||
// Type definitions for angular-hotkeys
|
||||
// Type definitions for angular-hotkeys 1.7
|
||||
// Project: https://github.com/chieffancypants/angular-hotkeys
|
||||
// Definitions by: Jason Zhao <https://github.com/jlz27>, Stefan Steinhart <https://github.com/reppners>
|
||||
// Definitions by: Jason Zhao <https://github.com/jlz27>
|
||||
// Stefan Steinhart <https://github.com/reppners>
|
||||
// Cyril Gandon <https://github.com/cyrilgandon>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
//readme written by David Valentine <https://github.com/dvalenti314>
|
||||
|
||||
|
||||
/// <reference types="angular" />
|
||||
|
||||
import * as ng from 'angular';
|
||||
|
||||
@@ -15,46 +13,123 @@ export type HotkeysProviderChained = ng.hotkeys.HotkeysProviderChained;
|
||||
export type Hotkey = ng.hotkeys.Hotkey;
|
||||
|
||||
declare module 'angular' {
|
||||
export namespace hotkeys {
|
||||
|
||||
namespace hotkeys {
|
||||
interface HotkeysProvider {
|
||||
template: string;
|
||||
templateTitle: string;
|
||||
/**
|
||||
* Configurable setting to disable the cheatsheet entirely.
|
||||
* @default true
|
||||
*/
|
||||
includeCheatSheet: boolean;
|
||||
/**
|
||||
* Configurable setting to disable ngRoute hooks.
|
||||
*/
|
||||
useNgRoute: boolean;
|
||||
/**
|
||||
* Configurable setting for the cheat sheet title
|
||||
* @default 'Keyboard Shortcuts'
|
||||
*/
|
||||
templateTitle: string;
|
||||
/**
|
||||
* Configurable settings for the cheat sheet header in HTML.
|
||||
* This overrides the normal title if specified.
|
||||
* @default null
|
||||
*/
|
||||
templateHeader: string | null;
|
||||
/**
|
||||
* Configurable settings for the cheat sheet footer in HTML.
|
||||
* @default null
|
||||
*/
|
||||
templateFooter: string | null;
|
||||
/**
|
||||
* Cheat sheet template in the event you want to totally customize it.
|
||||
*/
|
||||
template: string;
|
||||
/**
|
||||
* Configurable setting for the cheat sheet hotkey.
|
||||
* @default '?'
|
||||
*/
|
||||
cheatSheetHotkey: string;
|
||||
/**
|
||||
* Configurable setting for the cheat sheet description.
|
||||
* @default 'Show / hide this help menu'
|
||||
*/
|
||||
cheatSheetDescription: string;
|
||||
|
||||
add(combo: string | string[], callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array<string>, persistent?: boolean): ng.hotkeys.Hotkey;
|
||||
/**
|
||||
* Creates a new Hotkey and creates the Mousetrap binding.
|
||||
*/
|
||||
add(combo: string | string[], description?: string, callback?: (event: Event, hotkey: Hotkey) => void, action?: string, allowIn?: string[], persistent?: boolean): Hotkey;
|
||||
|
||||
add(combo: string | string[], description: string, callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array<string>, persistent?: boolean): ng.hotkeys.Hotkey;
|
||||
/**
|
||||
* Creates a new Hotkey and creates the Mousetrap binding.
|
||||
*/
|
||||
add(hotkeyObj: Hotkey): Hotkey;
|
||||
|
||||
add(hotkeyObj: ng.hotkeys.Hotkey): ng.hotkeys.Hotkey;
|
||||
/**
|
||||
* Binds the hotkey to a particular scope.
|
||||
* Useful if the scope is destroyed, we can automatically destroy the hotkey binding.
|
||||
* @param scope The scope to bind to
|
||||
*/
|
||||
bindTo(scope: IScope): HotkeysProviderChained;
|
||||
|
||||
bindTo(scope: ng.IScope): ng.hotkeys.HotkeysProviderChained;
|
||||
/**
|
||||
* Removes and unbinds a hotkey
|
||||
* @param combo The keyboard combo (shortcut) or the HotKey object
|
||||
*/
|
||||
del(combo: string | string[] | Hotkey): void;
|
||||
|
||||
del(combo: string | string[]): void;
|
||||
|
||||
del(hotkeyObj: ng.hotkeys.Hotkey): void;
|
||||
|
||||
get(combo: string | string[]): ng.hotkeys.Hotkey;
|
||||
/**
|
||||
* Returns the Hotkey object
|
||||
* @param combo The keyboard combo (shortcut)
|
||||
*/
|
||||
get(combo: string | string[]): Hotkey;
|
||||
|
||||
/**
|
||||
* Toggles the help menu element's visiblity
|
||||
*/
|
||||
toggleCheatSheet(): void;
|
||||
|
||||
/**
|
||||
* Purges all non-persistent hotkeys (such as those defined in routes)
|
||||
*
|
||||
* Without this, the same hotkey would get recreated everytime
|
||||
* the route is accessed.
|
||||
*/
|
||||
purgeHotkeys(): void;
|
||||
}
|
||||
|
||||
interface HotkeysProviderChained {
|
||||
add(combo: string | string[], description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): HotkeysProviderChained;
|
||||
add(combo: string | string[], description: string, callback: (event: Event, hotkeys: Hotkey) => void): HotkeysProviderChained;
|
||||
|
||||
add(hotkeyObj: ng.hotkeys.Hotkey): HotkeysProviderChained;
|
||||
add(hotkeyObj: Hotkey): HotkeysProviderChained;
|
||||
}
|
||||
|
||||
interface Hotkey {
|
||||
/**
|
||||
* They keyboard combo (shortcut) you want to bind to.
|
||||
*/
|
||||
combo: string | string[];
|
||||
/**
|
||||
* The description for what the combo does and is only used for the Cheat Sheet.
|
||||
* If it is not supplied, it will not show up, and in effect, allows you to have unlisted hotkeys.
|
||||
*/
|
||||
description?: string;
|
||||
callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void;
|
||||
/**
|
||||
* The function to execute when the key(s) are pressed. Passes along two arguments, event and hotkey
|
||||
*/
|
||||
callback(event: Event, hotkey: Hotkey): void;
|
||||
/**
|
||||
* The type of event to listen for, such as keypress, keydown or keyup.
|
||||
* Usage of this parameter is discouraged as the underlying library will pick the most suitable option automatically.
|
||||
* This should only be necessary in advanced situations.
|
||||
*/
|
||||
action?: string;
|
||||
allowIn?: Array<string>;
|
||||
/**
|
||||
* An array of tag names to allow this combo in ('INPUT', 'SELECT', and/or 'TEXTAREA')
|
||||
*/
|
||||
allowIn?: Array<'INPUT' | 'SELECT' | 'TEXTAREA'>;
|
||||
/**
|
||||
* Whether the hotkey persists navigation events
|
||||
*/
|
||||
persistent?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
@@ -21,4 +21,4 @@
|
||||
"index.d.ts",
|
||||
"angular-hotkeys-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,79 +1 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"adjacent-overload-signatures": false,
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"new-parens": false,
|
||||
"no-any-union": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-construct": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-duplicate-variable": false,
|
||||
"no-empty-interface": false,
|
||||
"no-for-in-array": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-misused-new": false,
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-useless-files": false,
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-method-signature": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"space-within-parens": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"trim-file": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false,
|
||||
"whitespace": false
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
@@ -5,6 +5,7 @@ interface TestScope extends ng.IScope {
|
||||
}
|
||||
|
||||
myApp.config((
|
||||
$mdAriaProvider: ng.material.IAriaProvider,
|
||||
$mdThemingProvider: ng.material.IThemingProvider,
|
||||
$mdIconProvider: ng.material.IIconProvider,
|
||||
$mdProgressCircularProvider: ng.material.IProgressCircularProvider) => {
|
||||
@@ -52,6 +53,9 @@ myApp.config((
|
||||
return c * Math.pow(2, (t / d - 1) * 10) + b;
|
||||
}
|
||||
});
|
||||
|
||||
// Globally disables all ARIA warnings.
|
||||
$mdAriaProvider.disableWarnings();
|
||||
});
|
||||
|
||||
myApp.controller('BottomSheetController', ($scope: TestScope, $mdBottomSheet: ng.material.IBottomSheetService, $q: ng.IQService) => {
|
||||
@@ -136,6 +140,9 @@ myApp.controller('DialogController', ($scope: TestScope, $mdDialog: ng.material.
|
||||
$scope['promptDialog'] = () => {
|
||||
$mdDialog.show($mdDialog.prompt().initialValue('Buddy'));
|
||||
};
|
||||
$scope['promptDialog'] = () => {
|
||||
$mdDialog.show($mdDialog.prompt().required(true));
|
||||
};
|
||||
$scope['prerenderedDialog'] = () => {
|
||||
$mdDialog.show({
|
||||
template: '<md-dialog>Hello!</md-dialog>',
|
||||
|
||||
Vendored
+6
-1
@@ -1,6 +1,6 @@
|
||||
// Type definitions for angular-material 1.1
|
||||
// Project: https://github.com/angular/material
|
||||
// Definitions by: Blake Bigelow <https://github.com/blbigelow>, Peter Hajdu <https://github.com/PeterHajdu>, Davide Donadello <https://github.com/Dona278>, Geert Jansen <https://github.com/geertjansen>
|
||||
// Definitions by: Blake Bigelow <https://github.com/blbigelow>, Peter Hajdu <https://github.com/PeterHajdu>, Davide Donadello <https://github.com/Dona278>, Geert Jansen <https://github.com/geertjansen>, Edward Knowles <https://github.com/eknowles>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -11,6 +11,10 @@ export = _;
|
||||
|
||||
declare module 'angular' {
|
||||
namespace material {
|
||||
interface IAriaProvider {
|
||||
disableWarnings(): void;
|
||||
}
|
||||
|
||||
interface ResolveObject {
|
||||
[name: string]: Injectable<(...args: any[]) => PromiseLike<any>>;
|
||||
}
|
||||
@@ -76,6 +80,7 @@ declare module 'angular' {
|
||||
|
||||
interface IPromptDialog extends IPresetDialog<IPromptDialog> {
|
||||
cancel(cancel: string): IPromptDialog;
|
||||
required(required: boolean): IPromptDialog; // default: false
|
||||
placeholder(placeholder: string): IPromptDialog;
|
||||
initialValue(initialValue: string): IPromptDialog;
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@ declare var $sanitizeService: ng.sanitize.ISanitizeService;
|
||||
shouldBeString = $sanitizeService(shouldBeString);
|
||||
|
||||
declare var $linky: ng.sanitize.filter.ILinky;
|
||||
shouldBeString = $linky(shouldBeString);
|
||||
shouldBeString = $linky(shouldBeString, "target");
|
||||
shouldBeString = $linky(shouldBeString, shouldBeString);
|
||||
|
||||
Vendored
+1
-1
@@ -36,7 +36,7 @@ declare module 'angular' {
|
||||
* see https://docs.angularjs.org/api/ngSanitize/filter/linky
|
||||
*/
|
||||
interface ILinky {
|
||||
(text: string, target: string, attributes?: { [attribute: string]: string } | ((url: string) => { [attribute: string]: string })): string;
|
||||
(text: string, target?: string, attributes?: { [attribute: string]: string } | ((url: string) => { [attribute: string]: string })): string;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import ansiRegex = require("ansi-regex");
|
||||
|
||||
ansiRegex(); // $ExpectType RegExp
|
||||
|
||||
// From the ansi-regex README.md
|
||||
ansiRegex().test('\u001B[4mcake\u001B[0m'); // $ExpectType boolean
|
||||
// => true
|
||||
|
||||
ansiRegex().test('cake'); // $ExpectType boolean
|
||||
// => false
|
||||
|
||||
'\u001B[4mcake\u001B[0m'.match(ansiRegex()); // $ExpectType RegExpMatchArray | null
|
||||
// => ['\u001B[4m', '\u001B[0m']
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// Type definitions for ansi-regex 3.0
|
||||
// Project: https://github.com/chalk/ansi-regex#readme
|
||||
// Definitions by: Manish Vachharajani <https://github.com/mvachhar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function r(): RegExp;
|
||||
export = r;
|
||||
@@ -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",
|
||||
"ansi-regex-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
+1
-1
@@ -777,7 +777,7 @@ declare module Microsoft.ApplicationInsights {
|
||||
* @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.
|
||||
* @param accountId {string} - An optional string to represent the account associated with the authenticated user.
|
||||
*/
|
||||
setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string): any;
|
||||
setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie?: boolean): any;
|
||||
/**
|
||||
* Clears the authenticated user id and the account id from the user context.
|
||||
*/
|
||||
|
||||
Vendored
+1
-1
@@ -5265,7 +5265,7 @@ export interface CursorPositionChangedEvent {
|
||||
newBufferPosition: Point;
|
||||
newScreenPosition: Point;
|
||||
textChanged: boolean;
|
||||
Cursor: Cursor;
|
||||
cursor: Cursor;
|
||||
}
|
||||
|
||||
export interface DecorationPropsChangedEvent {
|
||||
|
||||
Vendored
+2
-2
@@ -529,8 +529,8 @@ export class ManagementClient {
|
||||
deleteEmailProvider(): Promise<any>;
|
||||
deleteEmailProvider(cb?: (err: Error, data: any) => void): void;
|
||||
|
||||
updateEmailProvider(data: Data): Promise<any>;
|
||||
updateEmailProvider(data: Data, cb?: (err: Error, data: any) => void): void;
|
||||
updateEmailProvider(params: {}, data: Data): Promise<any>;
|
||||
updateEmailProvider(params: {}, data: Data, cb?: (err: Error, data: any) => void): void;
|
||||
|
||||
|
||||
// Statistics
|
||||
|
||||
Vendored
+2
-1
@@ -1,6 +1,6 @@
|
||||
// Type definitions for AutobahnJS v0.9.7
|
||||
// Project: http://autobahn.ws/js/
|
||||
// Definitions by: Elad Zelingher <https://github.com/darkl>, Andy Hawkins <https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com>, Wladimir Totino <https://github.com/valepu>
|
||||
// Definitions by: Elad Zelingher <https://github.com/darkl>, Andy Hawkins <https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com>, Wladimir Totino <https://github.com/valepu>, Mathias Teier <https://github.com/glenroy37/,http://kagent.at>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="when" />
|
||||
@@ -179,6 +179,7 @@ declare namespace autobahn {
|
||||
|
||||
interface ISubscribeOptions {
|
||||
match?: string;
|
||||
get_retained?: boolean;
|
||||
}
|
||||
|
||||
interface IRegisterOptions {
|
||||
|
||||
Vendored
+178
-178
@@ -600,185 +600,185 @@ export class NodePath<T = Node> {
|
||||
addComments(type: string, comments: any[]): void;
|
||||
|
||||
// ------------------------- isXXX -------------------------
|
||||
isArrayExpression(opts?: object): boolean;
|
||||
isAssignmentExpression(opts?: object): boolean;
|
||||
isBinaryExpression(opts?: object): boolean;
|
||||
isDirective(opts?: object): boolean;
|
||||
isDirectiveLiteral(opts?: object): boolean;
|
||||
isBlockStatement(opts?: object): boolean;
|
||||
isBreakStatement(opts?: object): boolean;
|
||||
isCallExpression(opts?: object): boolean;
|
||||
isCatchClause(opts?: object): boolean;
|
||||
isConditionalExpression(opts?: object): boolean;
|
||||
isContinueStatement(opts?: object): boolean;
|
||||
isDebuggerStatement(opts?: object): boolean;
|
||||
isDoWhileStatement(opts?: object): boolean;
|
||||
isEmptyStatement(opts?: object): boolean;
|
||||
isExpressionStatement(opts?: object): boolean;
|
||||
isFile(opts?: object): boolean;
|
||||
isForInStatement(opts?: object): boolean;
|
||||
isForStatement(opts?: object): boolean;
|
||||
isFunctionDeclaration(opts?: object): boolean;
|
||||
isFunctionExpression(opts?: object): boolean;
|
||||
isIdentifier(opts?: object): boolean;
|
||||
isIfStatement(opts?: object): boolean;
|
||||
isLabeledStatement(opts?: object): boolean;
|
||||
isStringLiteral(opts?: object): boolean;
|
||||
isNumericLiteral(opts?: object): boolean;
|
||||
isNullLiteral(opts?: object): boolean;
|
||||
isBooleanLiteral(opts?: object): boolean;
|
||||
isRegExpLiteral(opts?: object): boolean;
|
||||
isLogicalExpression(opts?: object): boolean;
|
||||
isMemberExpression(opts?: object): boolean;
|
||||
isNewExpression(opts?: object): boolean;
|
||||
isProgram(opts?: object): boolean;
|
||||
isObjectExpression(opts?: object): boolean;
|
||||
isObjectMethod(opts?: object): boolean;
|
||||
isObjectProperty(opts?: object): boolean;
|
||||
isRestElement(opts?: object): boolean;
|
||||
isReturnStatement(opts?: object): boolean;
|
||||
isSequenceExpression(opts?: object): boolean;
|
||||
isSwitchCase(opts?: object): boolean;
|
||||
isSwitchStatement(opts?: object): boolean;
|
||||
isThisExpression(opts?: object): boolean;
|
||||
isThrowStatement(opts?: object): boolean;
|
||||
isTryStatement(opts?: object): boolean;
|
||||
isUnaryExpression(opts?: object): boolean;
|
||||
isUpdateExpression(opts?: object): boolean;
|
||||
isVariableDeclaration(opts?: object): boolean;
|
||||
isVariableDeclarator(opts?: object): boolean;
|
||||
isWhileStatement(opts?: object): boolean;
|
||||
isWithStatement(opts?: object): boolean;
|
||||
isAssignmentPattern(opts?: object): boolean;
|
||||
isArrayPattern(opts?: object): boolean;
|
||||
isArrowFunctionExpression(opts?: object): boolean;
|
||||
isClassBody(opts?: object): boolean;
|
||||
isClassDeclaration(opts?: object): boolean;
|
||||
isClassExpression(opts?: object): boolean;
|
||||
isExportAllDeclaration(opts?: object): boolean;
|
||||
isExportDefaultDeclaration(opts?: object): boolean;
|
||||
isExportNamedDeclaration(opts?: object): boolean;
|
||||
isExportSpecifier(opts?: object): boolean;
|
||||
isForOfStatement(opts?: object): boolean;
|
||||
isImportDeclaration(opts?: object): boolean;
|
||||
isImportDefaultSpecifier(opts?: object): boolean;
|
||||
isImportNamespaceSpecifier(opts?: object): boolean;
|
||||
isImportSpecifier(opts?: object): boolean;
|
||||
isMetaProperty(opts?: object): boolean;
|
||||
isClassMethod(opts?: object): boolean;
|
||||
isObjectPattern(opts?: object): boolean;
|
||||
isSpreadElement(opts?: object): boolean;
|
||||
isSuper(opts?: object): boolean;
|
||||
isTaggedTemplateExpression(opts?: object): boolean;
|
||||
isTemplateElement(opts?: object): boolean;
|
||||
isTemplateLiteral(opts?: object): boolean;
|
||||
isYieldExpression(opts?: object): boolean;
|
||||
isAnyTypeAnnotation(opts?: object): boolean;
|
||||
isArrayTypeAnnotation(opts?: object): boolean;
|
||||
isBooleanTypeAnnotation(opts?: object): boolean;
|
||||
isBooleanLiteralTypeAnnotation(opts?: object): boolean;
|
||||
isNullLiteralTypeAnnotation(opts?: object): boolean;
|
||||
isClassImplements(opts?: object): boolean;
|
||||
isClassProperty(opts?: object): boolean;
|
||||
isDeclareClass(opts?: object): boolean;
|
||||
isDeclareFunction(opts?: object): boolean;
|
||||
isDeclareInterface(opts?: object): boolean;
|
||||
isDeclareModule(opts?: object): boolean;
|
||||
isDeclareTypeAlias(opts?: object): boolean;
|
||||
isDeclareVariable(opts?: object): boolean;
|
||||
isExistentialTypeParam(opts?: object): boolean;
|
||||
isFunctionTypeAnnotation(opts?: object): boolean;
|
||||
isFunctionTypeParam(opts?: object): boolean;
|
||||
isGenericTypeAnnotation(opts?: object): boolean;
|
||||
isInterfaceExtends(opts?: object): boolean;
|
||||
isInterfaceDeclaration(opts?: object): boolean;
|
||||
isIntersectionTypeAnnotation(opts?: object): boolean;
|
||||
isMixedTypeAnnotation(opts?: object): boolean;
|
||||
isNullableTypeAnnotation(opts?: object): boolean;
|
||||
isNumericLiteralTypeAnnotation(opts?: object): boolean;
|
||||
isNumberTypeAnnotation(opts?: object): boolean;
|
||||
isStringLiteralTypeAnnotation(opts?: object): boolean;
|
||||
isStringTypeAnnotation(opts?: object): boolean;
|
||||
isThisTypeAnnotation(opts?: object): boolean;
|
||||
isTupleTypeAnnotation(opts?: object): boolean;
|
||||
isTypeofTypeAnnotation(opts?: object): boolean;
|
||||
isTypeAlias(opts?: object): boolean;
|
||||
isTypeAnnotation(opts?: object): boolean;
|
||||
isTypeCastExpression(opts?: object): boolean;
|
||||
isTypeParameterDeclaration(opts?: object): boolean;
|
||||
isTypeParameterInstantiation(opts?: object): boolean;
|
||||
isObjectTypeAnnotation(opts?: object): boolean;
|
||||
isObjectTypeCallProperty(opts?: object): boolean;
|
||||
isObjectTypeIndexer(opts?: object): boolean;
|
||||
isObjectTypeProperty(opts?: object): boolean;
|
||||
isQualifiedTypeIdentifier(opts?: object): boolean;
|
||||
isUnionTypeAnnotation(opts?: object): boolean;
|
||||
isVoidTypeAnnotation(opts?: object): boolean;
|
||||
isJSXAttribute(opts?: object): boolean;
|
||||
isJSXClosingElement(opts?: object): boolean;
|
||||
isJSXElement(opts?: object): boolean;
|
||||
isJSXEmptyExpression(opts?: object): boolean;
|
||||
isJSXExpressionContainer(opts?: object): boolean;
|
||||
isJSXIdentifier(opts?: object): boolean;
|
||||
isJSXMemberExpression(opts?: object): boolean;
|
||||
isJSXNamespacedName(opts?: object): boolean;
|
||||
isJSXOpeningElement(opts?: object): boolean;
|
||||
isJSXSpreadAttribute(opts?: object): boolean;
|
||||
isJSXText(opts?: object): boolean;
|
||||
isNoop(opts?: object): boolean;
|
||||
isParenthesizedExpression(opts?: object): boolean;
|
||||
isAwaitExpression(opts?: object): boolean;
|
||||
isBindExpression(opts?: object): boolean;
|
||||
isDecorator(opts?: object): boolean;
|
||||
isDoExpression(opts?: object): boolean;
|
||||
isExportDefaultSpecifier(opts?: object): boolean;
|
||||
isExportNamespaceSpecifier(opts?: object): boolean;
|
||||
isRestProperty(opts?: object): boolean;
|
||||
isSpreadProperty(opts?: object): boolean;
|
||||
isExpression(opts?: object): boolean;
|
||||
isBinary(opts?: object): boolean;
|
||||
isScopable(opts?: object): boolean;
|
||||
isBlockParent(opts?: object): boolean;
|
||||
isBlock(opts?: object): boolean;
|
||||
isStatement(opts?: object): boolean;
|
||||
isTerminatorless(opts?: object): boolean;
|
||||
isCompletionStatement(opts?: object): boolean;
|
||||
isConditional(opts?: object): boolean;
|
||||
isLoop(opts?: object): boolean;
|
||||
isWhile(opts?: object): boolean;
|
||||
isExpressionWrapper(opts?: object): boolean;
|
||||
isFor(opts?: object): boolean;
|
||||
isForXStatement(opts?: object): boolean;
|
||||
isFunction(opts?: object): boolean;
|
||||
isFunctionParent(opts?: object): boolean;
|
||||
isPureish(opts?: object): boolean;
|
||||
isDeclaration(opts?: object): boolean;
|
||||
isLVal(opts?: object): boolean;
|
||||
isLiteral(opts?: object): boolean;
|
||||
isImmutable(opts?: object): boolean;
|
||||
isUserWhitespacable(opts?: object): boolean;
|
||||
isMethod(opts?: object): boolean;
|
||||
isObjectMember(opts?: object): boolean;
|
||||
isProperty(opts?: object): boolean;
|
||||
isUnaryLike(opts?: object): boolean;
|
||||
isPattern(opts?: object): boolean;
|
||||
isClass(opts?: object): boolean;
|
||||
isModuleDeclaration(opts?: object): boolean;
|
||||
isExportDeclaration(opts?: object): boolean;
|
||||
isModuleSpecifier(opts?: object): boolean;
|
||||
isFlow(opts?: object): boolean;
|
||||
isFlowBaseAnnotation(opts?: object): boolean;
|
||||
isFlowDeclaration(opts?: object): boolean;
|
||||
isJSX(opts?: object): boolean;
|
||||
isNumberLiteral(opts?: object): boolean;
|
||||
isRegexLiteral(opts?: object): boolean;
|
||||
isReferencedIdentifier(opts?: object): boolean;
|
||||
isReferencedMemberExpression(opts?: object): boolean;
|
||||
isBindingIdentifier(opts?: object): boolean;
|
||||
isScope(opts?: object): boolean;
|
||||
isArrayExpression(opts?: object): this is NodePath<t.ArrayExpression> ;
|
||||
isAssignmentExpression(opts?: object): this is NodePath<t.AssignmentExpression>;
|
||||
isBinaryExpression(opts?: object): this is NodePath<t.BinaryExpression>;
|
||||
isDirective(opts?: object): this is NodePath<t.Directive>;
|
||||
isDirectiveLiteral(opts?: object): this is NodePath<t.DirectiveLiteral>;
|
||||
isBlockStatement(opts?: object): this is NodePath<t.BlockStatement>;
|
||||
isBreakStatement(opts?: object): this is NodePath<t.BreakStatement>;
|
||||
isCallExpression(opts?: object): this is NodePath<t.CallExpression>;
|
||||
isCatchClause(opts?: object): this is NodePath<t.CatchClause>;
|
||||
isConditionalExpression(opts?: object): this is NodePath<t.ConditionalExpression>;
|
||||
isContinueStatement(opts?: object): this is NodePath<t.ContinueStatement>;
|
||||
isDebuggerStatement(opts?: object): this is NodePath<t.DebuggerStatement>;
|
||||
isDoWhileStatement(opts?: object): this is NodePath<t.DoWhileStatement>;
|
||||
isEmptyStatement(opts?: object): this is NodePath<t.EmptyStatement>;
|
||||
isExpressionStatement(opts?: object): this is NodePath<t.ExpressionStatement>;
|
||||
isFile(opts?: object): this is NodePath<t.File>;
|
||||
isForInStatement(opts?: object): this is NodePath<t.ForInStatement>;
|
||||
isForStatement(opts?: object): this is NodePath<t.ForStatement>;
|
||||
isFunctionDeclaration(opts?: object): this is NodePath<t.FunctionDeclaration>;
|
||||
isFunctionExpression(opts?: object): this is NodePath<t.FunctionExpression>;
|
||||
isIdentifier(opts?: object): this is NodePath<t.Identifier>;
|
||||
isIfStatement(opts?: object): this is NodePath<t.IfStatement>;
|
||||
isLabeledStatement(opts?: object): this is NodePath<t.LabeledStatement>;
|
||||
isStringLiteral(opts?: object): this is NodePath<t.StringLiteral>;
|
||||
isNumericLiteral(opts?: object): this is NodePath<t.NumericLiteral>;
|
||||
isNullLiteral(opts?: object): this is NodePath<t.NullLiteral>;
|
||||
isBooleanLiteral(opts?: object): this is NodePath<t.BooleanLiteral>;
|
||||
isRegExpLiteral(opts?: object): this is NodePath<t.RegExpLiteral>;
|
||||
isLogicalExpression(opts?: object): this is NodePath<t.LogicalExpression>;
|
||||
isMemberExpression(opts?: object): this is NodePath<t.MemberExpression>;
|
||||
isNewExpression(opts?: object): this is NodePath<t.NewExpression>;
|
||||
isProgram(opts?: object): this is NodePath<t.Program>;
|
||||
isObjectExpression(opts?: object): this is NodePath<t.ObjectExpression>;
|
||||
isObjectMethod(opts?: object): this is NodePath<t.ObjectMethod>;
|
||||
isObjectProperty(opts?: object): this is NodePath<t.ObjectProperty>;
|
||||
isRestElement(opts?: object): this is NodePath<t.RestElement>;
|
||||
isReturnStatement(opts?: object): this is NodePath<t.ReturnStatement>;
|
||||
isSequenceExpression(opts?: object): this is NodePath<t.SequenceExpression>;
|
||||
isSwitchCase(opts?: object): this is NodePath<t.SwitchCase>;
|
||||
isSwitchStatement(opts?: object): this is NodePath<t.SwitchStatement>;
|
||||
isThisExpression(opts?: object): this is NodePath<t.ThisExpression>;
|
||||
isThrowStatement(opts?: object): this is NodePath<t.ThrowStatement>;
|
||||
isTryStatement(opts?: object): this is NodePath<t.TryStatement>;
|
||||
isUnaryExpression(opts?: object): this is NodePath<t.UnaryExpression>;
|
||||
isUpdateExpression(opts?: object): this is NodePath<t.UpdateExpression>;
|
||||
isVariableDeclaration(opts?: object): this is NodePath<t.VariableDeclaration>;
|
||||
isVariableDeclarator(opts?: object): this is NodePath<t.VariableDeclarator>;
|
||||
isWhileStatement(opts?: object): this is NodePath<t.WhileStatement>;
|
||||
isWithStatement(opts?: object): this is NodePath<t.WithStatement>;
|
||||
isAssignmentPattern(opts?: object): this is NodePath<t.AssignmentPattern>;
|
||||
isArrayPattern(opts?: object): this is NodePath<t.ArrayPattern>;
|
||||
isArrowFunctionExpression(opts?: object): this is NodePath<t.ArrowFunctionExpression>;
|
||||
isClassBody(opts?: object): this is NodePath<t.ClassBody>;
|
||||
isClassDeclaration(opts?: object): this is NodePath<t.ClassDeclaration>;
|
||||
isClassExpression(opts?: object): this is NodePath<t.ClassExpression>;
|
||||
isExportAllDeclaration(opts?: object): this is NodePath<t.ExportAllDeclaration>;
|
||||
isExportDefaultDeclaration(opts?: object): this is NodePath<t.ExportDefaultDeclaration>;
|
||||
isExportNamedDeclaration(opts?: object): this is NodePath<t.ExportNamedDeclaration>;
|
||||
isExportSpecifier(opts?: object): this is NodePath<t.ExportSpecifier>;
|
||||
isForOfStatement(opts?: object): this is NodePath<t.ForOfStatement>;
|
||||
isImportDeclaration(opts?: object): this is NodePath<t.ImportDeclaration>;
|
||||
isImportDefaultSpecifier(opts?: object): this is NodePath<t.ImportDefaultSpecifier>;
|
||||
isImportNamespaceSpecifier(opts?: object): this is NodePath<t.ImportNamespaceSpecifier>;
|
||||
isImportSpecifier(opts?: object): this is NodePath<t.ImportSpecifier>;
|
||||
isMetaProperty(opts?: object): this is NodePath<t.MetaProperty>;
|
||||
isClassMethod(opts?: object): this is NodePath<t.ClassMethod>;
|
||||
isObjectPattern(opts?: object): this is NodePath<t.ObjectPattern>;
|
||||
isSpreadElement(opts?: object): this is NodePath<t.SpreadElement>;
|
||||
isSuper(opts?: object): this is NodePath<t.Super>;
|
||||
isTaggedTemplateExpression(opts?: object): this is NodePath<t.TaggedTemplateExpression>;
|
||||
isTemplateElement(opts?: object): this is NodePath<t.TemplateElement>;
|
||||
isTemplateLiteral(opts?: object): this is NodePath<t.TemplateLiteral>;
|
||||
isYieldExpression(opts?: object): this is NodePath<t.YieldExpression>;
|
||||
isAnyTypeAnnotation(opts?: object): this is NodePath<t.AnyTypeAnnotation>;
|
||||
isArrayTypeAnnotation(opts?: object): this is NodePath<t.ArrayTypeAnnotation>;
|
||||
isBooleanTypeAnnotation(opts?: object): this is NodePath<t.BooleanTypeAnnotation>;
|
||||
isBooleanLiteralTypeAnnotation(opts?: object): this is NodePath<t.BooleanLiteralTypeAnnotation>;
|
||||
isNullLiteralTypeAnnotation(opts?: object): this is NodePath<t.NullLiteralTypeAnnotation>;
|
||||
isClassImplements(opts?: object): this is NodePath<t.ClassImplements>;
|
||||
isClassProperty(opts?: object): this is NodePath<t.ClassProperty>;
|
||||
isDeclareClass(opts?: object): this is NodePath<t.DeclareClass>;
|
||||
isDeclareFunction(opts?: object): this is NodePath<t.DeclareFunction>;
|
||||
isDeclareInterface(opts?: object): this is NodePath<t.DeclareInterface>;
|
||||
isDeclareModule(opts?: object): this is NodePath<t.DeclareModule>;
|
||||
isDeclareTypeAlias(opts?: object): this is NodePath<t.DeclareTypeAlias>;
|
||||
isDeclareVariable(opts?: object): this is NodePath<t.DeclareVariable>;
|
||||
isExistentialTypeParam(opts?: object): this is NodePath<t.ExistentialTypeParam>;
|
||||
isFunctionTypeAnnotation(opts?: object): this is NodePath<t.FunctionTypeAnnotation>;
|
||||
isFunctionTypeParam(opts?: object): this is NodePath<t.FunctionTypeParam>;
|
||||
isGenericTypeAnnotation(opts?: object): this is NodePath<t.GenericTypeAnnotation>;
|
||||
isInterfaceExtends(opts?: object): this is NodePath<t.InterfaceExtends>;
|
||||
isInterfaceDeclaration(opts?: object): this is NodePath<t.InterfaceDeclaration>;
|
||||
isIntersectionTypeAnnotation(opts?: object): this is NodePath<t.IntersectionTypeAnnotation>;
|
||||
isMixedTypeAnnotation(opts?: object): this is NodePath<t.MixedTypeAnnotation>;
|
||||
isNullableTypeAnnotation(opts?: object): this is NodePath<t.NullableTypeAnnotation>;
|
||||
isNumericLiteralTypeAnnotation(opts?: object): this is NodePath<t.NumericLiteralTypeAnnotation>;
|
||||
isNumberTypeAnnotation(opts?: object): this is NodePath<t.NumberTypeAnnotation>;
|
||||
isStringLiteralTypeAnnotation(opts?: object): this is NodePath<t.StringLiteralTypeAnnotation>;
|
||||
isStringTypeAnnotation(opts?: object): this is NodePath<t.StringTypeAnnotation>;
|
||||
isThisTypeAnnotation(opts?: object): this is NodePath<t.ThisTypeAnnotation>;
|
||||
isTupleTypeAnnotation(opts?: object): this is NodePath<t.TupleTypeAnnotation>;
|
||||
isTypeofTypeAnnotation(opts?: object): this is NodePath<t.TypeofTypeAnnotation>;
|
||||
isTypeAlias(opts?: object): this is NodePath<t.TypeAlias>;
|
||||
isTypeAnnotation(opts?: object): this is NodePath<t.TypeAnnotation>;
|
||||
isTypeCastExpression(opts?: object): this is NodePath<t.TypeCastExpression>;
|
||||
isTypeParameterDeclaration(opts?: object): this is NodePath<t.TypeParameterDeclaration>;
|
||||
isTypeParameterInstantiation(opts?: object): this is NodePath<t.TypeParameterInstantiation>;
|
||||
isObjectTypeAnnotation(opts?: object): this is NodePath<t.ObjectTypeAnnotation>;
|
||||
isObjectTypeCallProperty(opts?: object): this is NodePath<t.ObjectTypeCallProperty>;
|
||||
isObjectTypeIndexer(opts?: object): this is NodePath<t.ObjectTypeIndexer>;
|
||||
isObjectTypeProperty(opts?: object): this is NodePath<t.ObjectTypeProperty>;
|
||||
isQualifiedTypeIdentifier(opts?: object): this is NodePath<t.QualifiedTypeIdentifier>;
|
||||
isUnionTypeAnnotation(opts?: object): this is NodePath<t.UnionTypeAnnotation>;
|
||||
isVoidTypeAnnotation(opts?: object): this is NodePath<t.VoidTypeAnnotation>;
|
||||
isJSXAttribute(opts?: object): this is NodePath<t.JSXAttribute>;
|
||||
isJSXClosingElement(opts?: object): this is NodePath<t.JSXClosingElement>;
|
||||
isJSXElement(opts?: object): this is NodePath<t.JSXElement>;
|
||||
isJSXEmptyExpression(opts?: object): this is NodePath<t.JSXEmptyExpression>;
|
||||
isJSXExpressionContainer(opts?: object): this is NodePath<t.JSXExpressionContainer>;
|
||||
isJSXIdentifier(opts?: object): this is NodePath<t.JSXIdentifier>;
|
||||
isJSXMemberExpression(opts?: object): this is NodePath<t.JSXMemberExpression>;
|
||||
isJSXNamespacedName(opts?: object): this is NodePath<t.JSXNamespacedName>;
|
||||
isJSXOpeningElement(opts?: object): this is NodePath<t.JSXOpeningElement>;
|
||||
isJSXSpreadAttribute(opts?: object): this is NodePath<t.JSXSpreadAttribute>;
|
||||
isJSXText(opts?: object): this is NodePath<t.JSXText>;
|
||||
isNoop(opts?: object): this is NodePath<t.Noop>;
|
||||
isParenthesizedExpression(opts?: object): this is NodePath<t.ParenthesizedExpression>;
|
||||
isAwaitExpression(opts?: object): this is NodePath<t.AwaitExpression>;
|
||||
isBindExpression(opts?: object): this is NodePath<t.BindExpression>;
|
||||
isDecorator(opts?: object): this is NodePath<t.Decorator>;
|
||||
isDoExpression(opts?: object): this is NodePath<t.DoExpression>;
|
||||
isExportDefaultSpecifier(opts?: object): this is NodePath<t.ExportDefaultSpecifier>;
|
||||
isExportNamespaceSpecifier(opts?: object): this is NodePath<t.ExportNamespaceSpecifier>;
|
||||
isRestProperty(opts?: object): this is NodePath<t.RestProperty>;
|
||||
isSpreadProperty(opts?: object): this is NodePath<t.SpreadProperty>;
|
||||
isExpression(opts?: object): this is NodePath<t.Expression>;
|
||||
isBinary(opts?: object): this is NodePath<t.Binary>;
|
||||
isScopable(opts?: object): this is NodePath<t.Scopable>;
|
||||
isBlockParent(opts?: object): this is NodePath<t.BlockParent>;
|
||||
isBlock(opts?: object): this is NodePath<t.Block>;
|
||||
isStatement(opts?: object): this is NodePath<t.Statement>;
|
||||
isTerminatorless(opts?: object): this is NodePath<t.Terminatorless>;
|
||||
isCompletionStatement(opts?: object): this is NodePath<t.CompletionStatement>;
|
||||
isConditional(opts?: object): this is NodePath<t.Conditional>;
|
||||
isLoop(opts?: object): this is NodePath<t.Loop>;
|
||||
isWhile(opts?: object): this is NodePath<t.While>;
|
||||
isExpressionWrapper(opts?: object): this is NodePath<t.ExpressionWrapper>;
|
||||
isFor(opts?: object): this is NodePath<t.For>;
|
||||
isForXStatement(opts?: object): this is NodePath<t.ForXStatement>;
|
||||
isFunction(opts?: object): this is NodePath<t.Function>;
|
||||
isFunctionParent(opts?: object): this is NodePath<t.FunctionParent>;
|
||||
isPureish(opts?: object): this is NodePath<t.Pureish>;
|
||||
isDeclaration(opts?: object): this is NodePath<t.Declaration>;
|
||||
isLVal(opts?: object): this is NodePath<t.LVal>;
|
||||
isLiteral(opts?: object): this is NodePath<t.Literal>;
|
||||
isImmutable(opts?: object): this is NodePath<t.Immutable>;
|
||||
isUserWhitespacable(opts?: object): this is NodePath<t.UserWhitespacable>;
|
||||
isMethod(opts?: object): this is NodePath<t.Method>;
|
||||
isObjectMember(opts?: object): this is NodePath<t.ObjectMember>;
|
||||
isProperty(opts?: object): this is NodePath<t.Property>;
|
||||
isUnaryLike(opts?: object): this is NodePath<t.UnaryLike>;
|
||||
isPattern(opts?: object): this is NodePath<t.Pattern>;
|
||||
isClass(opts?: object): this is NodePath<t.Class>;
|
||||
isModuleDeclaration(opts?: object): this is NodePath<t.ModuleDeclaration>;
|
||||
isExportDeclaration(opts?: object): this is NodePath<t.ExportDeclaration>;
|
||||
isModuleSpecifier(opts?: object): this is NodePath<t.ModuleSpecifier>;
|
||||
isFlow(opts?: object): this is NodePath<t.Flow>;
|
||||
isFlowBaseAnnotation(opts?: object): this is NodePath<t.FlowBaseAnnotation>;
|
||||
isFlowDeclaration(opts?: object): this is NodePath<t.FlowDeclaration>;
|
||||
isJSX(opts?: object): this is NodePath<t.JSX>;
|
||||
isNumberLiteral(opts?: object): this is NodePath<t.NumericLiteral>;
|
||||
isRegexLiteral(opts?: object): this is NodePath<t.RegExpLiteral>;
|
||||
isReferencedIdentifier(opts?: object): this is NodePath<t.Identifier | t.JSXIdentifier>;
|
||||
isReferencedMemberExpression(opts?: object): this is NodePath<t.MemberExpression>;
|
||||
isBindingIdentifier(opts?: object): this is NodePath<t.Identifier>;
|
||||
isScope(opts?: object): this is NodePath<t.Scopable>;
|
||||
isReferenced(opts?: object): boolean;
|
||||
isBlockScoped(opts?: object): boolean;
|
||||
isVar(opts?: object): boolean;
|
||||
isBlockScoped(opts?: object): this is NodePath<t.FunctionDeclaration | t.ClassDeclaration | t.VariableDeclaration>;
|
||||
isVar(opts?: object): this is NodePath<t.VariableDeclaration>;
|
||||
isUser(opts?: object): boolean;
|
||||
isGenerated(opts?: object): boolean;
|
||||
isPure(opts?: object): boolean;
|
||||
|
||||
Vendored
+6
-6
@@ -1265,13 +1265,13 @@ export function isJSX(node: object, opts?: object): node is JSX;
|
||||
export function isNumberLiteral(node: object, opts?: object): node is NumericLiteral;
|
||||
export function isRegexLiteral(node: object, opts?: object): node is RegExpLiteral;
|
||||
|
||||
export function isReferencedIdentifier(node: object, opts?: object): boolean;
|
||||
export function isReferencedMemberExpression(node: object, opts?: object): boolean;
|
||||
export function isBindingIdentifier(node: object, opts?: object): boolean;
|
||||
export function isScope(node: object, opts?: object): boolean;
|
||||
export function isReferencedIdentifier(node: object, opts?: object): node is Identifier | JSXIdentifier;
|
||||
export function isReferencedMemberExpression(node: object, opts?: object): node is MemberExpression;
|
||||
export function isBindingIdentifier(node: object, opts?: object): node is Identifier;
|
||||
export function isScope(node: object, opts?: object): node is Scopable;
|
||||
export function isReferenced(node: object, opts?: object): boolean;
|
||||
export function isBlockScoped(node: object, opts?: object): boolean;
|
||||
export function isVar(node: object, opts?: object): boolean;
|
||||
export function isBlockScoped(node: object, opts?: object): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration;
|
||||
export function isVar(node: object, opts?: object): node is VariableDeclaration;
|
||||
export function isUser(node: object, opts?: object): boolean;
|
||||
export function isGenerated(node: object, opts?: object): boolean;
|
||||
export function isPure(node: object, opts?: object): boolean;
|
||||
|
||||
@@ -159,6 +159,9 @@ function test_collection() {
|
||||
var book1: Book = new Book({ title: "Title 1", author: "Mike" });
|
||||
books.add(book1);
|
||||
|
||||
// Test adding sort option to add.
|
||||
books.add(new Book(), { sort: true });
|
||||
|
||||
// Objects can be added to collection by casting to model type.
|
||||
// Compiler will check if object properties are valid for the cast.
|
||||
// This gives better type checking than declaring an `any` overload.
|
||||
@@ -190,6 +193,7 @@ function test_collection() {
|
||||
let modelsDict: _.Dictionary<Book[]>;
|
||||
let num: number;
|
||||
|
||||
models = books.slice();
|
||||
models = books.slice(1);
|
||||
models = books.slice(1, 3);
|
||||
|
||||
@@ -405,6 +409,12 @@ namespace v1Changes {
|
||||
validate: false
|
||||
});
|
||||
}
|
||||
|
||||
function test_set() {
|
||||
var collection = new EmployeeCollection();
|
||||
var model = new Employee();
|
||||
collection.set([model], { add: false, remove: true, merge: false });
|
||||
}
|
||||
}
|
||||
|
||||
namespace Router {
|
||||
@@ -415,4 +425,10 @@ namespace v1Changes {
|
||||
router.navigate('/employees', true);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Sync {
|
||||
// Test for Backbone.sync override.
|
||||
Backbone.sync('create', new Employee());
|
||||
Backbone.sync('read', new EmployeeCollection());
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+22
-3
@@ -16,6 +16,13 @@ declare namespace Backbone {
|
||||
interface AddOptions extends Silenceable {
|
||||
at?: number;
|
||||
merge?: boolean;
|
||||
sort?: boolean;
|
||||
}
|
||||
|
||||
interface CollectionSetOptions extends Silenceable {
|
||||
add?: boolean;
|
||||
remove?: boolean;
|
||||
merge?: boolean;
|
||||
}
|
||||
|
||||
interface HistoryOptions extends Silenceable {
|
||||
@@ -243,7 +250,19 @@ declare namespace Backbone {
|
||||
remove(model: {}|TModel, options?: Silenceable): TModel;
|
||||
remove(models: ({}|TModel)[], options?: Silenceable): TModel[];
|
||||
reset(models?: TModel[], options?: Silenceable): TModel[];
|
||||
set(models?: TModel[], options?: Silenceable): TModel[];
|
||||
|
||||
/**
|
||||
*
|
||||
* The set method performs a "smart" update of the collection with the passed list of models.
|
||||
* If a model in the list isn't yet in the collection it will be added; if the model is already in the
|
||||
* collection its attributes will be merged; and if the collection contains any models that aren't present
|
||||
* in the list, they'll be removed. All of the appropriate "add", "remove", and "change" events are fired as
|
||||
* this happens. Returns the touched models in the collection. If you'd like to customize the behavior, you can
|
||||
* disable it with options: {add: false}, {remove: false}, or {merge: false}.
|
||||
* @param models
|
||||
* @param options
|
||||
*/
|
||||
set(models?: TModel[], options?: CollectionSetOptions): TModel[];
|
||||
shift(options?: Silenceable): TModel;
|
||||
sort(options?: Silenceable): Collection<TModel>;
|
||||
unshift(model: TModel, options?: AddOptions): TModel;
|
||||
@@ -259,7 +278,7 @@ declare namespace Backbone {
|
||||
/**
|
||||
* Return a shallow copy of this collection's models, using the same options as native Array#slice.
|
||||
*/
|
||||
slice(min: number, max?: number): TModel[];
|
||||
slice(min?: number, max?: number): TModel[];
|
||||
|
||||
// mixins from underscore
|
||||
|
||||
@@ -441,7 +460,7 @@ declare namespace Backbone {
|
||||
}
|
||||
|
||||
// SYNC
|
||||
function sync(method: string, model: Model, options?: JQueryAjaxSettings): any;
|
||||
function sync(method: string, model: Model | Collection<Model>, options?: JQueryAjaxSettings): any;
|
||||
function ajax(options?: JQueryAjaxSettings): JQueryXHR;
|
||||
var emulateHTTP: boolean;
|
||||
var emulateJSON: boolean;
|
||||
|
||||
@@ -188,10 +188,10 @@ function CommonMethodsInEventStreamsAndProperties() {
|
||||
return adds.takeUntil(cancel).map(x => x.val);
|
||||
};
|
||||
|
||||
Bacon.sequentially(2, events)
|
||||
Bacon.sequentially<string, {id:number; type:string; val?:number}>(2, events)
|
||||
.groupBy(keyF, limitF)
|
||||
.flatMap(groupedStream => groupedStream.fold(0, (acc, x) => acc + x))
|
||||
.onValue(sum => {
|
||||
.onValue((sum: number) => {
|
||||
console.log(sum); // returns [-1, 2, 8] in an order
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import bashGlob = require('bash-glob');
|
||||
|
||||
bashGlob('pattern', (err, files) => {});
|
||||
bashGlob(['pattern'], (err, files) => {});
|
||||
bashGlob(['pattern'], {}, (err, files) => {});
|
||||
bashGlob(['pattern'], { cwd: 'cwd' }, (err, files) => { });
|
||||
|
||||
bashGlob.on('match', (match, cwd) => {});
|
||||
bashGlob.on('files', (files, cwd) => {});
|
||||
bashGlob.on('end', (files) => {});
|
||||
|
||||
bashGlob.each('pattern', (err, files) => {});
|
||||
bashGlob.each(['pattern'], (err, files) => {});
|
||||
bashGlob.each(['pattern'], {}, (err, files) => {});
|
||||
bashGlob.each(['pattern'], { cwd: 'cwd' }, (err, files) => {});
|
||||
|
||||
// $ExpectType string[]
|
||||
bashGlob.sync('pattern');
|
||||
bashGlob.sync(['pattern']);
|
||||
bashGlob.sync(['pattern'], {});
|
||||
bashGlob.sync(['pattern'], { cwd: 'cwd' });
|
||||
Vendored
+36
@@ -0,0 +1,36 @@
|
||||
// Type definitions for bash-glob 2.0
|
||||
// Project: https://github.com/micromatch/bash-glob
|
||||
// Definitions by: mrmlnc <https://github.com/mrmlnc>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
type Patterns = string | string[];
|
||||
type Callback = (err: Error, files: string[]) => void;
|
||||
|
||||
declare function bashGlob(pattern: Patterns, callback: Callback): void;
|
||||
declare function bashGlob(pattern: Patterns, options: bashGlob.Options, callback: Callback): void;
|
||||
|
||||
declare namespace bashGlob {
|
||||
interface Options {
|
||||
cwd?: string;
|
||||
dot?: boolean;
|
||||
dotglob?: boolean;
|
||||
extglob?: boolean;
|
||||
failglob?: boolean;
|
||||
globstar?: boolean;
|
||||
nocase?: boolean;
|
||||
nocaseglob?: boolean;
|
||||
nullglob?: boolean;
|
||||
}
|
||||
|
||||
function on(event: 'match' | 'files', callback: (files: string, cwd: string) => void): void;
|
||||
function on(event: 'end', callback: (files: string) => void): void;
|
||||
|
||||
function each(patterns: Patterns, callback: Callback): void;
|
||||
function each(patterns: Patterns, options: Options, callback: Callback): void;
|
||||
|
||||
function promise(patterns: Patterns, options?: Options): Promise<string[]>;
|
||||
|
||||
function sync(patterns: Patterns, options?: Options): string[];
|
||||
}
|
||||
|
||||
export = bashGlob;
|
||||
@@ -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",
|
||||
"bash-glob-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -0,0 +1,11 @@
|
||||
import beats = require('beats');
|
||||
|
||||
const bins: beats.Bin[] = [
|
||||
{ lo: 0, hi: 512, threshold: 0, decay: 0.005 },
|
||||
{ lo: 512, hi: 1024, threshold: 0, decay: 0.005 },
|
||||
];
|
||||
|
||||
const detect = beats(bins, 1);
|
||||
|
||||
const frequencies = new Uint8Array(1024);
|
||||
const result = detect(frequencies);
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for beats 0.0
|
||||
// Project: https://github.com/hughsk/beats/
|
||||
// Definitions by: Uri Shaked <https://github.com/urish>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = beats;
|
||||
|
||||
declare function beats(bins: ReadonlyArray<beats.Bin>, minSeparation?: number): (frequencies: Uint8Array | Float32Array | ReadonlyArray<number>, dt?: number) => Float32Array;
|
||||
|
||||
declare namespace beats {
|
||||
interface Bin {
|
||||
lo: number;
|
||||
hi: number;
|
||||
threshold: number;
|
||||
decay: number;
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
"beats-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -229,6 +229,27 @@ suite.add({
|
||||
'onComplete': onComplete
|
||||
});
|
||||
|
||||
// unregister a listener for an event type
|
||||
suite.off('cycle', listener) as Benchmark.Suite;
|
||||
|
||||
// unregister a listener for multiple event types
|
||||
suite.off('start cycle', listener) as Benchmark.Suite;
|
||||
|
||||
// unregister all listeners for an event type
|
||||
suite.off('cycle') as Benchmark.Suite;
|
||||
|
||||
// unregister all listeners for multiple event types
|
||||
suite.off('start cycle complete') as Benchmark.Suite;
|
||||
|
||||
// unregister all listeners for all event types
|
||||
suite.off() as Benchmark.Suite;
|
||||
|
||||
// register a listener for an event type
|
||||
suite.on('cycle', listener) as Benchmark.Suite;
|
||||
|
||||
// register a listener for multiple event types
|
||||
suite.on('start cycle', listener) as Benchmark.Suite;
|
||||
|
||||
// basic usage
|
||||
suite.run();
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -170,10 +170,10 @@ declare namespace Benchmark {
|
||||
join(separator?: string): string;
|
||||
listeners(type: string): Function[];
|
||||
map(callback: Function): any[];
|
||||
off(type?: string, callback?: Function): Benchmark;
|
||||
off(types: string[]): Benchmark;
|
||||
on(type?: string, callback?: Function): Benchmark;
|
||||
on(types: string[]): Benchmark;
|
||||
off(type?: string, callback?: Function): Suite;
|
||||
off(types: string[]): Suite;
|
||||
on(type?: string, callback?: Function): Suite;
|
||||
on(types: string[]): Suite;
|
||||
pluck(property: string): any[];
|
||||
pop(): Function;
|
||||
push(benchmark: Benchmark): number;
|
||||
|
||||
+267
-293
File diff suppressed because it is too large
Load Diff
Vendored
+2980
-2784
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
||||
import Promise = require('bluebird');
|
||||
import retry = require('bluebird-retry');
|
||||
|
||||
function promiseSuccess(text:string) {
|
||||
function promiseSuccess(text: string) {
|
||||
return Promise.resolve(text);
|
||||
};
|
||||
}
|
||||
|
||||
var count = 0;
|
||||
let count = 0;
|
||||
function myfunc() {
|
||||
console.log('myfunc called ' + (++count) + ' times');
|
||||
console.log(`myfunc called ${++count} times`);
|
||||
if (count < 3) {
|
||||
throw new Error('i fail the first two times');
|
||||
} else {
|
||||
@@ -16,18 +16,17 @@ function myfunc() {
|
||||
}
|
||||
|
||||
retry(myfunc)
|
||||
.done(function(result) { console.log(result); } );
|
||||
.done(result => { console.log(result); });
|
||||
|
||||
|
||||
//Options example
|
||||
// Options example
|
||||
function logFail() {
|
||||
console.log(new Date().toISOString());
|
||||
throw new Error('bail');
|
||||
}
|
||||
|
||||
var options:retry.Options = {
|
||||
const options: retry.Options = {
|
||||
max_tries: 4,
|
||||
interval: 500
|
||||
};
|
||||
|
||||
retry(logFail, options);
|
||||
retry(logFail, options);
|
||||
|
||||
Vendored
+2
-5
@@ -1,17 +1,15 @@
|
||||
// Type definitions for bluebird-retry
|
||||
// Type definitions for bluebird-retry 0.11
|
||||
// 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
|
||||
|
||||
/// <reference types="bluebird" />
|
||||
|
||||
import Promise = require('bluebird');
|
||||
|
||||
declare function retry<T>(func: (param: T) => void, options?: retry.Options): Promise<T>;
|
||||
|
||||
declare namespace retry {
|
||||
export interface Options {
|
||||
interface Options {
|
||||
interval?: number;
|
||||
backoff?: number;
|
||||
max_interval?: number;
|
||||
@@ -22,7 +20,6 @@ declare namespace retry {
|
||||
context?: any;
|
||||
args?: any;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export = retry;
|
||||
|
||||
@@ -1,79 +1 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"adjacent-overload-signatures": false,
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"new-parens": false,
|
||||
"no-any-union": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-construct": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-duplicate-variable": false,
|
||||
"no-empty-interface": false,
|
||||
"no-for-in-array": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-misused-new": false,
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-useless-files": false,
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-method-signature": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"space-within-parens": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"trim-file": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false,
|
||||
"whitespace": false
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
Vendored
+2
-2
@@ -5147,7 +5147,7 @@ declare namespace Box2D.Dynamics.Joints {
|
||||
/**
|
||||
* The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.
|
||||
**/
|
||||
export class b2PullyJoint extends b2Joint {
|
||||
export class b2PulleyJoint extends b2Joint {
|
||||
|
||||
/**
|
||||
* Get the anchor point on bodyA in world coordinates.
|
||||
@@ -5207,7 +5207,7 @@ declare namespace Box2D.Dynamics.Joints {
|
||||
/**
|
||||
* Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.
|
||||
**/
|
||||
export class b2PullyJointDef extends b2JointDef {
|
||||
export class b2PulleyJointDef extends b2JointDef {
|
||||
|
||||
/**
|
||||
* The first ground anchor in world coordinates. This point never moves.
|
||||
|
||||
Vendored
+2
@@ -611,12 +611,14 @@ declare namespace braintree {
|
||||
* @property {object} details Additional account details.
|
||||
* @property {string} details.cardType Type of card, ex: Visa, MasterCard.
|
||||
* @property {string} details.lastTwo Last two digits of card number.
|
||||
* @property {string} details.lastFour Last four digits of card number.
|
||||
* @property {string} description A human-readable description.
|
||||
* @property {string} type The payment method type, always `CreditCard`.
|
||||
*/
|
||||
interface HostedFieldsAccountDetails {
|
||||
cardType: string;
|
||||
lastTwo: string;
|
||||
lastFour: string;
|
||||
}
|
||||
|
||||
interface HostedFieldsTokenizePayload {
|
||||
|
||||
Vendored
+3
@@ -39,6 +39,9 @@ export class Binary {
|
||||
|
||||
constructor(buffer: Buffer, subType?: number);
|
||||
|
||||
/** The underlying Buffer which stores the binary data. */
|
||||
readonly buffer: Buffer;
|
||||
|
||||
/** The length of the binary. */
|
||||
length(): number;
|
||||
/** Updates this binary with byte_value */
|
||||
|
||||
Vendored
+586
-399
File diff suppressed because it is too large
Load Diff
Vendored
+2
-2
@@ -459,11 +459,11 @@ declare namespace c3 {
|
||||
/**
|
||||
* Set max value of x axis range.
|
||||
*/
|
||||
max?: number;
|
||||
max?: string | number | Date;
|
||||
/**
|
||||
* Set min value of x axis range.
|
||||
*/
|
||||
min?: number;
|
||||
min?: string | number | Date;
|
||||
/**
|
||||
* Set padding for x axis.
|
||||
* If this option is set, the range of x axis will increase/decrease according to the values. If no padding is needed in the ragen of x axis, 0 should be set. On category axis, this option
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import { Configuration } from 'webpack';
|
||||
import CaseSensitivePathsWebpackPlugin = require('case-sensitive-paths-webpack-plugin');
|
||||
|
||||
const options: CaseSensitivePathsWebpackPlugin.Options = {
|
||||
debug: true,
|
||||
};
|
||||
|
||||
const c: Configuration = {
|
||||
plugins: [
|
||||
new CaseSensitivePathsWebpackPlugin(),
|
||||
new CaseSensitivePathsWebpackPlugin({
|
||||
debug: true
|
||||
}),
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
// Type definitions for case-sensitive-paths-webpack-plugin 2.1
|
||||
// Project: https://github.com/Urthen/case-sensitive-paths-webpack-plugin#readme
|
||||
// Definitions by: Andrew Makarov <https://github.com/r3nya>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Plugin } from 'webpack';
|
||||
|
||||
export = CaseSensitivePathsWebpackPlugin;
|
||||
|
||||
declare class CaseSensitivePathsWebpackPlugin extends Plugin {
|
||||
constructor(options?: CaseSensitivePathsWebpackPlugin.Options);
|
||||
}
|
||||
|
||||
declare namespace CaseSensitivePathsWebpackPlugin {
|
||||
interface Options {
|
||||
/**
|
||||
* Show more information
|
||||
*/
|
||||
debug?: boolean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"case-sensitive-paths-webpack-plugin-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,9 +1,16 @@
|
||||
import * as cassandra from 'cassandra-driver';
|
||||
import * as util from 'util';
|
||||
import * as fs from 'fs';
|
||||
|
||||
var client = new cassandra.Client({ contactPoints: ['h1', 'h2'], keyspace: 'ks1'});
|
||||
const client = new cassandra.Client({
|
||||
contactPoints: ['h1', 'h2'],
|
||||
keyspace: 'ks1',
|
||||
sslOptions: {
|
||||
cert: fs.readFileSync('certFilePath')
|
||||
}
|
||||
});
|
||||
|
||||
var query = 'SELECT email, last_name FROM user_profiles WHERE key=?';
|
||||
const query = 'SELECT email, last_name FROM user_profiles WHERE key=?';
|
||||
client.execute(query, ['guy'], function(err, result) {
|
||||
console.log('got user profile with email ' + result.rows[0].email);
|
||||
});
|
||||
|
||||
Vendored
+34
-33
@@ -12,11 +12,12 @@ export type ResultCallback = (err: Error, result: types.ResultSet) => void;
|
||||
|
||||
import * as events from "events";
|
||||
import * as stream from "stream";
|
||||
import * as tls from "tls";
|
||||
import _Long = require("long");
|
||||
|
||||
export namespace policies {
|
||||
namespace addressResolution {
|
||||
var EC2MultiRegionTranslator: EC2MultiRegionTranslatorStatic;
|
||||
let EC2MultiRegionTranslator: EC2MultiRegionTranslatorStatic;
|
||||
|
||||
interface AddressTranslator {
|
||||
translate(address: string, port: number, callback: Callback): void;
|
||||
@@ -32,10 +33,10 @@ export namespace policies {
|
||||
}
|
||||
|
||||
namespace loadBalancing {
|
||||
var DCAwareRoundRobinPolicy: DCAwareRoundRobinPolicyStatic;
|
||||
var RoundRobinPolicy: RoundRobinPolicyStatic;
|
||||
var TokenAwarePolicy: TokenAwarePolicyStatic;
|
||||
var WhiteListPolicy: WhiteListPolicyStatic;
|
||||
let DCAwareRoundRobinPolicy: DCAwareRoundRobinPolicyStatic;
|
||||
let RoundRobinPolicy: RoundRobinPolicyStatic;
|
||||
let TokenAwarePolicy: TokenAwarePolicyStatic;
|
||||
let WhiteListPolicy: WhiteListPolicyStatic;
|
||||
|
||||
interface LoadBalancingPolicy {
|
||||
init(client: Client, hosts: HostMap, callback: Callback): void;
|
||||
@@ -72,8 +73,8 @@ export namespace policies {
|
||||
}
|
||||
|
||||
namespace reconnection {
|
||||
var ConstantReconnectionPolicy: ConstantReconnectionPolicyStatic;
|
||||
var ExponentialReconnectionPolicy: ExponentialReconnectionPolicyStatic;
|
||||
let ConstantReconnectionPolicy: ConstantReconnectionPolicyStatic;
|
||||
let ExponentialReconnectionPolicy: ExponentialReconnectionPolicyStatic;
|
||||
|
||||
interface ReconnectionPolicy {
|
||||
newSchedule(): { next: Function };
|
||||
@@ -93,7 +94,7 @@ export namespace policies {
|
||||
}
|
||||
|
||||
namespace retry {
|
||||
var RetryPolicy: RetryPolicyStatic;
|
||||
let RetryPolicy: RetryPolicyStatic;
|
||||
|
||||
interface DecisionInfo {
|
||||
decision: number;
|
||||
@@ -128,18 +129,18 @@ export namespace policies {
|
||||
}
|
||||
|
||||
export namespace types {
|
||||
var BigDecimal: BigDecimalStatic;
|
||||
var InetAddress: InetAddressStatic;
|
||||
var Integer: IntegerStatic;
|
||||
var LocalDate: LocalDateStatic;
|
||||
var LocalTime: LocalTimeStatic;
|
||||
var Long: _Long;
|
||||
var ResultSet: ResultSetStatic;
|
||||
// var ResultStream: ResultStreamStatic;
|
||||
var Row: RowStatic;
|
||||
var TimeUuid: TimeUuidStatic;
|
||||
var Tuple: TupleStatic;
|
||||
var Uuid: UuidStatic;
|
||||
let BigDecimal: BigDecimalStatic;
|
||||
let InetAddress: InetAddressStatic;
|
||||
let Integer: IntegerStatic;
|
||||
let LocalDate: LocalDateStatic;
|
||||
let LocalTime: LocalTimeStatic;
|
||||
let Long: _Long;
|
||||
let ResultSet: ResultSetStatic;
|
||||
// let ResultStream: ResultStreamStatic;
|
||||
let Row: RowStatic;
|
||||
let TimeUuid: TimeUuidStatic;
|
||||
let Tuple: TupleStatic;
|
||||
let Uuid: UuidStatic;
|
||||
|
||||
enum consistencies {
|
||||
any = 0,
|
||||
@@ -433,10 +434,10 @@ export namespace types {
|
||||
}
|
||||
}
|
||||
|
||||
export var Client: ClientStatic;
|
||||
export var Host: HostStatic;
|
||||
export var HostMap: HostMapStatic;
|
||||
export var Encoder: EncoderStatic;
|
||||
export let Client: ClientStatic;
|
||||
export let Host: HostStatic;
|
||||
export let HostMap: HostMapStatic;
|
||||
export let Encoder: EncoderStatic;
|
||||
|
||||
export interface ClientOptions {
|
||||
contactPoints: Array<string>,
|
||||
@@ -468,7 +469,7 @@ export interface ClientOptions {
|
||||
coalescingThreshold: number
|
||||
},
|
||||
authProvider?: auth.AuthProvider,
|
||||
sslOptions?: any,
|
||||
sslOptions?: tls.ConnectionOptions,
|
||||
encoding?: {
|
||||
map: Function,
|
||||
set: Function,
|
||||
@@ -564,8 +565,8 @@ export interface Encoder {
|
||||
}
|
||||
|
||||
export namespace auth {
|
||||
var Authenticator: AuthenticatorStatic;
|
||||
var PlainTextAuthProvider: PlainTextAuthProviderStatic;
|
||||
let Authenticator: AuthenticatorStatic;
|
||||
let PlainTextAuthProvider: PlainTextAuthProviderStatic;
|
||||
|
||||
interface AuthenticatorStatic {
|
||||
new (): Authenticator;
|
||||
@@ -623,12 +624,12 @@ export namespace errors {
|
||||
}
|
||||
|
||||
export namespace metadata {
|
||||
var Aggregate: AggregateStatic;
|
||||
var Index: IndexStatic;
|
||||
var MaterializedView: MaterializedViewStatic;
|
||||
var Metadata: MetadataStatic;
|
||||
var SchemaFunction: SchemaFunctionStatic;
|
||||
var TableMetadata: TableMetadataStatic;
|
||||
let Aggregate: AggregateStatic;
|
||||
let Index: IndexStatic;
|
||||
let MaterializedView: MaterializedViewStatic;
|
||||
let Metadata: MetadataStatic;
|
||||
let SchemaFunction: SchemaFunctionStatic;
|
||||
let TableMetadata: TableMetadataStatic;
|
||||
|
||||
type caching = "all" | "keys_only" | "rows_only" | "none";
|
||||
|
||||
|
||||
@@ -1357,6 +1357,56 @@ suite('assert', () => {
|
||||
assert.notInclude(undefined, 'bar');
|
||||
});
|
||||
|
||||
test('deepInclude', () => {
|
||||
assert.deepInclude('foobar', 'bar');
|
||||
assert.deepInclude([1, 2, 3], 3);
|
||||
assert.deepInclude('foobar', 'baz');
|
||||
assert.deepInclude(undefined, 'bar');
|
||||
});
|
||||
|
||||
test('notDeepInclude', () => {
|
||||
assert.notDeepInclude('foobar', 'baz');
|
||||
assert.notDeepInclude([1, 2, 3], 4);
|
||||
assert.notDeepInclude('foobar', 'bar');
|
||||
assert.notDeepInclude(undefined, 'bar');
|
||||
});
|
||||
|
||||
test('nestedInclude', () => {
|
||||
assert.nestedInclude({'.a': {'b': 'x'}}, {'\\.a.[b]': 'x'});
|
||||
assert.nestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'x'});
|
||||
});
|
||||
|
||||
test('notNestedInclude', () => {
|
||||
assert.notNestedInclude({'.a': {'b': 'x'}}, {'\\.a.b': 'y'});
|
||||
assert.notNestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'y'});
|
||||
});
|
||||
|
||||
test('deepNestedInclude', () => {
|
||||
assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}});
|
||||
assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {x: 1}});
|
||||
});
|
||||
|
||||
test('notDeepNestedInclude', () => {
|
||||
assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {y: 1}})
|
||||
assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {y: 2}});
|
||||
});
|
||||
|
||||
test('ownInclude', () => {
|
||||
assert.ownInclude({ a: 1 }, { a: 1 });
|
||||
});
|
||||
|
||||
test('notOwnInclude', () => {
|
||||
assert.notOwnInclude({ a: 1 }, { a: 1 });
|
||||
});
|
||||
|
||||
test('deepOwnInclude', () => {
|
||||
assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}});
|
||||
});
|
||||
|
||||
test('notDeepOwnInclude', () => {
|
||||
assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}});
|
||||
});
|
||||
|
||||
test('lengthOf', () => {
|
||||
assert.lengthOf([1, 2, 3], 3);
|
||||
assert.lengthOf('foobar', 6);
|
||||
@@ -1677,4 +1727,80 @@ suite('assert', () => {
|
||||
assert.notFrozen(obj);
|
||||
assert.notFrozen(obj, 'message');
|
||||
});
|
||||
|
||||
test('hasAnyKeys', () => {
|
||||
assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'iDontExist', 'baz']);
|
||||
assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, iDontExist: 99, baz: 1337});
|
||||
assert.hasAnyKeys(new Map<any, any>([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']);
|
||||
assert.hasAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']);
|
||||
});
|
||||
|
||||
test('hasAllKeys', () => {
|
||||
assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']);
|
||||
assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337});
|
||||
assert.hasAllKeys(new Map<any,any>([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']);
|
||||
assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']);
|
||||
});
|
||||
|
||||
test('containsAllKeys', () => {
|
||||
assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'baz']);
|
||||
assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']);
|
||||
assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, baz: 1337});
|
||||
assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337});
|
||||
assert.containsAllKeys(new Map<any,any>([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}]);
|
||||
assert.containsAllKeys(new Map<any,any>([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']);
|
||||
assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}]);
|
||||
assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']);
|
||||
});
|
||||
|
||||
test('doesNotHaveAnyKeys', () => {
|
||||
assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']);
|
||||
assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'});
|
||||
assert.doesNotHaveAnyKeys(new Map<any,any>([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']);
|
||||
assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{one: 'two'}, 'example']);
|
||||
});
|
||||
|
||||
test('doesNotHaveAllKeys', () => {
|
||||
assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']);
|
||||
assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'});
|
||||
assert.doesNotHaveAllKeys(new Map<any,any>([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']);
|
||||
assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{one: 'two'}, 'example']);
|
||||
});
|
||||
|
||||
test('hasAnyDeepKeys', () => {
|
||||
assert.hasAnyDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'});
|
||||
assert.hasAnyDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [1, 2]]), [{one: 'one'}, {two: 'two'}]);
|
||||
assert.hasAnyDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]);
|
||||
assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'});
|
||||
assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {three: 'three'}]);
|
||||
assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]);
|
||||
});
|
||||
|
||||
test('hasAllDeepKeys', () => {
|
||||
assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne']]), {one: 'one'});
|
||||
assert.hasAllDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]);
|
||||
assert.hasAllDeepKeys(new Set([{one: 'one'}]), {one: 'one'});
|
||||
assert.hasAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]);
|
||||
});
|
||||
|
||||
test('containsAllDeepKeys', () => {
|
||||
assert.containsAllDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'});
|
||||
assert.containsAllDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]);
|
||||
assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'});
|
||||
assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]);
|
||||
});
|
||||
|
||||
test('doesNotHaveAnyDeepKeys', () => {
|
||||
assert.doesNotHaveAnyDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'});
|
||||
assert.doesNotHaveAnyDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {fifty: 'fifty'}]);
|
||||
assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'});
|
||||
assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{twenty: 'twenty'}, {fifty: 'fifty'}]);
|
||||
});
|
||||
|
||||
test('doesNotHaveAllDeepKeys', () => {
|
||||
assert.doesNotHaveAllDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'});
|
||||
assert.doesNotHaveAllDeepKeys(new Map<any,any>([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {one: 'one'}]);
|
||||
assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'});
|
||||
assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {fifty: 'fifty'}]);
|
||||
});
|
||||
});
|
||||
|
||||
Vendored
+264
-1
@@ -7,6 +7,7 @@
|
||||
// Matt Wistrand <https://github.com/mwistrand>,
|
||||
// Josh Goldberg <https://github.com/joshuakgoldberg>
|
||||
// Shaun Luttin <https://github.com/shaunluttin>
|
||||
// Gintautas Miselis <https://github.com/Naktibalda>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// <reference types="assertion-error"/>
|
||||
@@ -706,13 +707,145 @@ declare namespace Chai {
|
||||
/**
|
||||
* Asserts that haystack does not include needle.
|
||||
*
|
||||
* @type T Type of values in haystack.
|
||||
* @param haystack Container array.
|
||||
* @param needle Potential value contained in haystack.
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
notInclude(haystack: any[], needle: any, message?: string): void;
|
||||
|
||||
|
||||
/**
|
||||
* Asserts that haystack includes needle. Can be used to assert the inclusion of a value in an array or a subset of properties in an object. Deep equality is used.
|
||||
*
|
||||
* @param haystack Container string.
|
||||
* @param needle Potential expected substring of haystack.
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
deepInclude(haystack: string, needle: string, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that haystack includes needle. Can be used to assert the inclusion of a value in an array or a subset of properties in an object. Deep equality is used.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
deepInclude<T>(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that haystack does not include needle. Can be used to assert the absence of a value in an array or a subset of properties in an object. Deep equality is used.
|
||||
*
|
||||
* @param haystack Container string.
|
||||
* @param needle Potential expected substring of haystack.
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
notDeepInclude(haystack: string, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that haystack does not include needle. Can be used to assert the absence of a value in an array or a subset of properties in an object. Deep equality is used.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
notDeepInclude(haystack: any[], needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object.
|
||||
*
|
||||
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
||||
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’.
|
||||
* Can be used to assert the inclusion of a subset of properties in an object.
|
||||
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
||||
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
nestedInclude(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that ‘haystack’ does not include ‘needle’. Can be used to assert the absence of a subset of properties in an object.
|
||||
*
|
||||
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
||||
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’.
|
||||
* Can be used to assert the inclusion of a subset of properties in an object.
|
||||
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
||||
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
notNestedInclude(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while checking for deep equality
|
||||
*
|
||||
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
||||
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’.
|
||||
* Can be used to assert the inclusion of a subset of properties in an object.
|
||||
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
||||
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
deepNestedInclude(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that ‘haystack’ does not include ‘needle’. Can be used to assert the absence of a subset of properties in an object while checking for deep equality.
|
||||
*
|
||||
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
||||
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’.
|
||||
* Can be used to assert the inclusion of a subset of properties in an object.
|
||||
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
||||
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
notDeepNestedInclude(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while ignoring inherited properties.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
ownInclude(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the absence of a subset of properties in an object while ignoring inherited properties.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
notOwnInclude(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while ignoring inherited properties and checking for deep
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
deepOwnInclude(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the absence of a subset of properties in an object while ignoring inherited properties and checking for deep equality.
|
||||
*
|
||||
* @param haystack
|
||||
* @param needle
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
notDeepOwnInclude(haystack: any, needle: any, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that value matches the regular expression regexp.
|
||||
*
|
||||
@@ -1360,6 +1493,136 @@ declare namespace Chai {
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
isNotEmpty<T>(object: T, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` has at least one of the `keys` provided.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
hasAnyKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` has all and only all of the `keys` provided.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
hasAllKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` has all of the `keys` provided but may have more keys not listed.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
containsAllKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` has none of the `keys` provided.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
doesNotHaveAnyKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` does not have at least one of the `keys` provided.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
doesNotHaveAllKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` has at least one of the `keys` provided.
|
||||
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
||||
* a deep comparison.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
hasAnyDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` has all and only all of the `keys` provided.
|
||||
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
||||
* a deep comparison.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
hasAllDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` contains all of the `keys` provided.
|
||||
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
||||
* a deep comparison.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
containsAllDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` contains all of the `keys` provided.
|
||||
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
||||
* a deep comparison.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
doesNotHaveAnyDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
|
||||
/**
|
||||
* Asserts that `object` contains all of the `keys` provided.
|
||||
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
||||
* a deep comparison.
|
||||
* You can also provide a single object instead of a `keys` array and its keys
|
||||
* will be used as the expected set of keys.
|
||||
*
|
||||
* @type T Type of object.
|
||||
* @param object Object to test.
|
||||
* @param keys Keys to check
|
||||
* @param message Message to display on error.
|
||||
*/
|
||||
doesNotHaveAllDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
|
||||
Vendored
+20
-12
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Chart.js 2.6
|
||||
// Type definitions for Chart.js 2.7
|
||||
// Project: https://github.com/nnnick/Chart.js
|
||||
// Definitions by: Alberto Nuti <https://github.com/anuti>
|
||||
// Fabien Lavocat <https://github.com/FabienLavocat>
|
||||
@@ -114,18 +114,25 @@ declare namespace Chart {
|
||||
index?: number;
|
||||
}
|
||||
|
||||
interface ChartTooltipLabelColor {
|
||||
borderColor: ChartColor;
|
||||
backgroundColor: ChartColor;
|
||||
}
|
||||
|
||||
interface ChartTooltipCallback {
|
||||
beforeTitle?(item?: ChartTooltipItem[], data?: any): void;
|
||||
title?(item?: ChartTooltipItem[], data?: any): void;
|
||||
afterTitle?(item?: ChartTooltipItem[], data?: any): void;
|
||||
beforeBody?(item?: ChartTooltipItem[], data?: any): void;
|
||||
beforeLabel?(tooltipItem?: ChartTooltipItem, data?: any): void;
|
||||
label?(tooltipItem?: ChartTooltipItem, data?: any): void;
|
||||
afterLabel?(tooltipItem?: ChartTooltipItem, data?: any): void;
|
||||
afterBody?(item?: ChartTooltipItem[], data?: any): void;
|
||||
beforeFooter?(item?: ChartTooltipItem[], data?: any): void;
|
||||
footer?(item?: ChartTooltipItem[], data?: any): void;
|
||||
afterFooter?(item?: ChartTooltipItem[], data?: any): void;
|
||||
beforeTitle?(item: ChartTooltipItem[], data: ChartData): string | string[];
|
||||
title?(item: ChartTooltipItem[], data: ChartData): string | string[];
|
||||
afterTitle?(item: ChartTooltipItem[], data: ChartData): string | string[];
|
||||
beforeBody?(item: ChartTooltipItem[], data: ChartData): string | string[];
|
||||
beforeLabel?(tooltipItem: ChartTooltipItem, data: ChartData): string | string[];
|
||||
label?(tooltipItem: ChartTooltipItem, data: ChartData): string | string[];
|
||||
labelColor?(tooltipItem: ChartTooltipItem, chart: Chart): ChartTooltipLabelColor;
|
||||
labelTextColor?(tooltipItem: ChartTooltipItem, chart: Chart): string;
|
||||
afterLabel?(tooltipItem: ChartTooltipItem, data: ChartData): string | string[];
|
||||
afterBody?(item: ChartTooltipItem[], data: ChartData): string | string[];
|
||||
beforeFooter?(item: ChartTooltipItem[], data: ChartData): string | string[];
|
||||
footer?(item: ChartTooltipItem[], data: ChartData): string | string[];
|
||||
afterFooter?(item: ChartTooltipItem[], data: ChartData): string | string[];
|
||||
}
|
||||
|
||||
interface ChartAnimationParameter {
|
||||
@@ -152,6 +159,7 @@ declare namespace Chart {
|
||||
interface ChartOptions {
|
||||
responsive?: boolean;
|
||||
responsiveAnimationDuration?: number;
|
||||
aspectRatio?: number;
|
||||
maintainAspectRatio?: boolean;
|
||||
events?: string[];
|
||||
onClick?(event?: MouseEvent, activeElements?: Array<{}>): any;
|
||||
|
||||
Vendored
+1
@@ -263,6 +263,7 @@ interface CheerioElement {
|
||||
parent: CheerioElement;
|
||||
parentNode: CheerioElement;
|
||||
nodeValue: string;
|
||||
data?: string;
|
||||
}
|
||||
|
||||
interface CheerioAPI extends CheerioSelector, CheerioStatic {
|
||||
|
||||
Vendored
+5
-1
@@ -602,13 +602,17 @@ declare namespace CKEDITOR {
|
||||
browserContextMenuOnCtrl?: boolean;
|
||||
|
||||
clipboard_defaultContentType?: string; // html | text
|
||||
clipboard_notificationDuration?: number;
|
||||
codeSnippet_codeClass?: string;
|
||||
codeSnippet_languages?: Object;
|
||||
coceSnippet_theme?: string;
|
||||
colorButton_backStyle?: config.styleObject;
|
||||
colorButton_colors?: string;
|
||||
colorButton_colorsPerRow?: number;
|
||||
colorButton_enableAutomatic?: boolean;
|
||||
colorButton_enableMore?: boolean;
|
||||
colorButton_foreStyle?: config.styleObject;
|
||||
colorButton_normalizeBackground?: boolean;
|
||||
contentsCss?: string | string[];
|
||||
contentsLangDirection?: string;
|
||||
contentsLanguage?: string;
|
||||
@@ -727,7 +731,7 @@ declare namespace CKEDITOR {
|
||||
magicline_holdDistance?: number;
|
||||
magicline_keystrokeNext?: number;
|
||||
magicline_keystrokePrevious?: number;
|
||||
magicline_tabuList?: number;
|
||||
magicline_tabuList?: string[];
|
||||
magicline_triggerOffset?: number;
|
||||
mathJaxLib?: string;
|
||||
menu_groups?: string;
|
||||
|
||||
@@ -52,7 +52,8 @@ cli.main(function (args, options) {
|
||||
}
|
||||
return str;
|
||||
}
|
||||
for (i = 0, l = this.argc; i < l; i++) {
|
||||
var l: number = this.argc;
|
||||
for (i = 0; i < l; i++) {
|
||||
args[i] = escape(args[i]);
|
||||
}
|
||||
options.separator = escape(options.separator);
|
||||
|
||||
Vendored
+18
-11
@@ -105,9 +105,9 @@ declare namespace CodeMirror {
|
||||
function signal(target: any, name: string, ...args: any[]): void;
|
||||
|
||||
type DOMEvent = 'mousedown' | 'dblclick' | 'touchstart' | 'contextmenu' | 'keydown' | 'keypress' | 'keyup' | 'cut' | 'copy' | 'paste' | 'dragstart' | 'dragenter' | 'dragover' | 'dragleave' | 'drop';
|
||||
|
||||
|
||||
type CoordsMode = 'window' | 'page' | 'local';
|
||||
|
||||
|
||||
interface Token {
|
||||
/** The character(on the given line) at which the token starts. */
|
||||
start: number;
|
||||
@@ -202,10 +202,10 @@ declare namespace CodeMirror {
|
||||
/** Compute the line at the given pixel height. mode is the relative element
|
||||
to use to compute this line, it may be "window", "page" (the default), or "local" */
|
||||
lineAtHeight(height: number, mode?: CoordsMode): number;
|
||||
|
||||
/** Computes the height of the top of a line, in the coordinate system specified by mode, it may be "window",
|
||||
"page" (the default), or "local". When a line below the bottom of the document is specified, the returned value
|
||||
is the bottom of the last line in the document. By default, the position of the actual text is returned.
|
||||
|
||||
/** Computes the height of the top of a line, in the coordinate system specified by mode, it may be "window",
|
||||
"page" (the default), or "local". When a line below the bottom of the document is specified, the returned value
|
||||
is the bottom of the last line in the document. By default, the position of the actual text is returned.
|
||||
If includeWidgets is true and the line has line widgets, the position above the first line widget is returned. */
|
||||
heightAtLine(line: any, mode?: CoordsMode, includeWidgets?: boolean): number;
|
||||
|
||||
@@ -292,7 +292,7 @@ declare namespace CodeMirror {
|
||||
charCoords(pos: CodeMirror.Position, mode?: CoordsMode): { left: number; right: number; top: number; bottom: number; };
|
||||
|
||||
/** Given an { left , top } object , returns the { line , ch } position that corresponds to it.
|
||||
The optional mode parameter determines relative to what the coordinates are interpreted.
|
||||
The optional mode parameter determines relative to what the coordinates are interpreted.
|
||||
It may be "window", "page" (the default), or "local". */
|
||||
coordsChar(object: { left: number; top: number; }, mode?: CoordsMode): CodeMirror.Position;
|
||||
|
||||
@@ -512,7 +512,7 @@ declare namespace CodeMirror {
|
||||
|
||||
/** Get the currently selected code. */
|
||||
getSelection(): string;
|
||||
|
||||
|
||||
/** Returns an array containing a string for each selection, representing the content of the selections. */
|
||||
getSelections(lineSep?: string): Array<string>;
|
||||
|
||||
@@ -535,8 +535,14 @@ declare namespace CodeMirror {
|
||||
/** Set the cursor position.You can either pass a single { line , ch } object , or the line and the character as two separate parameters. */
|
||||
setCursor(pos: CodeMirror.Position): void;
|
||||
|
||||
/** Set the selection range.anchor and head should be { line , ch } objects.head defaults to anchor when not given. */
|
||||
setSelection(anchor: CodeMirror.Position, head: CodeMirror.Position): void;
|
||||
/** Set a single selection range. anchor and head should be {line, ch} objects. head defaults to anchor when not given. */
|
||||
setSelection(anchor: CodeMirror.Position, head: CodeMirror.Position, options?: { bias?: number, origin?: string, scroll?: boolean }): void;
|
||||
|
||||
/** Sets a new set of selections. There must be at least one selection in the given array. When primary is a
|
||||
number, it determines which selection is the primary one. When it is not given, the primary index is taken from
|
||||
the previous selection, or set to the last range if the previous selection had less ranges than the new one.
|
||||
Supports the same options as setSelection. */
|
||||
setSelections(ranges: Array<{ anchor: CodeMirror.Position, head: CodeMirror.Position }>, primary?: number, options?: { bias?: number, origin?: string, scroll?: boolean }): void;
|
||||
|
||||
/** Similar to setSelection , but will, if shift is held or the extending flag is set,
|
||||
move the head of the selection while leaving the anchor at its current place.
|
||||
@@ -779,7 +785,7 @@ declare namespace CodeMirror {
|
||||
/** Determines whether the gutter scrolls along with the content horizontally (false)
|
||||
or whether it stays fixed during horizontal scrolling (true, the default). */
|
||||
fixedGutter?: boolean;
|
||||
|
||||
|
||||
/**
|
||||
* Chooses a scrollbar implementation. The default is "native", showing native scrollbars. The core library also
|
||||
* provides the "null" style, which completely hides the scrollbars. Addons can implement additional scrollbar models.
|
||||
@@ -1141,6 +1147,7 @@ declare namespace CodeMirror {
|
||||
interface LintStateOptions {
|
||||
async: boolean;
|
||||
hasGutters: boolean;
|
||||
onUpdateLinting?: (annotationsNotSorted: Annotation[], annotations: Annotation[], codeMirror: Editor) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+1
-1
@@ -35,7 +35,7 @@ declare namespace Combokeys {
|
||||
* @param {handler} optional - one of "keypress", "keydown", or "keyup"
|
||||
* @returns void
|
||||
*/
|
||||
bind(keys: string | string[], callback: () => void, action?: string): void;
|
||||
bind(keys: string | string[], callback: (event: KeyboardEvent) => void, action?: string): void;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+56
-43
@@ -1,4 +1,4 @@
|
||||
// Type definitions for command-line-args 4.0.6
|
||||
// Type definitions for command-line-args 4.0.7
|
||||
// Project: https://github.com/75lb/command-line-args
|
||||
// Definitions by: CzBuCHi <https://github.com/CzBuCHi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -25,50 +25,63 @@
|
||||
*/
|
||||
declare function commandLineArgs(optionDefinitions: commandLineArgs.OptionDefinition[], options?: commandLineArgs.Options): any;
|
||||
|
||||
declare module commandLineArgs {
|
||||
declare module commandLineArgs {
|
||||
|
||||
export interface OptionDefinition {
|
||||
/**
|
||||
* The only required definition property is name, the value of each option will be either a Boolean or string.
|
||||
*/
|
||||
name: string,
|
||||
/**
|
||||
* The type value is a setter function (you receive the output from this), enabling you to be specific about the type and value received.
|
||||
*/
|
||||
type?: (arg: string) => any,
|
||||
/**
|
||||
* getopt-style short option names. Can be any single character (unicode included) except a digit or hypen.
|
||||
*/
|
||||
alias?: string,
|
||||
/**
|
||||
* Set this flag if the option takes a list of values. You will receive an array of values, each passed through the type function (if specified).
|
||||
*/
|
||||
multiple?: boolean,
|
||||
/**
|
||||
* Any unclaimed command-line args will be set on this option. This flag is typically set on the most commonly-used option to make for more concise usage (i.e. $ myapp *.js instead of $ myapp --files *.js).
|
||||
*/
|
||||
defaultOption?: boolean,
|
||||
/**
|
||||
* An initial value for the option.
|
||||
*/
|
||||
defaultValue?: any,
|
||||
/**
|
||||
* When your app has a large amount of options it makes sense to organise them in groups.
|
||||
* There are two automatic groups: _all (contains all options) and _none (contains options without a group specified in their definition).
|
||||
*/
|
||||
group?: string | string[],
|
||||
}
|
||||
export interface OptionDefinition {
|
||||
/**
|
||||
* The only required definition property is name, the value of each option will be either a Boolean or string.
|
||||
*/
|
||||
name: string,
|
||||
/**
|
||||
* The type value is a setter function (you receive the output from this),
|
||||
* enabling you to be specific about the type and value received.
|
||||
*/
|
||||
type?: (arg: string) => any,
|
||||
/**
|
||||
* getopt-style short option names. Can be any single character (unicode included) except a digit or hypen.
|
||||
*/
|
||||
alias?: string,
|
||||
/**
|
||||
* Set this flag if the option takes a list of values. You will receive an array of values, each passed
|
||||
* through the type function (if specified).
|
||||
*/
|
||||
multiple?: boolean,
|
||||
/**
|
||||
* Any unclaimed command-line args will be set on this option. This flag is typically set on
|
||||
* the most commonly-used option to make for more concise usage
|
||||
* (i.e. $ myapp *.js instead of $ myapp --files *.js).
|
||||
*/
|
||||
defaultOption?: boolean,
|
||||
/**
|
||||
* An initial value for the option.
|
||||
*/
|
||||
defaultValue?: any,
|
||||
/**
|
||||
* When your app has a large amount of options it makes sense to organise them in groups.
|
||||
* There are two automatic groups: _all (contains all options) and _none (contains options
|
||||
* without a group specified in their definition).
|
||||
*/
|
||||
group?: string | string[],
|
||||
/**
|
||||
* Describes the option.
|
||||
*/
|
||||
description?: string,
|
||||
/**
|
||||
* A label for the type, e.g. <ms>.
|
||||
*/
|
||||
typeLabel?: string;
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
/**
|
||||
* An array of strings, which if passed will be parsed instead of `process.argv`.
|
||||
*/
|
||||
argv?: string[];
|
||||
/**
|
||||
* If `true`, an array of unknown arguments is returned in the `_unknown` property of the output.
|
||||
*/
|
||||
partial?: boolean;
|
||||
}
|
||||
export interface Options {
|
||||
/**
|
||||
* An array of strings, which if passed will be parsed instead of `process.argv`.
|
||||
*/
|
||||
argv?: string[];
|
||||
/**
|
||||
* If `true`, an array of unknown arguments is returned in the `_unknown` property of the output.
|
||||
*/
|
||||
partial?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = commandLineArgs;
|
||||
|
||||
Vendored
+1
-1
@@ -18,7 +18,7 @@ export interface MediaType {
|
||||
}
|
||||
|
||||
export interface RequestLike {
|
||||
headers: {[header: string]: string | string[]};
|
||||
headers: {[header: string]: string | string[] | undefined};
|
||||
}
|
||||
|
||||
export interface ResponseLike {
|
||||
|
||||
+13
-8
@@ -2,9 +2,9 @@
|
||||
// Project: https://github.com/apache/cordova-plugin-device
|
||||
// Definitions by: Microsoft Open Technologies Inc <http://msopentech.com>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
//
|
||||
//
|
||||
// Copyright (c) Microsoft Open Technologies Inc
|
||||
// Licensed under the MIT license
|
||||
// Licensed under the MIT license
|
||||
|
||||
/**
|
||||
* This plugin defines a global device object, which describes the device's hardware and software.
|
||||
@@ -26,11 +26,16 @@ interface Device {
|
||||
uuid: string;
|
||||
/** Get the operating system version. */
|
||||
version: string;
|
||||
/** Get the device's manufacturer. */
|
||||
manufacturer: string;
|
||||
/** Whether the device is running on a simulator. */
|
||||
isVirtual: boolean;
|
||||
/** Get the device hardware serial number. */
|
||||
serial: string;}
|
||||
/** Get the device's manufacturer. */
|
||||
manufacturer: string;
|
||||
/** Whether the device is running on a simulator. */
|
||||
isVirtual: boolean;
|
||||
/** Get the device hardware serial number. */
|
||||
serial: string;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
device: Device;
|
||||
}
|
||||
|
||||
declare var device: Device;
|
||||
|
||||
@@ -1,23 +1,31 @@
|
||||
Keyboard.shrinkView(true);
|
||||
Keyboard.shrinkView(false);
|
||||
Keyboard.shrinkView(null, (currentValue) => console.log(currentValue));
|
||||
|
||||
Keyboard.hideFormAccessoryBar(true);
|
||||
Keyboard.hideFormAccessoryBar(false);
|
||||
Keyboard.hideFormAccessoryBar(null, (currentValue) => console.log(currentValue));
|
||||
|
||||
Keyboard.disableScrollingInShrinkView(true);
|
||||
Keyboard.disableScrollingInShrinkView(false);
|
||||
Keyboard.disableScrollingInShrinkView(null, (currentValue) => console.log(currentValue));
|
||||
|
||||
Keyboard.hide();
|
||||
|
||||
Keyboard.show();
|
||||
|
||||
if (Keyboard.isVisible) {
|
||||
console.log('Keyboard is visible');
|
||||
}
|
||||
Keyboard.automaticScrollToTopOnHiding = true;
|
||||
Keyboard.onshow = function () {
|
||||
console.log('onshow');
|
||||
};
|
||||
Keyboard.onhide = function () {
|
||||
console.log('onhide');
|
||||
};
|
||||
Keyboard.onshowing = function () {
|
||||
console.log('onshowing');
|
||||
};
|
||||
Keyboard.onhiding= function () {
|
||||
console.log('onhiding');
|
||||
};
|
||||
|
||||
Keyboard.automaticScrollToTopOnHiding = true;
|
||||
|
||||
window.addEventListener('keyboardDidShow', () => console.log('keyboardDidShow'));
|
||||
|
||||
window.addEventListener('keyboardDidHide', () => console.log('keyboardDidHide'));
|
||||
|
||||
window.addEventListener('keyboardWillShow', () => console.log('keyboardWillShow'));
|
||||
|
||||
window.addEventListener('keyboardWillHide', () => console.log('keyboardWillHide'));
|
||||
|
||||
window.addEventListener('keyboardHeightWillChange', (event: CordovaKeyboardEvent) => console.log(`keyboardHeightWillChange - keyboard height: ${event.keyboardHeight}`));
|
||||
|
||||
+99
-88
@@ -1,32 +1,9 @@
|
||||
// Type definitions for Apache Cordova Keyboard plugin v0.1.2
|
||||
// Project: https://github.com/apache/cordova-plugins/tree/master/keyboard
|
||||
// Definitions by: Dan Manastireanu <https://github.com/danmana>
|
||||
// Type definitions for Apache Cordova Keyboard plugin v1.2.0
|
||||
// Project: https://github.com/cjpearson/cordova-plugin-keyboard
|
||||
// Definitions by: Dan Manastireanu <https://github.com/danmana>
|
||||
// Jochen Becker <https://github.com/jkfb>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* The Keyboard object provides some functions to customize the iOS keyboard.
|
||||
*
|
||||
* <i>Supported Platforms: iOS</i>
|
||||
*
|
||||
* This plugin has only been tested in Cordova 3.2 or greater,
|
||||
* and its use in previous Cordova versions is not recommended
|
||||
* (potential conflict with keyboard customization code present in the core in previous Cordova versions).
|
||||
*
|
||||
* If you do use this plugin in an older Cordova version (again, not recommended),
|
||||
* you have to make sure the HideKeyboardFormAccessoryBar and KeyboardShrinksView preference values are always false,
|
||||
* and only use the API functions to turn things on/off.
|
||||
*
|
||||
* This plugin supports the HideKeyboardFormAccessoryBar (boolean)
|
||||
* and KeyboardShrinksView (boolean) preferences in config.xml.
|
||||
*
|
||||
* Permissions in config.xml
|
||||
* <code>
|
||||
* <feature name="Keyboard">
|
||||
* <param name="ios-package" value="CDVKeyboard" onload="true" />
|
||||
* </feature>
|
||||
* </code>
|
||||
*
|
||||
*/
|
||||
interface Keyboard {
|
||||
|
||||
// Methods
|
||||
@@ -39,15 +16,20 @@ interface Keyboard {
|
||||
* This applies to apps that position their elements relative to the bottom of the WebView.
|
||||
* This is the default behaviour on Android, and makes a lot of sense when building apps as opposed to webpages.
|
||||
*
|
||||
* Supported Platforms:
|
||||
* - iOS
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.shrinkView(true);
|
||||
* Keyboard.shrinkView(false);
|
||||
* Keyboard.shrinkView(null, function (currentValue) { console.log(currentValue); });
|
||||
* </code>
|
||||
*
|
||||
* @param shrink
|
||||
* @param successCallback A success callbackfunction
|
||||
*/
|
||||
shrinkView(shrink:boolean): void,
|
||||
shrinkView(shrink: boolean, successCallback?: (currentValue: any) => void): void,
|
||||
|
||||
/**
|
||||
* Hide the keyboard toolbar.
|
||||
@@ -55,21 +37,29 @@ interface Keyboard {
|
||||
* Set to true to hide the additional toolbar that is on top of the keyboard.
|
||||
* This toolbar features the Prev, Next, and Done buttons.
|
||||
*
|
||||
* Supported Platforms:
|
||||
* - iOS
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.hideFormAccessoryBar(true);
|
||||
* Keyboard.hideFormAccessoryBar(false);
|
||||
* Keyboard.hideFormAccessoryBar(null, function (currentValue) { console.log(currentValue); });
|
||||
* </code>
|
||||
*
|
||||
* @param hide
|
||||
* @param successCallback A success callbackfunction
|
||||
*/
|
||||
hideFormAccessoryBar(hide:boolean): void,
|
||||
hideFormAccessoryBar(hide: boolean, successCallback?: (currentValue: any) => void): void,
|
||||
|
||||
/**
|
||||
* Disable scrolling when the the WebView is shrunk.
|
||||
*
|
||||
* Set to true to disable scrolling when the WebView is shrunk.
|
||||
*
|
||||
* Supported Platforms:
|
||||
* - iOS
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.disableScrollingInShrinkView(true);
|
||||
@@ -77,8 +67,40 @@ interface Keyboard {
|
||||
* </code>
|
||||
*
|
||||
* @param disable
|
||||
* @param successCallback A success callbackfunction
|
||||
*/
|
||||
disableScrollingInShrinkView(disable:boolean): void,
|
||||
disableScrollingInShrinkView(disable: boolean, successCallback?: (currentValue: any) => void): void,
|
||||
|
||||
/**
|
||||
* Hide the keyboard
|
||||
*
|
||||
* Call this method to hide the keyboard
|
||||
*
|
||||
* Supported Platforms:
|
||||
* - iOS
|
||||
* - Android
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.hide();
|
||||
* </code>
|
||||
*/
|
||||
hide(): void,
|
||||
|
||||
/**
|
||||
* Show the keyboard
|
||||
*
|
||||
* Call this method to show the keyboard.
|
||||
*
|
||||
* Supported Platforms:
|
||||
* - Android
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.show();
|
||||
* </code>
|
||||
*/
|
||||
show(): void,
|
||||
|
||||
// Properties
|
||||
|
||||
@@ -87,6 +109,9 @@ interface Keyboard {
|
||||
*
|
||||
* Read this property to determine if the keyboard is visible.
|
||||
*
|
||||
* Supported Platforms:
|
||||
* - iOS
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* if (Keyboard.isVisible) {
|
||||
@@ -102,6 +127,9 @@ interface Keyboard {
|
||||
* Set this to true if you need that page scroll to beginning when keyboard is hiding.
|
||||
* This is allows to fix issue with elements declared with position: fixed, after keyboard is hiding.
|
||||
*
|
||||
* Supported Platforms:
|
||||
* - iOS
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.automaticScrollToTopOnHiding = true;
|
||||
@@ -110,65 +138,48 @@ interface Keyboard {
|
||||
*/
|
||||
automaticScrollToTopOnHiding: boolean,
|
||||
|
||||
// Events
|
||||
/**
|
||||
* Deprecated Events
|
||||
*/
|
||||
onshow(): void,
|
||||
|
||||
/**
|
||||
* If defined, this function is fired when keyboard fully shown.
|
||||
*
|
||||
* Attach handler to this event to be able to receive notification when keyboard is shown.
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.onshow = function () {
|
||||
* // Describe your logic which will be run each time keyboard is shown.
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
*/
|
||||
onshow():void,
|
||||
/**
|
||||
* If defined, this function is fired when keyboard fully closed.
|
||||
*
|
||||
* Attach handler to this event to be able to receive notification when keyboard is closed.
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.onhide = function () {
|
||||
* // Describe your logic which will be run each time keyboard is closed.
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
*/
|
||||
onhide():void,
|
||||
/**
|
||||
* If defined, this function is fired before keyboard will be shown.
|
||||
*
|
||||
* Attach handler to this event to be able to receive notification when keyboard is about to be shown on the screen.
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.onshowing = function () {
|
||||
* // Describe your logic which will be run each time when keyboard is about to be shown.
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
*/
|
||||
onshowing():void,
|
||||
/**
|
||||
* If defined, this function is fired when keyboard is about to be closed.
|
||||
*
|
||||
* Attach handler to this event to be able to receive notification when keyboard is about to be closed.
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* Keyboard.onhiding = function () {
|
||||
* // Describe your logic which will be run each time when keyboard is about to be closed.
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
*/
|
||||
onhiding():void,
|
||||
onhide(): void,
|
||||
|
||||
onhiding(): void,
|
||||
|
||||
onshowing(): void
|
||||
}
|
||||
|
||||
declare var Keyboard:Keyboard;
|
||||
interface CordovaKeyboardEvent extends Event {
|
||||
/** The height of the keyboard */
|
||||
keyboardHeight: number;
|
||||
}
|
||||
|
||||
interface WindowEventMap {
|
||||
/**
|
||||
* This event is fired when keyboard fully shown.
|
||||
*/
|
||||
'keyboardDidShow': Event,
|
||||
|
||||
/**
|
||||
* This event is fired when the keyboard is fully closed.
|
||||
*/
|
||||
'keyboardDidHide': Event,
|
||||
|
||||
/**
|
||||
* This event fires before keyboard will be shown.
|
||||
*/
|
||||
'keyboardWillShow': Event,
|
||||
|
||||
/**
|
||||
* This event is fired when the keyboard is fully closed.
|
||||
*/
|
||||
'keyboardWillHide': Event,
|
||||
|
||||
/**
|
||||
* This event is fired when the keyboard is fully closed.
|
||||
*/
|
||||
'keyboardHeightWillChange': CordovaKeyboardEvent
|
||||
}
|
||||
|
||||
declare var Keyboard: Keyboard;
|
||||
|
||||
Vendored
+23
-18
@@ -112,7 +112,7 @@ export interface Comment extends Node {
|
||||
/**
|
||||
* The @charset at-rule.
|
||||
*/
|
||||
export interface Charset {
|
||||
export interface Charset extends Node {
|
||||
/** The part following @charset. */
|
||||
charset?: string;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ export interface Charset {
|
||||
/**
|
||||
* The @custom-media at-rule
|
||||
*/
|
||||
export interface CustomMedia {
|
||||
export interface CustomMedia extends Node {
|
||||
/** The ---prefixed name. */
|
||||
name?: string;
|
||||
/** The part following the name. */
|
||||
@@ -130,7 +130,7 @@ export interface CustomMedia {
|
||||
/**
|
||||
* The @document at-rule.
|
||||
*/
|
||||
export interface Document {
|
||||
export interface Document extends Node {
|
||||
/** The part following @document. */
|
||||
document?: string;
|
||||
/** The vendor prefix in @document, or undefined if there is none. */
|
||||
@@ -142,7 +142,7 @@ export interface Document {
|
||||
/**
|
||||
* The @font-face at-rule.
|
||||
*/
|
||||
export interface FontFace {
|
||||
export interface FontFace extends Node {
|
||||
/** Array of nodes with the types declaration and comment. */
|
||||
declarations?: Array<Declaration | Comment>;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ export interface FontFace {
|
||||
/**
|
||||
* The @host at-rule.
|
||||
*/
|
||||
export interface Host {
|
||||
export interface Host extends Node {
|
||||
/** Array of nodes with the types rule, comment and any of the at-rule types. */
|
||||
rules?: Array<Rule | Comment | AtRule>;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ export interface Host {
|
||||
/**
|
||||
* The @import at-rule.
|
||||
*/
|
||||
export interface Import {
|
||||
export interface Import extends Node {
|
||||
/** The part following @import. */
|
||||
import?: string;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ export interface Import {
|
||||
/**
|
||||
* The @keyframes at-rule.
|
||||
*/
|
||||
export interface KeyFrames {
|
||||
export interface KeyFrames extends Node {
|
||||
/** The name of the keyframes rule. */
|
||||
name?: string;
|
||||
/** The vendor prefix in @keyframes, or undefined if there is none. */
|
||||
@@ -175,7 +175,7 @@ export interface KeyFrames {
|
||||
keyframes?: Array<KeyFrame | Comment>;
|
||||
}
|
||||
|
||||
export interface KeyFrame {
|
||||
export interface KeyFrame extends Node {
|
||||
/** The list of "selectors" of the keyframe rule, split on commas. Each “selector” is trimmed from whitespace. */
|
||||
values?: Array<string>;
|
||||
/** Array of nodes with the types declaration and comment. */
|
||||
@@ -185,7 +185,7 @@ export interface KeyFrame {
|
||||
/**
|
||||
* The @media at-rule.
|
||||
*/
|
||||
export interface Media {
|
||||
export interface Media extends Node {
|
||||
/** The part following @media. */
|
||||
media?: string;
|
||||
/** Array of nodes with the types rule, comment and any of the at-rule types. */
|
||||
@@ -195,7 +195,7 @@ export interface Media {
|
||||
/**
|
||||
* The @namespace at-rule.
|
||||
*/
|
||||
export interface Namespace {
|
||||
export interface Namespace extends Node {
|
||||
/** The part following @namespace. */
|
||||
namespace?: string;
|
||||
}
|
||||
@@ -203,7 +203,7 @@ export interface Namespace {
|
||||
/**
|
||||
* The @page at-rule.
|
||||
*/
|
||||
export interface Page {
|
||||
export interface Page extends Node {
|
||||
/** The list of selectors of the rule, split on commas. Each selector is trimmed from whitespace and comments. */
|
||||
selectors?: Array<string>;
|
||||
/** Array of nodes with the types declaration and comment. */
|
||||
@@ -213,7 +213,7 @@ export interface Page {
|
||||
/**
|
||||
* The @supports at-rule.
|
||||
*/
|
||||
export interface Supports {
|
||||
export interface Supports extends Node {
|
||||
/** The part following @supports. */
|
||||
supports?: string;
|
||||
/** Array of nodes with the types rule, comment and any of the at-rule types. */
|
||||
@@ -223,16 +223,21 @@ export interface Supports {
|
||||
/** All at-rules. */
|
||||
export type AtRule = Charset | CustomMedia | Document | FontFace | Host | Import | KeyFrames | Media | Namespace | Page | Supports;
|
||||
|
||||
/**
|
||||
* A collection of rules
|
||||
*/
|
||||
export interface StyleRules {
|
||||
/** Array of nodes with the types rule, comment and any of the at-rule types. */
|
||||
rules: Array<Rule | Comment | AtRule>;
|
||||
/** Array of Errors. Errors collected during parsing when option silent is true. */
|
||||
parsingErrors?: Array<ParserError>
|
||||
}
|
||||
|
||||
/**
|
||||
* The root node returned by css.parse.
|
||||
*/
|
||||
export interface Stylesheet extends Node {
|
||||
stylesheet?: {
|
||||
/** Array of nodes with the types rule, comment and any of the at-rule types. */
|
||||
rules?: Array<Rule | Comment | AtRule>;
|
||||
/** Array of Errors. Errors collected during parsing when option silent is true. */
|
||||
parsingErrors?: Array<ParserError>
|
||||
};
|
||||
stylesheet?: StyleRules;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
Vendored
+2
-4
@@ -1,4 +1,4 @@
|
||||
// Type definitions for cucumber-js 2.0
|
||||
// Type definitions for cucumber-js 2.1
|
||||
// Project: https://github.com/cucumber/cucumber-js
|
||||
// Definitions by: Abraão Alves <https://github.com/abraaoalves>
|
||||
// Jan Molak <https://github.com/jan-molak>
|
||||
@@ -23,9 +23,7 @@ export interface TableDefinition {
|
||||
hashes(): Array<{ [colName: string]: string }>;
|
||||
}
|
||||
|
||||
export type StepDefinitionParam = string | number | CallbackStepDefinition | TableDefinition;
|
||||
|
||||
export type StepDefinitionCode = (this: World, ...stepArgs: StepDefinitionParam[]) => PromiseLike<any> | any | void;
|
||||
export type StepDefinitionCode = (this: World, ...stepArgs: any[]) => any;
|
||||
|
||||
export interface StepDefinitionOptions {
|
||||
timeout?: number;
|
||||
|
||||
@@ -12,10 +12,13 @@ cy
|
||||
.get('.query-button')
|
||||
.contains('Save Form').should('have.class', 'btn');
|
||||
|
||||
cy.location('host');
|
||||
|
||||
cy
|
||||
.get('form')
|
||||
.find('input')
|
||||
.then($input => $input.click());
|
||||
.then($input => $input.click())
|
||||
.then($input => $input.click(), {timeout: 12});
|
||||
|
||||
cy
|
||||
.wrap({ sum: (a: number, b: number, c: number) => a + b + c })
|
||||
|
||||
Vendored
+6
-5
@@ -249,7 +249,8 @@ declare namespace Cypress {
|
||||
/**
|
||||
* @see https://on.cypress.io/api/location
|
||||
*/
|
||||
location(options?: Loggable): Chainable;
|
||||
location(options?: LoggableTimeoutable): Chainable;
|
||||
location(key: string, options?: LoggableTimeoutable): Chainable;
|
||||
|
||||
/**
|
||||
* @see https://on.cypress.io/api/log
|
||||
@@ -317,9 +318,9 @@ declare namespace Cypress {
|
||||
/**
|
||||
* @see https://on.cypress.io/api/route
|
||||
*/
|
||||
route(url: string, response?: any): Chainable;
|
||||
route(method: string, url: string, response?: any): Chainable;
|
||||
route(fn: () => RouteOptions | RouteOptions): Chainable;
|
||||
route(url: string | RegExp, response?: any): Chainable;
|
||||
route(method: string, url: string | RegExp, response?: any): Chainable;
|
||||
route(fn: (() => RouteOptions) | RouteOptions): Chainable;
|
||||
|
||||
/**
|
||||
* @see https://on.cypress.io/api/screenshot
|
||||
@@ -369,7 +370,7 @@ declare namespace Cypress {
|
||||
/**
|
||||
* @see https://on.cypress.io/api/then
|
||||
*/
|
||||
then(fn: (currentSubject: any) => any): Chainable;
|
||||
then(fn: (currentSubject: any) => any, options?: Timeoutable): Chainable;
|
||||
|
||||
/**
|
||||
* @see https://on.cypress.io/api/title
|
||||
|
||||
Vendored
+4
-1
@@ -36,7 +36,10 @@ export type GeoGeometryObjects = GeoJSON.GeometryObject | GeoSphere;
|
||||
export interface ExtendedGeometryCollection<GeometryType extends GeoGeometryObjects> {
|
||||
type: string;
|
||||
bbox?: number[];
|
||||
crs?: GeoJSON.CoordinateReferenceSystem;
|
||||
crs?: {
|
||||
type: string;
|
||||
properties: any;
|
||||
};
|
||||
geometries: GeometryType[];
|
||||
}
|
||||
|
||||
|
||||
@@ -1036,6 +1036,19 @@ positions = d3Selection.touches(svg, changedTouches);
|
||||
positions = d3Selection.touches(g, changedTouches);
|
||||
positions = d3Selection.touches(h, changedTouches);
|
||||
|
||||
// clientPoint() ---------------------------------------------------------------------
|
||||
|
||||
let clientPoint: [number, number];
|
||||
declare let mEvt: MouseEvent;
|
||||
declare let tEvt: Touch;
|
||||
declare let msgEvt: MSGestureEvent;
|
||||
declare let customEvt: {clientX: number, clientY: number}; // minimally conforming object
|
||||
|
||||
clientPoint = d3Selection.clientPoint(svg, mEvt);
|
||||
clientPoint = d3Selection.clientPoint(g, tEvt);
|
||||
clientPoint = d3Selection.clientPoint(h, msgEvt);
|
||||
clientPoint = d3Selection.clientPoint(h, customEvt);
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Tests of style
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
Vendored
+31
-14
@@ -1,9 +1,9 @@
|
||||
// Type definitions for D3JS d3-selection module 1.1
|
||||
// Type definitions for D3JS d3-selection module 1.2
|
||||
// Project: https://github.com/d3/d3-selection/
|
||||
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Last module patch version validated against: 1.1
|
||||
// Last module patch version validated against: 1.2.0
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Shared Type Definitions and Interfaces
|
||||
@@ -44,6 +44,14 @@ export interface EnterElement {
|
||||
*/
|
||||
export type ContainerElement = HTMLElement | SVGSVGElement | SVGGElement;
|
||||
|
||||
/**
|
||||
* A User interface event (e.g. mouse event, touch or MSGestureEvent) with captured clientX and clientY properties.
|
||||
*/
|
||||
export interface ClientPointEvent {
|
||||
clientX: number;
|
||||
clientY: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface for optional parameters map, when dispatching custom events
|
||||
* on a selection
|
||||
@@ -670,7 +678,8 @@ export interface Selection<GElement extends BaseType, Datum, PElement extends Ba
|
||||
*
|
||||
* If a key function is not specified, then the first datum in data is assigned to the first selected element,
|
||||
* the second datum to the second selected element, and so on.
|
||||
* A key function may be specified to control which datum is assigned to which element, replacing the default join-by-index.
|
||||
* A key function may be specified to control which datum is assigned to which element, replacing the default join-by-index,
|
||||
* by computing a string identifier for each datum and element.
|
||||
*
|
||||
* The update and enter selections are returned in data order, while the exit selection preserves the selection
|
||||
* order prior to the join. If a key function is specified, the order of elements in the selection may not match
|
||||
@@ -684,9 +693,9 @@ export interface Selection<GElement extends BaseType, Datum, PElement extends Ba
|
||||
*
|
||||
* @param data The specified data is an array of arbitrary values (e.g., numbers or objects).
|
||||
* @param key An optional key function which is evaluated for each selected element, in order, being passed the
|
||||
* current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]).
|
||||
* current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]); the returned string is the element’s key.
|
||||
* The key function is then also evaluated for each new datum in data, being passed the current datum (d),
|
||||
* the current index (i), and the group’s new data, with this as the group’s parent DOM element (nodes[i]).
|
||||
* the current index (i), and the group’s new data, with this as the group’s parent DOM element (nodes[i]); the returned string is the datum’s key.
|
||||
* The datum for a given key is assigned to the element with the matching key. If multiple elements have the same key,
|
||||
* the duplicate elements are put into the exit selection; if multiple data have the same key, the duplicate data are put into the enter selection.
|
||||
*/
|
||||
@@ -700,7 +709,8 @@ export interface Selection<GElement extends BaseType, Datum, PElement extends Ba
|
||||
*
|
||||
* If a key function is not specified, then the first datum in data is assigned to the first selected element,
|
||||
* the second datum to the second selected element, and so on.
|
||||
* A key function may be specified to control which datum is assigned to which element, replacing the default join-by-index.
|
||||
* A key function may be specified to control which datum is assigned to which element, replacing the default join-by-index,
|
||||
* by computing a string identifier for each datum and element.
|
||||
*
|
||||
* The update and enter selections are returned in data order, while the exit selection preserves the selection
|
||||
* order prior to the join. If a key function is specified, the order of elements in the selection may not match
|
||||
@@ -716,9 +726,9 @@ export interface Selection<GElement extends BaseType, Datum, PElement extends Ba
|
||||
* (d, which may be undefined), the group index (i), and the selection’s parent nodes (nodes),
|
||||
* with this as the group’s parent element. The function returns an array of values for each group.
|
||||
* @param key An optional key function which is evaluated for each selected element, in order, being passed the
|
||||
* current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]).
|
||||
* current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]); the returned string is the element’s key.
|
||||
* The key function is then also evaluated for each new datum in data, being passed the current datum (d),
|
||||
* the current index (i), and the group’s new data, with this as the group’s parent DOM element.
|
||||
* the current index (i), and the group’s new data, with this as the group’s parent DOM element (nodes[i]); the returned string is the datum’s key.
|
||||
* The datum for a given key is assigned to the element with the matching key. If multiple elements have the same key,
|
||||
* the duplicate elements are put into the exit selection; if multiple data have the same key, the duplicate data are put into the enter selection.
|
||||
*/
|
||||
@@ -726,16 +736,13 @@ export interface Selection<GElement extends BaseType, Datum, PElement extends Ba
|
||||
|
||||
/**
|
||||
* Return the enter selection: placeholder nodes for each datum that had no corresponding DOM element
|
||||
* in the selection. The enter selection is determined by selection.data, and is empty on a selection that
|
||||
* is not joined to data.
|
||||
* in the selection. (The enter selection is empty for selections not returned by selection.data.)
|
||||
*/
|
||||
enter(): Selection<EnterElement, Datum, PElement, PDatum>;
|
||||
|
||||
/**
|
||||
* Return the exit selection: existing DOM elements in the selection for which no new datum was found.
|
||||
* The exit selection is determined by the previous selection.data, and is thus empty until the selection is
|
||||
* joined to data. If the exit selection is retrieved more than once after a data join, subsequent calls return
|
||||
* the empty selection.
|
||||
* Returns the exit selection: existing DOM elements in the selection for which no new datum was found.
|
||||
* (The exit selection is empty for selections not returned by selection.data.)
|
||||
*
|
||||
* IMPORTANT: The generic refers to the type of the old datum associated with the exit selection elements.
|
||||
* Ensure you set the generic to the correct type, if you need to access the data on the exit selection in
|
||||
@@ -972,6 +979,16 @@ export function touch(container: ContainerElement, touches: TouchList, identifie
|
||||
*/
|
||||
export function touches(container: ContainerElement, touches?: TouchList): Array<[number, number]>;
|
||||
|
||||
/**
|
||||
* Returns the x and y coordinates of the specified event relative to the specified container.
|
||||
* (The event may also be a touch.) The container may be an HTML or SVG container element, such as a G element or an SVG element.
|
||||
* The coordinates are returned as a two-element array of numbers [x, y].
|
||||
*
|
||||
* @param container Container element relative to which coordinates are calculated.
|
||||
* @param event A User interface event (e.g. mouse event, touch or MSGestureEvent) with captured clientX and clientY properties.
|
||||
*/
|
||||
export function clientPoint(container: ContainerElement, event: ClientPointEvent): [number, number];
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// style
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for D3JS d3 standard bundle 4.11
|
||||
// Type definitions for D3JS d3 standard bundle 4.12
|
||||
// Project: https://github.com/d3/d3
|
||||
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
@@ -1,8 +1,39 @@
|
||||
const gDagre = new dagre.graphlib.Graph();
|
||||
const gDagre = new dagre.graphlib.Graph({compound: true, multigraph: false});
|
||||
gDagre.setGraph({})
|
||||
.setDefaultEdgeLabel(() => ({}))
|
||||
.setDefaultNodeLabel(() => ({}))
|
||||
.setNode("a", {})
|
||||
.setEdge("b", "c")
|
||||
.setEdge("c", "d", {class: "class"});
|
||||
|
||||
dagre.layout(gDagre);
|
||||
|
||||
gDagre.edge({v: 'b', w: 'c'});
|
||||
gDagre.hasEdge({v: 'b', w: 'c'});
|
||||
gDagre.inEdges('c');
|
||||
gDagre.outEdges('c');
|
||||
|
||||
gDagre.setParent('a', 'b');
|
||||
gDagre.children('b');
|
||||
gDagre.hasNode('d');
|
||||
gDagre.neighbors('c');
|
||||
gDagre.node({});
|
||||
gDagre.parent('a');
|
||||
gDagre.predecessors('d');
|
||||
gDagre.successors('b');
|
||||
|
||||
gDagre.removeEdge('c', 'd').removeNode('d');
|
||||
|
||||
dagre.graphlib.json.read(dagre.graphlib.json.write(gDagre));
|
||||
|
||||
dagre.graphlib.alg.components(gDagre);
|
||||
dagre.graphlib.alg.dijkstra(gDagre, 'a', (edge) => 5);
|
||||
dagre.graphlib.alg.dijkstraAll(gDagre);
|
||||
dagre.graphlib.alg.findCycles(gDagre);
|
||||
dagre.graphlib.alg.floydWarchall(gDagre);
|
||||
dagre.graphlib.alg.isAcyclic(gDagre);
|
||||
dagre.graphlib.alg.postorder(gDagre, 'a');
|
||||
dagre.graphlib.alg.preorder(gDagre, ['b', 'c']);
|
||||
dagre.graphlib.alg.prim(gDagre);
|
||||
dagre.graphlib.alg.tarjam(gDagre);
|
||||
dagre.graphlib.alg.topsort(gDagre);
|
||||
|
||||
Vendored
+87
-14
@@ -3,6 +3,7 @@
|
||||
// Definitions by: Qinfeng Chen <https://github.com/qinfchen>
|
||||
// Lisa Vallfors <https://github.com/Frankrike>
|
||||
// Pete Vilter <https://github.com/vilterp>
|
||||
// David Newell <https://github.com/rustedgrail>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -10,24 +11,69 @@ export as namespace dagre;
|
||||
|
||||
export namespace graphlib {
|
||||
class Graph {
|
||||
edges(): Edge[];
|
||||
edge(id: any): any;
|
||||
nodes(): string[];
|
||||
node(id: any): any;
|
||||
setDefaultEdgeLabel(callback: string|(() => string|object)): Graph;
|
||||
setDefaultNodeLabel(callback: string|(() => string|object)): Graph;
|
||||
setEdge(sourceId: string, targetId: string, options?: { [key: string]: any }, value?: string): Graph;
|
||||
setEdge(params: {v: string, w: string, name?: string}, value?: string): Graph;
|
||||
setGraph(label: GraphLabel): Graph;
|
||||
setNode(id: string, node: { [key: string]: any }): Graph;
|
||||
graph(): GraphLabel;
|
||||
|
||||
constructor(opt?: {directed?: boolean, multigraph?: boolean, compound?: boolean});
|
||||
setParent(name: string, parentName: string): void;
|
||||
|
||||
graph(): GraphLabel;
|
||||
isDirected(): boolean;
|
||||
isMultiGraph(): boolean;
|
||||
setGraph(label: GraphLabel): Graph;
|
||||
|
||||
edge(edgeObj: Edge): GraphEdge;
|
||||
edge(outNodeName: string, inNodeName: string, name?: string): GraphEdge;
|
||||
edgeCount(): number;
|
||||
edges(): Edge[];
|
||||
hasEdge(edgeObj: Edge): boolean;
|
||||
hasEdge(outNodeName: string, inNodeName: string, name?: string): boolean;
|
||||
inEdges(inNodeName: string, outNodeName?: string): Edge[]|undefined;
|
||||
outEdges(outNodeName: string, inNodeName?: string): Edge[]|undefined;
|
||||
removeEdge(outNodeName: string, inNodeName: string): Graph;
|
||||
setDefaultEdgeLabel(callback: string|((edge: Edge) => string|Label)): Graph;
|
||||
setEdge(params: Edge, value?: string|{[key: string]: any}): Graph;
|
||||
setEdge(sourceId: string, targetId: string, value?: string|Label, name?: string): Graph;
|
||||
|
||||
children(parentName: string): string|undefined;
|
||||
hasNode(name: string): boolean;
|
||||
neighbors(name: string): Node[]|undefined;
|
||||
node(id: string|Label): Node;
|
||||
nodeCount(): number;
|
||||
nodes(): string[];
|
||||
parent(childName: string): string|undefined;
|
||||
predecessors(name: string): Node[]|undefined;
|
||||
removeNode(name: string): Graph;
|
||||
setDefaultNodeLabel(callback: string|((nodeId: string) => string|Label)): Graph;
|
||||
setNode(name: string, label: string|Label): Graph;
|
||||
setParent(childName: string, parentName: string): void;
|
||||
sinks(): Node[];
|
||||
sources(): Node[];
|
||||
successors(name: string): Node[]|undefined;
|
||||
}
|
||||
|
||||
namespace json {
|
||||
function read(graph: any): Graph;
|
||||
function write(graph: Graph): any;
|
||||
}
|
||||
|
||||
namespace alg {
|
||||
function components(graph: Graph): string[][];
|
||||
function dijkstra(graph: Graph, source: string, weightFn?: WeightFn, edgeFn?: EdgeFn): any;
|
||||
function dijkstraAll(graph: Graph, weightFn?: WeightFn, edgeFn?: EdgeFn): any;
|
||||
function findCycles(graph: Graph): string[][];
|
||||
function floydWarchall(graph: Graph, weightFn?: WeightFn, edgeFn?: EdgeFn): any;
|
||||
function isAcyclic(graph: Graph): boolean;
|
||||
function postorder(graph: Graph, nodeNames: string|string[]): string[];
|
||||
function preorder(graph: Graph, nodeNames: string|string[]): string[];
|
||||
function prim(graph: Graph, weightFn?: WeightFn): Graph;
|
||||
function tarjam(graph: Graph): string[][];
|
||||
function topsort(graph: Graph): string[];
|
||||
}
|
||||
}
|
||||
|
||||
export interface Label {
|
||||
[key: string]: any;
|
||||
}
|
||||
export type WeightFn = (edge: Edge) => number;
|
||||
export type EdgeFn = (outNodeName: string) => GraphEdge[];
|
||||
|
||||
export interface GraphLabel {
|
||||
width?: number;
|
||||
height?: number;
|
||||
@@ -43,10 +89,37 @@ export interface GraphLabel {
|
||||
ranker?: string;
|
||||
}
|
||||
|
||||
export function layout(graph: graphlib.Graph): void;
|
||||
export interface NodeConfig {
|
||||
width?: number;
|
||||
height?: number;
|
||||
}
|
||||
|
||||
export interface EdgeConfig {
|
||||
minlen: number;
|
||||
weight: number;
|
||||
width: number;
|
||||
height: number;
|
||||
lablepos: 'l'|'c'|'r';
|
||||
labeloffest: number;
|
||||
}
|
||||
|
||||
export function layout(graph: graphlib.Graph, layout?: GraphLabel&NodeConfig&EdgeConfig): void;
|
||||
|
||||
export interface Edge {
|
||||
v: string;
|
||||
w: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface GraphEdge {
|
||||
points: Array<{x: number, y: number}>;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface Node {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -25,6 +25,7 @@ declare namespace daterangepicker {
|
||||
|
||||
startDate: moment.Moment;
|
||||
endDate: moment.Moment;
|
||||
container: JQuery;
|
||||
|
||||
setStartDate(date: Date | moment.Moment | string): void;
|
||||
setEndDate(date: Date | moment.Moment | string): void;
|
||||
|
||||
Vendored
+26
-17
@@ -1,6 +1,8 @@
|
||||
// Type definitions for DCJS
|
||||
// Project: https://github.com/dc-js/dc.js
|
||||
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>, matt traynham <https://github.com/mtraynham>
|
||||
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>
|
||||
// matt traynham <https://github.com/mtraynham>
|
||||
// matthias jobst <https://github.com/MatthiasJobst>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// this makes only sense together with d3 and crossfilter so you need the d3.d.ts and crossfilter.d.ts files
|
||||
@@ -49,8 +51,9 @@ declare namespace dc {
|
||||
format: Accessor<any, string>;
|
||||
}
|
||||
|
||||
// http://dc-js.github.io/dc.js/docs/html/dc.units.html
|
||||
export interface UnitFunction {
|
||||
(start: number, end: number, domain?: Array<any>): number|Array<any>;
|
||||
(start: number|Date, end: number|Date, domain?: number|Array<string>): number | Array<number|Date|string>;
|
||||
}
|
||||
|
||||
export interface FloatPointUnits {
|
||||
@@ -135,12 +138,13 @@ declare namespace dc {
|
||||
minHeight: IGetSet<number, T>;
|
||||
dimension: IGetSet<any, T>;
|
||||
data: IGetSetComputed<(group: any) => Array<any>, Array<any>, T>;
|
||||
group: IGetSet<any, T>;
|
||||
// http://dc-js.github.io/dc.js/docs/html/dc.baseMixin.html#group__anchor
|
||||
group: IBiGetSet<any, string, T>;
|
||||
ordering: IGetSet<Accessor<any, any>, T>;
|
||||
filterAll(): void;
|
||||
select(selector: d3.Selection<any>|string): d3.Selection<any>;
|
||||
selectAll(selector: d3.Selection<any>|string): d3.Selection<any>;
|
||||
anchor(anchor: BaseMixin<any>|d3.Selection<any>|string, chartGroup?: string): d3.Selection<any>;
|
||||
select(selector: d3.Selection<any> | string): d3.Selection<any>;
|
||||
selectAll(selector: d3.Selection<any> | string): d3.Selection<any>;
|
||||
anchor(anchor: BaseMixin<any> | d3.Selection<any> | string, chartGroup?: string): d3.Selection<any>;
|
||||
anchorName(): string;
|
||||
svg: IGetSet<d3.Selection<any>, d3.Selection<any>>;
|
||||
resetSvg(): void;
|
||||
@@ -196,10 +200,11 @@ declare namespace dc {
|
||||
}
|
||||
|
||||
export interface ColorMixin<T> {
|
||||
colors: IGetSet<Array<string> | Scale<string | d3.Color>, T>;
|
||||
ordinalColors(r: Array<string>): void;
|
||||
linearColors(r: Array<string>): void;
|
||||
colorAccessor: IGetSet<Accessor<any, string>, T>;
|
||||
// http://dc-js.github.io/dc.js/docs/html/dc.colorMixin.html
|
||||
colors: IGetSet<Array<string> | Scale<string | d3.Color> | string, T>;
|
||||
ordinalColors(r: Array<string>): T;
|
||||
linearColors(r: Array<string>): T;
|
||||
colorAccessor: IGetSet<Accessor<any, number>, T>;
|
||||
colorDomain: IGetSet<Array<any>, T>;
|
||||
calculateColorDomain(): void;
|
||||
getColor(datum: any, index?: number): string;
|
||||
@@ -291,7 +296,7 @@ declare namespace dc {
|
||||
dashStyle: IGetSet<Array<number>, LineChart>;
|
||||
renderArea: IGetSet<boolean, LineChart>;
|
||||
dotRadius: IGetSet<number, LineChart>;
|
||||
renderDataPoints: IGetSet<RenderDataPointOptions|any, LineChart>;
|
||||
renderDataPoints: IGetSet<RenderDataPointOptions | any, LineChart>;
|
||||
}
|
||||
|
||||
export interface DataCountWidgetHTML {
|
||||
@@ -307,7 +312,7 @@ declare namespace dc {
|
||||
export interface DataTableWidget extends BaseMixin<DataTableWidget> {
|
||||
size: IGetSet<number, DataTableWidget>;
|
||||
showGroups: IGetSet<boolean, DataTableWidget>;
|
||||
columns: IGetSet<Array<string|Accessor<any, any>|Columns>, DataTableWidget>;
|
||||
columns: IGetSet<Array<string | Accessor<any, any> | Columns>, DataTableWidget>;
|
||||
sortBy: IGetSet<Accessor<any, any>, DataTableWidget>;
|
||||
order: IGetSet<(a: any, b: any) => number, DataTableWidget>;
|
||||
}
|
||||
@@ -336,7 +341,7 @@ declare namespace dc {
|
||||
rightYAxis: IGetSet<d3.svg.Axis, ICompositeChart<T>>;
|
||||
}
|
||||
|
||||
export interface CompositeChart extends ICompositeChart<CompositeChart> {}
|
||||
export interface CompositeChart extends ICompositeChart<CompositeChart> { }
|
||||
|
||||
export interface SeriesChart extends ICompositeChart<SeriesChart> {
|
||||
chart: IGetSet<(c: any) => BaseMixin<any>, SeriesChart>;
|
||||
@@ -444,11 +449,16 @@ declare namespace dc {
|
||||
round: Round;
|
||||
utils: Utils;
|
||||
|
||||
// http://dc-js.github.io/dc.js/docs/html/core.js.html, Line 20
|
||||
version: string;
|
||||
|
||||
legend(): Legend;
|
||||
|
||||
pieChart(parent: string, chartGroup?: string): PieChart;
|
||||
barChart(parent: string, chartGroup?: string): BarChart;
|
||||
lineChart(parent: string, chartGroup?: string): LineChart;
|
||||
// http://dc-js.github.io/dc.js/docs/html/dc.barChart.html
|
||||
barChart(parent: string | CompositeChart, chartGroup?: string): BarChart;
|
||||
// http://dc-js.github.io/dc.js/docs/html/dc.lineChart.html
|
||||
lineChart(parent: string | CompositeChart, chartGroup?: string): LineChart;
|
||||
dataCount(parent: string, chartGroup?: string): DataCountWidget;
|
||||
dataTable(parent: string, chartGroup?: string): DataTableWidget;
|
||||
dataGrid(parent: string, chartGroup?: string): DataGridWidget;
|
||||
@@ -463,5 +473,4 @@ declare namespace dc {
|
||||
heatMap(parent: string, chartGroup?: string): HeatMap;
|
||||
boxPlot(parent: string, chartGroup?: string): BoxPlot;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+7
@@ -18,3 +18,10 @@ declare namespace deepmerge {
|
||||
|
||||
function all<T>(objects: Array<Partial<T>>, options?: Options): T;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
deepmerge<T>(x: Partial<T>, y: Partial<T>, options?: deepmerge.Options): T;
|
||||
deepmerge<T1, T2>(x: T1, y: T2, options?: deepmerge.Options): T1 & T2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import { parse, CommandEntry, ParseOptions } from 'docker-file-parser';
|
||||
|
||||
const file = `
|
||||
FROM node:8
|
||||
|
||||
ADD . /opt/
|
||||
WORKDIR /opt
|
||||
|
||||
RUN npm install --production
|
||||
|
||||
EXPOSE 8080
|
||||
VOLUME /opt/scripts
|
||||
|
||||
CMD ["npm", "start"]
|
||||
`;
|
||||
|
||||
const options: ParseOptions = {
|
||||
includeComments: false
|
||||
};
|
||||
|
||||
const result: CommandEntry[] = parse(file, options);
|
||||
const line1Name = result[0].name;
|
||||
const line1Number = result[0].lineno;
|
||||
const line1Args = result[0].args;
|
||||
const line1Raw = result[0].raw;
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// Type definitions for docker-file-parser 1.0
|
||||
// Project: https://github.com/joyent/docker-file-parse
|
||||
// Definitions by: Yash Kulshrestha <https://github.com/yashdalfthegray>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface CommandEntry {
|
||||
name: string;
|
||||
args: string[];
|
||||
lineno: number;
|
||||
raw: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface ParseOptions {
|
||||
includeComments: boolean;
|
||||
}
|
||||
|
||||
export function parse(
|
||||
contents: string,
|
||||
options?: ParseOptions
|
||||
): CommandEntry[];
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"docker-file-parser-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -0,0 +1,4 @@
|
||||
import dotdir = require('dotdir-regex');
|
||||
|
||||
// $ExpectType RegExp
|
||||
dotdir();
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// Type definitions for dotdir-regex 1.0
|
||||
// Project: https://github.com/regexhq/dotdir-regex
|
||||
// Definitions by: mrmlnc <https://github.com/mrmlnc>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function dotdirRegex(): RegExp;
|
||||
|
||||
export = dotdirRegex;
|
||||
@@ -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",
|
||||
"dotdir-regex-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -0,0 +1,4 @@
|
||||
import dotfile = require('dotfile-regex');
|
||||
|
||||
// $ExpectType RegExp
|
||||
dotfile();
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// Type definitions for dotfile-regex 1.0
|
||||
// Project: https://github.com/regexhq/dotfile-regex
|
||||
// Definitions by: mrmlnc <https://github.com/mrmlnc>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function dotfileRegex(): RegExp;
|
||||
|
||||
export = dotfileRegex;
|
||||
@@ -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",
|
||||
"dotfile-regex-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user