mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge branch 'master' into master
This commit is contained in:
@@ -40,7 +40,8 @@ $routeProvider
|
||||
}
|
||||
})
|
||||
.otherwise({ redirectTo: '/' })
|
||||
.otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" });
|
||||
.otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" })
|
||||
.otherwise("/");
|
||||
|
||||
|
||||
var current: ng.route.ICurrentRoute;
|
||||
|
||||
Vendored
+1
-1
@@ -138,7 +138,7 @@ declare module 'angular' {
|
||||
*
|
||||
* @params Mapping information to be assigned to $route.current.
|
||||
*/
|
||||
otherwise(params: IRoute): IRouteProvider;
|
||||
otherwise(params: IRoute | string): IRouteProvider;
|
||||
/**
|
||||
* Adds a new route definition to the $route service.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import arrayUnique = require("array-unique");
|
||||
|
||||
arrayUnique([1, 1, 2, 3, 3]);
|
||||
|
||||
arrayUnique(["foo", "foo", "bar", "foo"]);
|
||||
|
||||
arrayUnique.immutable([1, 1, 2, 3, 3]);
|
||||
|
||||
arrayUnique.immutable(["foo", "foo", "bar", "foo"]);
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for array-unique 0.3
|
||||
// Project: https://github.com/jonschlinkert/array-unique
|
||||
// Definitions by: Michaël St-Georges <https://github.com/CSLTech>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function arrayUnique<T>(arr: T[]): T[];
|
||||
|
||||
declare namespace arrayUnique {
|
||||
function immutable<T>(arr: ReadonlyArray<T>): T[];
|
||||
}
|
||||
|
||||
export = arrayUnique;
|
||||
@@ -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",
|
||||
"array-unique-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+19
-41
@@ -7,6 +7,7 @@
|
||||
export as namespace async;
|
||||
|
||||
export interface Dictionary<T> { [key: string]: T; }
|
||||
export type IterableCollection<T> = T[] | IterableIterator<T> | Dictionary<T>
|
||||
|
||||
export interface ErrorCallback<T> { (err?: T): void; }
|
||||
export interface AsyncBooleanResultCallback<E> { (err?: E, truthValue?: boolean): void; }
|
||||
@@ -36,11 +37,9 @@ export interface AsyncQueue<T> {
|
||||
running(): number;
|
||||
idle(): boolean;
|
||||
concurrency: number;
|
||||
push<E>(task: T, callback?: ErrorCallback<E>): void;
|
||||
push<E>(task: T | T[], callback?: ErrorCallback<E>): void;
|
||||
push<R,E>(task: T, callback?: AsyncResultCallback<R, E>): void;
|
||||
push<E>(task: T[], callback?: ErrorCallback<E>): void;
|
||||
unshift<E>(task: T, callback?: ErrorCallback<E>): void;
|
||||
unshift<E>(task: T[], callback?: ErrorCallback<E>): void;
|
||||
unshift<E>(task: T | T[], callback?: ErrorCallback<E>): void;
|
||||
saturated: () => any;
|
||||
empty: () => any;
|
||||
drain: () => any;
|
||||
@@ -62,8 +61,7 @@ export interface AsyncPriorityQueue<T> {
|
||||
concurrency: number;
|
||||
started: boolean;
|
||||
paused: boolean;
|
||||
push<R,E>(task: T, priority: number, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
push<R,E>(task: T[], priority: number, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
push<R,E>(task: T | T[], priority: number, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
saturated: () => any;
|
||||
empty: () => any;
|
||||
drain: () => any;
|
||||
@@ -86,7 +84,6 @@ export interface AsyncCargo {
|
||||
length(): number;
|
||||
payload?: number;
|
||||
push(task: any, callback? : Function): void;
|
||||
push(task: any[], callback? : Function): void;
|
||||
saturated(): void;
|
||||
empty(): void;
|
||||
drain(): void;
|
||||
@@ -97,39 +94,28 @@ export interface AsyncCargo {
|
||||
}
|
||||
|
||||
// Collections
|
||||
export function each<T, E>(arr: T[] | IterableIterator<T>, iterator: AsyncIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export function each<T, E>(arr: Dictionary<T>, iterator: AsyncIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export function each<T, E>(arr: IterableCollection<T>, iterator: AsyncIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export const eachSeries: typeof each;
|
||||
export function eachLimit<T, E>(arr: T[] | IterableIterator<T>, limit: number, iterator: AsyncIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export function eachLimit<T, E>(arr: Dictionary<T>, limit: number, iterator: AsyncIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export function eachLimit<T, E>(arr: IterableCollection<T>, limit: number, iterator: AsyncIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export const forEach: typeof each;
|
||||
export const forEachSeries: typeof each;
|
||||
export const forEachLimit: typeof eachLimit;
|
||||
export function forEachOf<T, E>(obj: T[] | IterableIterator<T>, iterator: AsyncForEachOfIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export function forEachOf<T, E>(obj: Dictionary<T>, iterator: AsyncForEachOfIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export function forEachOf<T, E>(obj: IterableCollection<T>, iterator: AsyncForEachOfIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export const forEachOfSeries: typeof forEachOf;
|
||||
export function forEachOfLimit<T, E>(obj: T[] | IterableIterator<T>, limit: number, iterator: AsyncForEachOfIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export function forEachOfLimit<T, E>(obj: Dictionary<T>, limit: number, iterator: AsyncForEachOfIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export function forEachOfLimit<T, E>(obj: IterableCollection<T>, limit: number, iterator: AsyncForEachOfIterator<T, E>, callback?: ErrorCallback<E>): void;
|
||||
export const eachOf: typeof forEachOf;
|
||||
export const eachOfSeries: typeof forEachOf;
|
||||
export const eachOfLimit: typeof forEachOfLimit;
|
||||
export function map<T, R, E>(arr: T[] | IterableIterator<T>, iterator: AsyncResultIterator<T, R, E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export function map<T, R, E>(arr: Dictionary<T>, iterator: AsyncResultIterator<T, R, E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export const mapSeries: typeof map;
|
||||
export function mapLimit<T, R, E>(
|
||||
arr: T[] | Dictionary<T> | IterableIterator<T>,
|
||||
limit: number,
|
||||
iterator: AsyncResultIterator<T, R, E>,
|
||||
callback?: AsyncResultArrayCallback<R, E>
|
||||
): void;
|
||||
export function mapLimit<T, R, E>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R, E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export function mapValuesLimit<T, R, E>(obj: Dictionary<T>, limit: number, iteratee: (value: T, key: string, callback: AsyncResultCallback<R, E>) => void, callback: AsyncResultObjectCallback<R, E>): void;
|
||||
export function mapValues<T, R, E>(obj: Dictionary<T>, iteratee: (value: T, key: string, callback: AsyncResultCallback<R, E>) => void, callback: AsyncResultObjectCallback<R, E>): void;
|
||||
export const mapValuesSeries: typeof mapValues;
|
||||
export function filter<T, E>(arr: T[] | IterableIterator<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultArrayCallback<T, E>): void;
|
||||
export function filter<T, E>(arr: Dictionary<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultArrayCallback<T, E>): void;
|
||||
export function filter<T, E>(arr: IterableCollection<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultArrayCallback<T, E>): void;
|
||||
export const filterSeries: typeof filter;
|
||||
export function filterLimit<T, E>(arr: T[] | IterableIterator<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultArrayCallback<T, E>): void;
|
||||
export function filterLimit<T, E>(arr: Dictionary<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultArrayCallback<T, E>): void;
|
||||
export function filterLimit<T, E>(arr: IterableCollection<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultArrayCallback<T, E>): void;
|
||||
export const select: typeof filter;
|
||||
export const selectSeries: typeof filter;
|
||||
export const selectLimit: typeof filterLimit;
|
||||
@@ -141,36 +127,28 @@ export const inject: typeof reduce;
|
||||
export const foldl: typeof reduce;
|
||||
export const reduceRight: typeof reduce;
|
||||
export const foldr: typeof reduce;
|
||||
export function detect<T, E>(arr: T[] | IterableIterator<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultCallback<T, E>): void;
|
||||
export function detect<T, E>(arr: Dictionary<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultCallback<T, E>): void;
|
||||
export function detect<T, E>(arr: IterableCollection<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultCallback<T, E>): void;
|
||||
export const detectSeries: typeof detect;
|
||||
export function detectLimit<T, E>(arr: T[] | IterableIterator<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultCallback<T, E>): void;
|
||||
export function detectLimit<T, E>(arr: Dictionary<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultCallback<T, E>): void;
|
||||
export function detectLimit<T, E>(arr: IterableCollection<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncResultCallback<T, E>): void;
|
||||
export const find: typeof detect;
|
||||
export const findSeries: typeof detect;
|
||||
export const findLimit: typeof detectLimit;
|
||||
export function sortBy<T, V, E>(arr: T[] | IterableIterator<T>, iterator: AsyncResultIterator<T, V, E>, callback?: AsyncResultArrayCallback<T, E>): void;
|
||||
export function some<T, E>(arr: T[] | IterableIterator<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export function some<T, E>(arr: Dictionary<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export function some<T, E>(arr: IterableCollection<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export const someSeries: typeof some;
|
||||
export function someLimit<T, E>(arr: T[] | IterableIterator<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export function someLimit<T, E>(arr: Dictionary<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export function someLimit<T, E>(arr: IterableCollection<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export const any: typeof some;
|
||||
export const anySeries: typeof someSeries;
|
||||
export const anyLimit: typeof someLimit;
|
||||
export function every<T, E>(arr: T[] | IterableIterator<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export function every<T, E>(arr: Dictionary<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export function every<T, E>(arr: IterableCollection<T>, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export const everySeries: typeof every;
|
||||
export function everyLimit<T, E>(arr: T[] | IterableIterator<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export function everyLimit<T, E>(arr: Dictionary<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export function everyLimit<T, E>(arr: IterableCollection<T>, limit: number, iterator: AsyncBooleanIterator<T, E>, callback?: AsyncBooleanResultCallback<E>): void;
|
||||
export const all: typeof every;
|
||||
export const allSeries: typeof every;
|
||||
export const allLimit: typeof everyLimit;
|
||||
|
||||
export function concat<T, R, E>(arr: T[] | IterableIterator<T>, iterator: AsyncResultIterator<T, R[], E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export function concat<T, R, E>(arr: Dictionary<T>, iterator: AsyncResultIterator<T, R[], E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export function concatLimit<T, R, E>(arr: T[] | IterableIterator<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export function concatLimit<T, R, E>(arr: Dictionary<T>, limit: number,iterator: AsyncResultIterator<T, R[], E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export function concat<T, R, E>(arr: IterableCollection<T>, iterator: AsyncResultIterator<T, R[], E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export function concatLimit<T, R, E>(arr: IterableCollection<T>, limit: number, iterator: AsyncResultIterator<T, R[], E>, callback?: AsyncResultArrayCallback<R, E>): void;
|
||||
export const concatSeries: typeof concat;
|
||||
|
||||
// Control Flow
|
||||
|
||||
@@ -43,7 +43,7 @@ declare let marker: Atom.Marker;
|
||||
declare let markers: Atom.Marker[];
|
||||
declare let markerLayer: Atom.MarkerLayer;
|
||||
declare let notification: Atom.Notification;
|
||||
declare let notifications: Atom.Notification[];
|
||||
declare let notifications: ReadonlyArray<Atom.Notification>;
|
||||
declare let pack: Atom.Package;
|
||||
declare let packs: Atom.Package[];
|
||||
declare let pane: Atom.Pane;
|
||||
@@ -56,10 +56,12 @@ declare let posArr: Atom.Point[];
|
||||
declare let project: Atom.Project;
|
||||
declare let range: Atom.Range;
|
||||
declare let ranges: Atom.Range[];
|
||||
declare let readonlyStrs: ReadonlyArray<string>;
|
||||
declare let registry: Atom.GrammarRegistry;
|
||||
declare let repository: Atom.GitRepository;
|
||||
declare let repositories: Atom.GitRepository[];
|
||||
declare let scopeDescriptor: Atom.ScopeDescriptor;
|
||||
declare let scopes: ReadonlyArray<string>;
|
||||
declare let selection: Atom.Selection;
|
||||
declare let selections: Atom.Selection[];
|
||||
declare let styleManager: Atom.StyleManager;
|
||||
@@ -188,6 +190,10 @@ function testAtomEnvironment() {
|
||||
// Messaging the User
|
||||
atom.beep();
|
||||
|
||||
atom.confirm({ defaultId: 42 }, (response, checked) => {
|
||||
num = response;
|
||||
bool = checked;
|
||||
});
|
||||
atom.confirm({ message: "Test" });
|
||||
atom.confirm({ message: "Test", buttons: [ "a", "b" ], detailedMessage: "Test" });
|
||||
num = atom.confirm({ message: "Test", detailedMessage: "Test", buttons: {
|
||||
@@ -270,13 +276,19 @@ function testCommandRegistry() {
|
||||
"test-function2": (event) => {},
|
||||
});
|
||||
atom.commands.add("test", "test:function", {
|
||||
didDispatch: (event) => event.stopImmediatePropagation(),
|
||||
didDispatch: (event) => {
|
||||
event.stopImmediatePropagation();
|
||||
},
|
||||
description: "A Command Test",
|
||||
displayName: "Command: Test",
|
||||
});
|
||||
atom.commands.add("atom-text-editor", {
|
||||
"test-function": (event) => event.currentTarget.getModel(),
|
||||
"test-function2": (event) => event.currentTarget.getComponent(),
|
||||
"test-function": (event) => {
|
||||
event.currentTarget.getModel();
|
||||
},
|
||||
"test-function2": (event) => {
|
||||
event.currentTarget.getComponent();
|
||||
}
|
||||
});
|
||||
atom.commands.add("atom-workspace", {
|
||||
"test-command": {
|
||||
@@ -345,7 +357,7 @@ function testConfig() {
|
||||
|
||||
const allConfigValues = atom.config.getAll("test");
|
||||
for (const { scopeDescriptor, value } of allConfigValues) {
|
||||
scopeDescriptor.scopes;
|
||||
scopes = scopeDescriptor.getScopesArray();
|
||||
}
|
||||
atom.config.getAll("test", { scope: scopeDescriptor });
|
||||
atom.config.getAll("test", { excludeSources: ["test"] });
|
||||
@@ -853,6 +865,7 @@ function testDock() {
|
||||
subscription = dock.onDidDestroyPaneItem(event => {
|
||||
event.index && event.item && event.pane;
|
||||
});
|
||||
subscription = dock.onDidChangeHovered(hovered => bool = hovered);
|
||||
|
||||
// Pane Items
|
||||
objs = dock.getPaneItems();
|
||||
@@ -1375,6 +1388,7 @@ function testNotification() {
|
||||
function testNotificationManager() {
|
||||
// Events
|
||||
atom.notifications.onDidAddNotification(notification => notification.dismiss());
|
||||
atom.notifications.onDidClearNotifications(() => undefined);
|
||||
|
||||
// Adding Notifications
|
||||
atom.notifications.addSuccess("Test");
|
||||
@@ -1409,6 +1423,9 @@ function testNotificationManager() {
|
||||
|
||||
// Getting Notifications
|
||||
notifications = atom.notifications.getNotifications();
|
||||
|
||||
// Managing Notifications
|
||||
atom.notifications.clear();
|
||||
}
|
||||
|
||||
// Package ====================================================================
|
||||
@@ -1833,7 +1850,7 @@ function testRange() {
|
||||
}
|
||||
|
||||
// ScopeDescriptor ============================================================
|
||||
strs = scopeDescriptor.getScopesArray();
|
||||
readonlyStrs = scopeDescriptor.getScopesArray();
|
||||
|
||||
// Selection ==================================================================
|
||||
function testSelection() {
|
||||
@@ -2219,6 +2236,7 @@ function testTextBuffer() {
|
||||
num = buffer.createCheckpoint();
|
||||
bool = buffer.revertToCheckpoint(42);
|
||||
bool = buffer.groupChangesSinceCheckpoint(42);
|
||||
bool = buffer.groupLastChanges();
|
||||
buffer.getChangesSinceCheckpoint(42);
|
||||
|
||||
// Search And Replace
|
||||
@@ -2306,6 +2324,7 @@ function testTextBuffer() {
|
||||
num = buffer.getLastRow();
|
||||
pos = buffer.getFirstPosition();
|
||||
pos = buffer.getEndPosition();
|
||||
num = buffer.getLength();
|
||||
num = buffer.getMaxCharacterIndex();
|
||||
range = buffer.rangeForRow(42, true);
|
||||
num = buffer.characterIndexForPosition(pos);
|
||||
@@ -2700,6 +2719,8 @@ function testTextEditor() {
|
||||
editor.moveToNextSubwordBoundary();
|
||||
editor.moveToBeginningOfNextParagraph();
|
||||
editor.moveToBeginningOfPreviousParagraph();
|
||||
editor.selectLargerSyntaxNode();
|
||||
editor.selectSmallerSyntaxNode();
|
||||
cursor = editor.getLastCursor();
|
||||
|
||||
str = editor.getWordUnderCursor();
|
||||
|
||||
Vendored
+211
-85
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Atom 1.24
|
||||
// Type definitions for Atom 1.25
|
||||
// Project: https://github.com/atom/atom
|
||||
// Definitions by: GlenCFL <https://github.com/GlenCFL>
|
||||
// smhxx <https://github.com/smhxx>
|
||||
@@ -7,7 +7,7 @@
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
// NOTE: only those classes exported within this file should be retain that status below.
|
||||
// https://github.com/atom/atom/blob/v1.24.0/exports/atom.js
|
||||
// https://github.com/atom/atom/blob/v1.25.0/exports/atom.js
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
@@ -39,58 +39,58 @@ export function watchPath(rootPath: string, options: {}, eventCallback: (events:
|
||||
export interface AtomEnvironment {
|
||||
// Properties
|
||||
/** A CommandRegistry instance. */
|
||||
commands: CommandRegistry;
|
||||
readonly commands: CommandRegistry;
|
||||
|
||||
/** A Config instance. */
|
||||
config: Config;
|
||||
readonly config: Config;
|
||||
|
||||
/** A Clipboard instance. */
|
||||
clipboard: Clipboard;
|
||||
readonly clipboard: Clipboard;
|
||||
|
||||
/** A ContextMenuManager instance. */
|
||||
contextMenu: ContextMenuManager;
|
||||
readonly contextMenu: ContextMenuManager;
|
||||
|
||||
/** A MenuManager instance. */
|
||||
menu: MenuManager;
|
||||
readonly menu: MenuManager;
|
||||
|
||||
/** A KeymapManager instance. */
|
||||
keymaps: KeymapManager;
|
||||
readonly keymaps: KeymapManager;
|
||||
|
||||
/** A TooltipManager instance. */
|
||||
tooltips: TooltipManager;
|
||||
readonly tooltips: TooltipManager;
|
||||
|
||||
/** A NotificationManager instance. */
|
||||
notifications: NotificationManager;
|
||||
readonly notifications: NotificationManager;
|
||||
|
||||
/** A Project instance. */
|
||||
project: Project;
|
||||
readonly project: Project;
|
||||
|
||||
/** A GrammarRegistry instance. */
|
||||
grammars: GrammarRegistry;
|
||||
readonly grammars: GrammarRegistry;
|
||||
|
||||
/** A HistoryManager instance. */
|
||||
history: HistoryManager;
|
||||
readonly history: HistoryManager;
|
||||
|
||||
/** A PackageManager instance. */
|
||||
packages: PackageManager;
|
||||
readonly packages: PackageManager;
|
||||
|
||||
/** A ThemeManager instance. */
|
||||
themes: ThemeManager;
|
||||
readonly themes: ThemeManager;
|
||||
|
||||
/** A StyleManager instance. */
|
||||
styles: StyleManager;
|
||||
readonly styles: StyleManager;
|
||||
|
||||
/** A DeserializerManager instance. */
|
||||
deserializers: DeserializerManager;
|
||||
readonly deserializers: DeserializerManager;
|
||||
|
||||
/** A ViewRegistry instance. */
|
||||
views: ViewRegistry;
|
||||
readonly views: ViewRegistry;
|
||||
|
||||
/** A Workspace instance. */
|
||||
workspace: Workspace;
|
||||
readonly workspace: Workspace;
|
||||
|
||||
/** A TextEditorRegistry instance. */
|
||||
textEditors: TextEditorRegistry;
|
||||
readonly textEditors: TextEditorRegistry;
|
||||
|
||||
// Event Subscription
|
||||
/** Invoke the given callback whenever ::beep is called. */
|
||||
@@ -204,7 +204,27 @@ export interface AtomEnvironment {
|
||||
beep(): void;
|
||||
|
||||
/**
|
||||
* A flexible way to open a dialog akin to an alert dialog.
|
||||
* A flexible way to open a dialog akin to an alert dialog. If a callback
|
||||
* is provided, then the confirmation will work asynchronously, which is
|
||||
* recommended.
|
||||
*
|
||||
* If the dialog is closed (via `Esc` key or `X` in the top corner) without
|
||||
* selecting a button the first button will be clicked unless a "Cancel" or "No"
|
||||
* button is provided.
|
||||
*
|
||||
* Returns the chosen button index number if the buttons option was an array.
|
||||
* @param response The index of the button that was clicked.
|
||||
* @param checkboxChecked The checked state of the checkbox if `checkboxLabel` was set.
|
||||
* Otherwise false.
|
||||
*/
|
||||
confirm(options: ConfirmationOptions, callback: (response: number,
|
||||
checkboxChecked: boolean) => void): void;
|
||||
|
||||
/**
|
||||
* A flexible way to open a dialog akin to an alert dialog. If a callback
|
||||
* is provided, then the confirmation will work asynchronously, which is
|
||||
* recommended.
|
||||
*
|
||||
* If the dialog is closed (via `Esc` key or `X` in the top corner) without
|
||||
* selecting a button the first button will be clicked unless a "Cancel" or "No"
|
||||
* button is provided.
|
||||
@@ -218,7 +238,10 @@ export interface AtomEnvironment {
|
||||
}): void;
|
||||
|
||||
/**
|
||||
* A flexible way to open a dialog akin to an alert dialog.
|
||||
* A flexible way to open a dialog akin to an alert dialog. If a callback
|
||||
* is provided, then the confirmation will work asynchronously, which is
|
||||
* recommended.
|
||||
*
|
||||
* If the dialog is closed (via `Esc` key or `X` in the top corner) without
|
||||
* selecting a button the first button will be clicked unless a "Cancel" or "No"
|
||||
* button is provided.
|
||||
@@ -264,11 +287,11 @@ export interface CommandRegistryTargetMap extends HTMLElementTagNameMap {
|
||||
}
|
||||
|
||||
export type CommandRegistryListener<TargetType extends EventTarget> = {
|
||||
didDispatch(event: CommandEvent<TargetType>): void,
|
||||
displayName?: string,
|
||||
description?: string,
|
||||
hiddenInCommandPalette?: boolean,
|
||||
} | ((event: CommandEvent<TargetType>) => void);
|
||||
didDispatch(event: CommandEvent<TargetType>): void | Promise<void>,
|
||||
displayName?: string,
|
||||
description?: string,
|
||||
hiddenInCommandPalette?: boolean,
|
||||
} | ((event: CommandEvent<TargetType>) => void | Promise<void>);
|
||||
|
||||
/**
|
||||
* Associates listener functions with commands in a context-sensitive way
|
||||
@@ -305,9 +328,10 @@ export interface CommandRegistry {
|
||||
|
||||
/**
|
||||
* Simulate the dispatch of a command on a DOM node.
|
||||
* @return Whether or not there was a matching command for the target.
|
||||
* @return Either a Promise that resolves after all handlers complete or null if
|
||||
* no handlers were matched.
|
||||
*/
|
||||
dispatch(target: Node, commandName: string): boolean;
|
||||
dispatch(target: Node, commandName: string): Promise<void> | null;
|
||||
|
||||
/** Invoke the given callback before dispatching a command event. */
|
||||
onWillDispatch(callback: (event: CommandEvent) => void): Disposable;
|
||||
@@ -446,7 +470,7 @@ export interface Config {
|
||||
*/
|
||||
export interface Decoration {
|
||||
/** The identifier for this Decoration. */
|
||||
id: number;
|
||||
readonly id: number;
|
||||
|
||||
// Construction and Destruction
|
||||
/**
|
||||
@@ -654,7 +678,7 @@ export interface DisplayMarker {
|
||||
*/
|
||||
export interface DisplayMarkerLayer {
|
||||
/** The identifier for the underlying MarkerLayer. */
|
||||
id: string;
|
||||
readonly id: string;
|
||||
|
||||
// Lifecycle
|
||||
/** Destroy this layer. */
|
||||
@@ -839,7 +863,7 @@ export interface LayerDecoration {
|
||||
*/
|
||||
export interface Marker {
|
||||
/** The identifier for this Marker. */
|
||||
id: number;
|
||||
readonly id: number;
|
||||
|
||||
// Lifecycle
|
||||
/**
|
||||
@@ -952,7 +976,7 @@ export interface Marker {
|
||||
/** Experimental: A container for a related set of markers. */
|
||||
export interface MarkerLayer {
|
||||
/** The identifier for this MarkerLayer. */
|
||||
id: string;
|
||||
readonly id: string;
|
||||
|
||||
// Lifecycle
|
||||
/** Create a copy of this layer with markers in the same state and locations. */
|
||||
@@ -1035,13 +1059,13 @@ export class Notification {
|
||||
|
||||
/** A notification manager used to create Notifications to be shown to the user. */
|
||||
export interface NotificationManager {
|
||||
// Properties
|
||||
notifications: Notification[];
|
||||
|
||||
// Events
|
||||
/** Invoke the given callback after a notification has been added. */
|
||||
onDidAddNotification(callback: (notification: Notification) => void): Disposable;
|
||||
|
||||
/** Invoke the given callback after the notifications have been cleared. */
|
||||
onDidClearNotifications(callback: () => void): Disposable;
|
||||
|
||||
// Adding Notifications
|
||||
/** Add a success notification. */
|
||||
addSuccess(message: string, options?: NotificationOptions): Notification;
|
||||
@@ -1060,7 +1084,11 @@ export interface NotificationManager {
|
||||
|
||||
// Getting Notifications
|
||||
/** Get all the notifications. */
|
||||
getNotifications(): Notification[];
|
||||
getNotifications(): ReadonlyArray<Notification>;
|
||||
|
||||
// Managing Notifications
|
||||
/** Clear all the notifications. */
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
/** Represents a point in a buffer in row/column coordinates. */
|
||||
@@ -1272,8 +1300,7 @@ export class Range {
|
||||
* including cursor and selection positions, folds, and soft wraps.
|
||||
*/
|
||||
export class TextEditor {
|
||||
id: number;
|
||||
buffer: TextBuffer;
|
||||
readonly id: number;
|
||||
|
||||
// NOTE: undocumented within the public API. Don't go down the rabbit hole.
|
||||
constructor(options?: object);
|
||||
@@ -2137,6 +2164,12 @@ export class TextEditor {
|
||||
*/
|
||||
selectToBeginningOfPreviousParagraph(): void;
|
||||
|
||||
/** For each selection, select the syntax node that contains that selection. */
|
||||
selectLargerSyntaxNode(): void;
|
||||
|
||||
/** Undo the effect a preceding call to `::selectLargerSyntaxNode`. */
|
||||
selectSmallerSyntaxNode(): void;
|
||||
|
||||
/** Select the range of the given marker if it is valid. */
|
||||
selectMarker(marker: DisplayMarker): Range|undefined;
|
||||
|
||||
@@ -2347,7 +2380,10 @@ export class TextEditor {
|
||||
/** Unfold all existing folds. */
|
||||
unfoldAll(): void;
|
||||
|
||||
/** Fold all foldable lines at the given indent level. */
|
||||
/**
|
||||
* Fold all foldable lines at the given indent level.
|
||||
* @param level A zero-indexed number.
|
||||
*/
|
||||
foldAllAtIndentLevel(level: number): void;
|
||||
|
||||
/**
|
||||
@@ -2524,10 +2560,6 @@ export interface TextEditorRegistry {
|
||||
observe(callback: (editor: TextEditor) => void): Disposable;
|
||||
}
|
||||
|
||||
export interface JQueryCompatible<Element extends Node = HTMLElement> extends Iterable<Element> {
|
||||
jquery: string;
|
||||
}
|
||||
|
||||
export type TooltipPlacement =
|
||||
|"top"|"bottom"|"left"|"right"
|
||||
|"auto"|"auto top"|"auto bottom"|"auto left"|"auto right";
|
||||
@@ -2984,7 +3016,7 @@ export interface WorkspaceCenter {
|
||||
* Node's ChildProcess.
|
||||
*/
|
||||
export class BufferedProcess {
|
||||
process?: ChildProcess;
|
||||
readonly process?: ChildProcess;
|
||||
|
||||
constructor(options: ProcessOptions);
|
||||
|
||||
@@ -3452,6 +3484,12 @@ export interface Dock {
|
||||
/** Invoke the given callback when a pane item is destroyed. */
|
||||
onDidDestroyPaneItem(callback: (event: PaneItemObservedEvent) => void): Disposable;
|
||||
|
||||
/**
|
||||
* Invoke the given callback when the hovered state of the dock changes.
|
||||
* @param hovered Is the dock now hovered?
|
||||
*/
|
||||
onDidChangeHovered(callback: (hovered: boolean) => void): Disposable;
|
||||
|
||||
// Pane Items
|
||||
/** Get all pane items in the dock. */
|
||||
getPaneItems(): object[];
|
||||
@@ -4052,10 +4090,10 @@ export interface MenuManager {
|
||||
*/
|
||||
export interface Package {
|
||||
/** The name of the Package. */
|
||||
name: string;
|
||||
readonly name: string;
|
||||
|
||||
/** The path to the Package on disk. */
|
||||
path: string;
|
||||
readonly path: string;
|
||||
|
||||
// Event Subscription
|
||||
/** Invoke the given callback when all packages have been activated. */
|
||||
@@ -4377,7 +4415,7 @@ export interface Pane {
|
||||
*/
|
||||
export interface Panel<T = object> {
|
||||
/** Whether or not the Panel is visible. */
|
||||
visible: boolean;
|
||||
readonly visible: boolean;
|
||||
|
||||
// Construction and Destruction
|
||||
/** Destroy and remove this panel from the UI. */
|
||||
@@ -4498,10 +4536,8 @@ export interface Project {
|
||||
* syntax tree to a token including all scope names for the entire path.
|
||||
*/
|
||||
export interface ScopeDescriptor {
|
||||
scopes: string[];
|
||||
|
||||
/** Returns all scopes for this descriptor. */
|
||||
getScopesArray(): string[];
|
||||
getScopesArray(): ReadonlyArray<string>;
|
||||
}
|
||||
|
||||
/** Represents a selection in the TextEditor. */
|
||||
@@ -4894,13 +4930,13 @@ export class Task {
|
||||
*/
|
||||
export class TextBuffer {
|
||||
/** The unique identifier for this buffer. */
|
||||
id: string;
|
||||
readonly id: string;
|
||||
|
||||
/** The number of retainers for the buffer. */
|
||||
refcount: number;
|
||||
readonly refcount: number;
|
||||
|
||||
/** Whether or not the bufffer has been destroyed. */
|
||||
destroyed: boolean;
|
||||
readonly destroyed: boolean;
|
||||
|
||||
/** Create a new buffer backed by the given file path. */
|
||||
static load(filePath: string, params?: BufferLoadOptions): Promise<TextBuffer>;
|
||||
@@ -5068,7 +5104,10 @@ export class TextBuffer {
|
||||
/** Get the text of the last line of the buffer, without its line ending. */
|
||||
getLastLine(): string;
|
||||
|
||||
/** Get the text of the line at the given row, without its line ending. */
|
||||
/**
|
||||
* Get the text of the line at the given 0-indexed row, without its line ending.
|
||||
* @param row A number representing the row.
|
||||
*/
|
||||
lineForRow(row: number): string|undefined;
|
||||
|
||||
/** Get the line ending for the given 0-indexed row. */
|
||||
@@ -5120,10 +5159,18 @@ export class TextBuffer {
|
||||
/** Delete the text in the given range. */
|
||||
delete(range: RangeCompatible): Range;
|
||||
|
||||
/** Delete the line associated with a specified row. */
|
||||
/**
|
||||
* Delete the line associated with a specified 0-indexed row.
|
||||
* @param row A number representing the row to delete.
|
||||
*/
|
||||
deleteRow(row: number): Range;
|
||||
|
||||
/** Delete the lines associated with the specified row range. */
|
||||
/**
|
||||
* Delete the lines associated with the specified 0-indexed row range.
|
||||
*
|
||||
* If the row range is out of bounds, it will be clipped. If the `startRow`
|
||||
* is greater than the `endRow`, they will be reordered.
|
||||
*/
|
||||
deleteRows(startRow: number, endRow: number): Range;
|
||||
|
||||
// Markers
|
||||
@@ -5162,10 +5209,16 @@ export class TextBuffer {
|
||||
getMarkerCount(): number;
|
||||
|
||||
// History
|
||||
/** Undo the last operation. If a transaction is in progress, aborts it. */
|
||||
/**
|
||||
* Undo the last operation. If a transaction is in progress, aborts it.
|
||||
* @return A boolean of whether or not a change was made.
|
||||
*/
|
||||
undo(): boolean;
|
||||
|
||||
/** Redo the last operation. */
|
||||
/**
|
||||
* Redo the last operation.
|
||||
* @return A boolean of whether or not a change was made.
|
||||
*/
|
||||
redo(): boolean;
|
||||
|
||||
/** Batch multiple operations as a single undo/redo step. */
|
||||
@@ -5173,37 +5226,44 @@ export class TextBuffer {
|
||||
transact<T>(fn: () => T): T;
|
||||
|
||||
/**
|
||||
* Call within a transaction to terminate the function's execution and
|
||||
* revert any changes performed up to the abortion.
|
||||
* Abort the currently running transaction.
|
||||
*
|
||||
* Only intended to be called within the `fn` option to `::transact`.
|
||||
*/
|
||||
abortTransaction(): void;
|
||||
|
||||
/**
|
||||
* Clear the undo stack. When calling this method within a transaction,
|
||||
* the ::onDidChangeText event will not be triggered because the information
|
||||
* describing the changes is lost.
|
||||
*/
|
||||
/** Clear the undo stack. */
|
||||
clearUndoStack(): void;
|
||||
|
||||
/**
|
||||
* Create a pointer to the current state of the buffer for use with
|
||||
* ::revertToCheckpoint and ::groupChangesSinceCheckpoint.
|
||||
* `::revertToCheckpoint` and `::groupChangesSinceCheckpoint`.
|
||||
* @return A checkpoint ID value.
|
||||
*/
|
||||
createCheckpoint(): number;
|
||||
|
||||
/**
|
||||
* Revert the buffer to the state it was in when the given checkpoint was created.
|
||||
* Returns a boolean indicating whether the operation succeeded.
|
||||
* @return A boolean indicating whether the operation succeeded.
|
||||
*/
|
||||
revertToCheckpoint(checkpoint: number): boolean;
|
||||
|
||||
/**
|
||||
* Group all changes since the given checkpoint into a single transaction for
|
||||
* purposes of undo/redo.
|
||||
* Returns a boolean indicating whether the operation succeeded.
|
||||
* @return A boolean indicating whether the operation succeeded.
|
||||
*/
|
||||
groupChangesSinceCheckpoint(checkpoint: number): boolean;
|
||||
|
||||
/**
|
||||
* Group the last two text changes for purposes of undo/redo.
|
||||
*
|
||||
* This operation will only succeed if there are two changes on the undo stack.
|
||||
* It will not group past the beginning of an open transaction.
|
||||
* @return A boolean indicating whether the operation succeeded.
|
||||
*/
|
||||
groupLastChanges(): boolean;
|
||||
|
||||
/**
|
||||
* Returns a list of changes since the given checkpoint.
|
||||
* If the given checkpoint is no longer present in the undo history, this method
|
||||
@@ -5293,17 +5353,26 @@ export class TextBuffer {
|
||||
/** Get the maximal position in the buffer, where new text would be appended. */
|
||||
getEndPosition(): Point;
|
||||
|
||||
/** Get the length of the buffer's text. */
|
||||
getLength(): number;
|
||||
|
||||
/** Get the length of the buffer in characters. */
|
||||
getMaxCharacterIndex(): number;
|
||||
|
||||
/** Get the range for the given row. */
|
||||
rangeForRow(row: number, includeNewline: boolean): Range;
|
||||
/**
|
||||
* Get the range for the given row.
|
||||
* @param row A number representing a 0-indexed row.
|
||||
* @param includeNewline A boolean indicating whether or not to include the
|
||||
* newline, which results in a range that extends to the start of the next line.
|
||||
* (default: false)
|
||||
*/
|
||||
rangeForRow(row: number, includeNewline?: boolean): Range;
|
||||
|
||||
/**
|
||||
* Convert a position in the buffer in row/column coordinates to an absolute
|
||||
* character offset, inclusive of line ending characters.
|
||||
*/
|
||||
characterIndexForPosition(position: Point|[number, number]): number;
|
||||
characterIndexForPosition(position: PointCompatible): number;
|
||||
|
||||
/**
|
||||
* Convert an absolute character offset, inclusive of newlines, to a position
|
||||
@@ -5753,7 +5822,7 @@ export interface TextEditorObservedEvent {
|
||||
// information under certain contexts.
|
||||
|
||||
// NOTE: the config schema with these defaults can be found here:
|
||||
// https://github.com/atom/atom/blob/v1.24.0/src/config-schema.js
|
||||
// https://github.com/atom/atom/blob/v1.25.0/src/config-schema.js
|
||||
/**
|
||||
* Allows you to strongly type Atom configuration variables. Additional key:value
|
||||
* pairings merged into this interface will result in configuration values under
|
||||
@@ -6039,6 +6108,59 @@ export interface BuildEnvironmentOptions {
|
||||
enablePersistence?: boolean;
|
||||
}
|
||||
|
||||
export interface ConfirmationOptions {
|
||||
/** The type of the confirmation prompt. */
|
||||
type?: "none"|"info"|"error"|"question"|"warning";
|
||||
|
||||
/** The text for the buttons. */
|
||||
buttons?: ReadonlyArray<string>;
|
||||
|
||||
/** The index for the button to be selected by default in the prompt. */
|
||||
defaultId?: number;
|
||||
|
||||
/** The title for the prompt. */
|
||||
title?: string;
|
||||
|
||||
/** The content of the message box. */
|
||||
message?: string;
|
||||
|
||||
/** Additional information regarding the message. */
|
||||
detail?: string;
|
||||
|
||||
/** If provided, the message box will include a checkbox with the given label. */
|
||||
checkboxLabel?: string;
|
||||
|
||||
/** Initial checked state of the checkbox. false by default. */
|
||||
checkboxChecked?: boolean;
|
||||
|
||||
/** An Electron NativeImage to use as the prompt's icon. */
|
||||
icon?: object;
|
||||
|
||||
/**
|
||||
* The index of the button to be used to cancel the dialog, via the `Esc` key.
|
||||
* By default this is assigned to the first button with "cancel" or "no" as the
|
||||
* label. If no such labeled buttons exist and this option is not set, 0 will be
|
||||
* used as the return value or callback response.
|
||||
*
|
||||
* This option is ignored on Windows.
|
||||
*/
|
||||
cancelId?: number;
|
||||
|
||||
/**
|
||||
* On Windows, Electron will try to figure out which one of the buttons are
|
||||
* common buttons (like `Cancel` or `Yes`), and show the others as command links
|
||||
* in the dialog. This can make the dialog appear in the style of modern Windows
|
||||
* apps. If you don't like this behavior, you can set noLink to true.
|
||||
*/
|
||||
noLink?: boolean;
|
||||
|
||||
/**
|
||||
* Normalize the keyboard access keys across platforms.
|
||||
* Atom defaults this to true.
|
||||
*/
|
||||
normalizeAccessKeys?: boolean;
|
||||
}
|
||||
|
||||
export interface ContextMenuOptions {
|
||||
/** The menu item's label. */
|
||||
label?: string;
|
||||
@@ -6506,6 +6628,10 @@ export interface DisposableLike {
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface JQueryCompatible<Element extends Node = HTMLElement> extends Iterable<Element> {
|
||||
jquery: string;
|
||||
}
|
||||
|
||||
/** The types usable when constructing a point via the Point::fromObject method. */
|
||||
export type PointCompatible = PointLike|[number, number];
|
||||
|
||||
@@ -6753,11 +6879,11 @@ export interface TokenizeLineResult {
|
||||
* jQuery, which is an expensive dependency we want to eliminate.
|
||||
*/
|
||||
export interface Tooltip {
|
||||
options: TooltipOptions;
|
||||
enabled: boolean;
|
||||
timeout: number;
|
||||
hoverState: "in"|"out"|null;
|
||||
element: HTMLElement;
|
||||
readonly options: TooltipOptions;
|
||||
readonly enabled: boolean;
|
||||
readonly timeout: number;
|
||||
readonly hoverState: "in"|"out"|null;
|
||||
readonly element: HTMLElement;
|
||||
|
||||
getTitle(): string;
|
||||
getTooltipElement(): HTMLElement;
|
||||
@@ -6774,11 +6900,11 @@ export interface ViewModel {
|
||||
}
|
||||
|
||||
export interface WindowLoadSettings {
|
||||
appVersion: string;
|
||||
atomHome: string;
|
||||
devMode: boolean;
|
||||
resourcePath: string;
|
||||
safeMode: boolean;
|
||||
env?: { [key: string]: string|undefined };
|
||||
profileStartup?: boolean;
|
||||
readonly appVersion: string;
|
||||
readonly atomHome: string;
|
||||
readonly devMode: boolean;
|
||||
readonly resourcePath: string;
|
||||
readonly safeMode: boolean;
|
||||
readonly env?: { [key: string]: string|undefined };
|
||||
readonly profileStartup?: boolean;
|
||||
}
|
||||
|
||||
@@ -117,6 +117,18 @@ const authOptions : Auth0LockConstructorOptions = {
|
||||
|
||||
new Auth0Lock(CLIENT_ID, DOMAIN, authOptions);
|
||||
|
||||
// test "other" properties
|
||||
|
||||
const otherOptions : Auth0LockConstructorOptions = {
|
||||
clientBaseUrl: "http://www.example.com",
|
||||
configurationBaseUrl: "https://cdn.auth0.com",
|
||||
languageBaseUrl: "http://www.example.com",
|
||||
hashCleanup: false,
|
||||
leeway: 30
|
||||
};
|
||||
|
||||
new Auth0Lock(CLIENT_ID, DOMAIN, otherOptions);
|
||||
|
||||
// test multi-variant example
|
||||
|
||||
const multiVariantOptions : Auth0LockConstructorOptions = {
|
||||
|
||||
Vendored
+6
-1
@@ -119,17 +119,23 @@ interface Auth0LockConstructorOptions {
|
||||
autoclose?: boolean;
|
||||
autofocus?: boolean;
|
||||
avatar?: Auth0LockAvatarOptions;
|
||||
clientBaseUrl?: string;
|
||||
closable?: boolean;
|
||||
configurationBaseUrl?: string;
|
||||
container?: string;
|
||||
defaultADUsernameFromEmailPrefix?: string;
|
||||
defaultDatabaseConnection?: string;
|
||||
defaultEnterpriseConnection?: string;
|
||||
forgotPasswordLink?: string;
|
||||
hashCleanup?: boolean;
|
||||
initialScreen?: "login" | "signUp" | "forgotPassword";
|
||||
language?: string;
|
||||
languageBaseUrl?: string;
|
||||
languageDictionary?: any;
|
||||
leeway?: number;
|
||||
loginAfterSignUp?: boolean;
|
||||
mustAcceptTerms?: boolean;
|
||||
oidcConformant?: boolean;
|
||||
popupOptions?: Auth0LockPopupOptions;
|
||||
prefill?: { email?: string, username?: string};
|
||||
rememberLastLogin?: boolean;
|
||||
@@ -137,7 +143,6 @@ interface Auth0LockConstructorOptions {
|
||||
socialButtonStyle?: "big" | "small";
|
||||
theme?: Auth0LockThemeOptions;
|
||||
usernameStyle?: string;
|
||||
oidcConformant?: boolean;
|
||||
}
|
||||
|
||||
interface Auth0LockFlashMessageOptions {
|
||||
|
||||
@@ -20,5 +20,8 @@ namespace BMapTests {
|
||||
map.addOverlay(marker);
|
||||
marker.setAnimation(BMAP_ANIMATION_BOUNCE);
|
||||
}
|
||||
public create_map(map: BMap.Map, city: string) {
|
||||
map.centerAndZoom(city);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -56,6 +56,7 @@ declare namespace BMap {
|
||||
getZoom(): number
|
||||
getPanorama(): Panorama
|
||||
centerAndZoom(center: Point, zoom: number): void
|
||||
centerAndZoom(city: string): void
|
||||
panTo(center: Point, opts?: PanOptions): void
|
||||
panBy(x: number, y: number, opts?: PanOptions): void
|
||||
reset(): void
|
||||
|
||||
Vendored
+1
-1
@@ -85,7 +85,7 @@ export class ECPair {
|
||||
|
||||
static fromPublicKeyBuffer(buffer: Buffer, network: Network): ECPair;
|
||||
|
||||
static fromWIF(string: string, network: Network): ECPair;
|
||||
static fromWIF(string: string, network?: Network): ECPair;
|
||||
|
||||
static makeRandom(options?: { compressed?: boolean, network?: Network, rng?: Rng }): ECPair;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
// Alert
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#alert").alert();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#alert").alert("close");
|
||||
|
||||
$("#alert").on("close.bs.alert", () => {});
|
||||
@@ -12,20 +14,32 @@ $("#alert").on("close.bs.alert", () => {});
|
||||
// Button
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $("#button").button(); // must fail
|
||||
// $ExpectError
|
||||
$("#button").button();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#button").button("toggle");
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Carousel
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#carousel").carousel();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#carousel").carousel("pause");
|
||||
|
||||
$("#carousel").carousel(100);
|
||||
|
||||
$("#carousel").on("slide.bs.carousel", function(ev) {
|
||||
const that: HTMLElement = this;
|
||||
const from: number = ev.from;
|
||||
const to: number = ev.to;
|
||||
const direction: string = ev.direction;
|
||||
const data: undefined = ev.data;
|
||||
});
|
||||
|
||||
$("#carousel").carousel({
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
@@ -37,20 +51,43 @@ $("#carousel").carousel({
|
||||
pause: false,
|
||||
});
|
||||
|
||||
$("#carousel").on("slide.bs.carousel", function(ev) {
|
||||
const that: HTMLElement = this;
|
||||
const from: number = ev.from;
|
||||
const to: number = ev.to;
|
||||
const direction: string = ev.direction;
|
||||
const data: undefined = ev.data;
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Collapse
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#collapse").collapse();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#collapse").collapse("toggle");
|
||||
|
||||
$("#collapse").on("show.bs.collapse", () => {});
|
||||
|
||||
$("#collapse").collapse({
|
||||
parent: "#parent",
|
||||
toggle: true,
|
||||
});
|
||||
|
||||
$("#collapse").collapse({
|
||||
parent: document.body,
|
||||
});
|
||||
|
||||
$("#collapse").collapse({
|
||||
parent: $("#parent"),
|
||||
});
|
||||
|
||||
$("#collapse").collapse({
|
||||
toggle: false,
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Dropdown
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#dropdown").dropdown();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#dropdown").dropdown("update");
|
||||
|
||||
$("#dropdown").on("hide.bs.dropdown", () => {});
|
||||
@@ -66,7 +103,7 @@ $("#dropdown").dropdown({
|
||||
});
|
||||
|
||||
$("#dropdown").dropdown({
|
||||
offset(offsets: BootstrapOffsetsExtend) {
|
||||
offset(offsets: Bootstrap.OffsetsExtend) {
|
||||
if (!this.flip)
|
||||
return { popper: { left: 100 } };
|
||||
return {};
|
||||
@@ -81,8 +118,10 @@ $("#dropdown").dropdown({
|
||||
// Modal
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#modal").modal();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#modal").modal("show");
|
||||
|
||||
$("#modal").on("hide.bs.modal", () => {});
|
||||
@@ -98,12 +137,90 @@ $("#modal").modal({
|
||||
backdrop: "static",
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Popover
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#popover").popover();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#popover").popover("toggle");
|
||||
|
||||
$("#popover").on("show.bs.popover", () => {});
|
||||
|
||||
$("#popover").popover({});
|
||||
|
||||
$("#popover").popover({
|
||||
animation: false,
|
||||
container: "#container",
|
||||
delay: {show: 500, hide: 100},
|
||||
html: true,
|
||||
placement: "auto",
|
||||
selector: "[rel=\"popover\"]",
|
||||
template: '<div class="popover empty" role="popover"></div>',
|
||||
title: "Hello world",
|
||||
trigger: "hover focus",
|
||||
offset: 10,
|
||||
fallbackPlacement: ["flip", "clockwise"],
|
||||
boundary: "scrollParent",
|
||||
});
|
||||
|
||||
$("#popover").popover({
|
||||
placement(this, popover, trigger) {
|
||||
console.log(this.tip === popover);
|
||||
console.log(this.element === trigger);
|
||||
console.log(this.config.content);
|
||||
return "left";
|
||||
},
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Scrollspy
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#scrollspy").scrollspy();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#scrollspy").scrollspy("refresh");
|
||||
|
||||
$("#scrollspy").on("activate.bs.scrollspy", () => {});
|
||||
|
||||
$("#scrollspy").scrollspy({
|
||||
offset: 100,
|
||||
target: "#navbar-example2",
|
||||
method: "offset",
|
||||
});
|
||||
|
||||
$("#scrollspy").scrollspy({
|
||||
target: document.getElementById("navbar-example2") as HTMLElement
|
||||
});
|
||||
|
||||
$("#scrollspy").scrollspy({
|
||||
method: "position"
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Tab
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#someListItem").tab("show");
|
||||
|
||||
$("a[data-toggle=\"list\"]").on("shown.bs.tab", (e) => {
|
||||
e.target; // newly activated tab
|
||||
e.relatedTarget; // previous active tab
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Tooltip
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#tooltip").tooltip();
|
||||
|
||||
// $ExpectType JQuery<HTMLElement>
|
||||
$("#tooltip").tooltip("show");
|
||||
|
||||
$("#tooltip").on("hide.bs.tooltip", () => {});
|
||||
@@ -149,6 +266,14 @@ $("#tooltip").tooltip({
|
||||
},
|
||||
});
|
||||
|
||||
$("#tooltip").tooltip({
|
||||
placement(this, tooltip, trigger) {
|
||||
// $ExpectError
|
||||
console.log(this.config.content); // only for PopoverOption, not TooltipOption
|
||||
return "left";
|
||||
},
|
||||
});
|
||||
|
||||
$("#tooltip").tooltip({
|
||||
selector: "[rel=\"tooltip\"]",
|
||||
});
|
||||
@@ -176,7 +301,7 @@ $("#tooltip").tooltip({
|
||||
});
|
||||
|
||||
$("#tooltip").tooltip({
|
||||
trigger: "focus hover",
|
||||
trigger: "hover focus",
|
||||
});
|
||||
|
||||
$("#tooltip").tooltip({
|
||||
|
||||
Vendored
+141
-74
@@ -4,45 +4,43 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
// TODO: collapse, tab (list-group, navs), popovers, scrollspy
|
||||
/// <reference types="jquery"/>
|
||||
|
||||
/// <reference types="jquery" />
|
||||
import * as Popper from "popper.js";
|
||||
|
||||
export as namespace Bootstrap;
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Some Types and Interfaces
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
type BootstrapPlacement = "auto" | "top" | "bottom" | "left" | "right";
|
||||
type PopperBehavior = "flip" | "clockwise" | "counterclockwise";
|
||||
export type Placement = "auto" | "top" | "bottom" | "left" | "right";
|
||||
|
||||
interface BootstrapDelay {
|
||||
export type Trigger = "click" | "hover" | "focus" | "manual" |
|
||||
"click hover" | "click focus" | "hover focus" |
|
||||
"click hover focus";
|
||||
|
||||
export interface Delay {
|
||||
show: number;
|
||||
hide: number;
|
||||
}
|
||||
|
||||
interface BootstrapTooltipInstance {
|
||||
config: BootstrapTooltipOption;
|
||||
export interface TooltipInstance<T extends TooltipOption> {
|
||||
config: T;
|
||||
element: Element;
|
||||
tip: HTMLElement;
|
||||
}
|
||||
|
||||
interface BootstrapOffsetExtend {
|
||||
top?: number;
|
||||
left?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
}
|
||||
|
||||
interface BootstrapOffsetsExtend {
|
||||
popper?: BootstrapOffsetExtend;
|
||||
reference?: BootstrapOffsetExtend;
|
||||
export interface OffsetsExtend {
|
||||
popper?: Partial<Popper.Offset>;
|
||||
reference?: Partial<Popper.Offset>;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Options Interfaces
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
interface BootstrapCarouselOption {
|
||||
export interface CarouselOption {
|
||||
/**
|
||||
* The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
|
||||
*
|
||||
@@ -75,14 +73,32 @@ interface BootstrapCarouselOption {
|
||||
wrap?: boolean;
|
||||
}
|
||||
|
||||
interface BootstrapDropdownOption {
|
||||
export interface CollapseOption {
|
||||
/**
|
||||
* If parent is provided, then all collapsible elements under the specified parent will be closed when
|
||||
* this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the card class).
|
||||
* The attribute has to be set on the target collapsible area.
|
||||
*
|
||||
* @default ""
|
||||
*/
|
||||
parent?: string | JQuery | Element;
|
||||
|
||||
/**
|
||||
* Toggles the collapsible element on invocation.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
toggle?: boolean;
|
||||
}
|
||||
|
||||
export interface DropdownOption {
|
||||
/**
|
||||
* Offset of the dropdown relative to its target.
|
||||
* For more information refer to Popper.js's offset docs.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
offset?: number | string | ((this: BootstrapDropdownOption, offset: BootstrapOffsetsExtend) => BootstrapOffsetsExtend);
|
||||
offset?: number | string | ((this: DropdownOption, offset: OffsetsExtend) => OffsetsExtend);
|
||||
|
||||
/**
|
||||
* Allow Dropdown to flip in case of an overlapping on the reference element.
|
||||
@@ -99,10 +115,10 @@ interface BootstrapDropdownOption {
|
||||
*
|
||||
* @default "scrollParent"
|
||||
*/
|
||||
boundary?: "viewport" | "window" | "scrollParent" | HTMLElement;
|
||||
boundary?: Popper.Boundary | HTMLElement;
|
||||
}
|
||||
|
||||
interface BootstrapModalOption {
|
||||
export interface ModalOption {
|
||||
/**
|
||||
* Includes a modal-backdrop element.
|
||||
* Alternatively, specify static for a backdrop which doesn't close the modal on click.
|
||||
@@ -133,36 +149,69 @@ interface BootstrapModalOption {
|
||||
show?: boolean;
|
||||
}
|
||||
|
||||
interface BootstrapTooltipOption {
|
||||
export interface PopoverOption extends TooltipOption {
|
||||
/**
|
||||
* Apply a CSS fade transition to the tooltip.
|
||||
* Default content value if data-content attribute isn't present.
|
||||
* If a function is given, it will be called with its this reference
|
||||
* set to the element that the popover is attached to.
|
||||
*/
|
||||
content?: string | Element | ((this: Element) => string | Element);
|
||||
}
|
||||
|
||||
export interface ScrollspyOption {
|
||||
/**
|
||||
* TODO: https://github.com/twbs/bootstrap/issues/25799
|
||||
*
|
||||
* @default "auto"
|
||||
*/
|
||||
method?: "auto" | "offset" | "position";
|
||||
|
||||
/**
|
||||
* Pixels to offset from top when calculating position of scroll.
|
||||
*
|
||||
* @default 10
|
||||
*/
|
||||
offset?: number;
|
||||
|
||||
/**
|
||||
* A selector of the parent element or the parent element itself
|
||||
* of any Bootstrap `.nav` or `.list-group` component.
|
||||
*
|
||||
* @default ""
|
||||
*/
|
||||
target?: string | Element;
|
||||
}
|
||||
|
||||
export interface TooltipOption {
|
||||
/**
|
||||
* Apply a CSS fade transition to the tooltip or popover.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
animation?: boolean;
|
||||
|
||||
/**
|
||||
* Appends the tooltip to a specific element. Example: `container: 'body'`.
|
||||
* This option is particularly useful in that it allows you to position the tooltip
|
||||
* Appends the tooltip or popover to a specific element. Example: `container: 'body'`.
|
||||
* This option is particularly useful in that it allows you to position the tooltip or popover
|
||||
* in the flow of the document near the triggering element - which will prevent
|
||||
* the tooltip from floating away from the triggering element during a window resize.
|
||||
* it from floating away from the triggering element during a window resize.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
container?: string | Element | false;
|
||||
|
||||
/**
|
||||
* Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type.
|
||||
* Delay showing and hiding the tooltip or popover (ms) - does not apply to manual trigger type.
|
||||
* If a number is supplied, delay is applied to both hide/show.
|
||||
* Object structure is: `delay: { "show": 500, "hide": 100 }`.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
delay?: number | BootstrapDelay;
|
||||
delay?: number | Delay;
|
||||
|
||||
/**
|
||||
* Allow HTML in the tooltip.
|
||||
* If true, HTML tags in the tooltip's title will be rendered in the tooltip.
|
||||
* Allow HTML in the tooltip or popover.
|
||||
* If true, HTML tags will be rendered in the tooltip or popover.
|
||||
* If false, jQuery's text method will be used to insert content into the DOM.
|
||||
* Use text if you're worried about XSS attacks.
|
||||
*
|
||||
@@ -171,18 +220,18 @@ interface BootstrapTooltipOption {
|
||||
html?: boolean;
|
||||
|
||||
/**
|
||||
* How to position the tooltip - auto | top | bottom | left | right.
|
||||
* When auto is specified, it will dynamically reorient the tooltip.
|
||||
* How to position the tooltip or popover - auto | top | bottom | left | right.
|
||||
* When auto is specified, it will dynamically reorient the tooltip or popover.
|
||||
* When a function is used to determine the placement, it is called with
|
||||
* the tooltip DOM node as its first argument and the triggering element DOM node as its second.
|
||||
* The this context is set to the tooltip instance.
|
||||
* the tooltip or popover DOM node as its first argument and the triggering element DOM node as its second.
|
||||
* The this context is set to the tooltip or popover instance.
|
||||
*
|
||||
* @default "top"
|
||||
*/
|
||||
placement?: BootstrapPlacement | ((this: BootstrapTooltipInstance, tooltip: HTMLElement, trigger: Element) => BootstrapPlacement);
|
||||
placement?: Placement | ((this: TooltipInstance<this>, node: HTMLElement, trigger: Element) => Placement);
|
||||
|
||||
/**
|
||||
* If a selector is provided, tooltip objects will be delegated to the specified targets.
|
||||
* If a selector is provided, tooltip or popover objects will be delegated to the specified targets.
|
||||
* In practice, this is used to enable dynamic HTML content to have popovers added.
|
||||
*
|
||||
* @default false
|
||||
@@ -190,41 +239,40 @@ interface BootstrapTooltipOption {
|
||||
selector?: string | false;
|
||||
|
||||
/**
|
||||
* Base HTML to use when creating the tooltip. The tooltip's title will be injected into
|
||||
* the `.tooltip-inner`. The `.arrow` will become the tooltip's arrow.
|
||||
* The outermost wrapper element should have the `.tooltip` class and `role="tooltip"`.
|
||||
* Base HTML to use when creating the tooltip or popover. The tooltip's (resp., popover's) title will be injected into
|
||||
* the `.tooltip-inner` (resp., `.popover-header`). The `.arrow` will become the tooltip's (resp., popover's) arrow.
|
||||
* The outermost wrapper element should have the `.tooltip` (resp., .popover) class and `role="tooltip"`.
|
||||
*
|
||||
* @default '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
||||
* @default '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
|
||||
*/
|
||||
template?: string;
|
||||
|
||||
/**
|
||||
* Default title value if title attribute isn't present.
|
||||
* If a function is given, it will be called with its this reference set to the element
|
||||
* that the tooltip is attached to.
|
||||
* that the tooltip or popover is attached to.
|
||||
*
|
||||
* @default ""
|
||||
*/
|
||||
title?: string | Element | ((this: Element) => string);
|
||||
title?: string | Element | ((this: Element) => string | Element);
|
||||
|
||||
/**
|
||||
* How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.
|
||||
* 'manual' indicates that the tooltip will be triggered programmatically via the .tooltip('show'), .tooltip('hide') and
|
||||
* .tooltip('toggle') methods; this value cannot be combined with any other trigger.
|
||||
* 'hover' on its own will result in tooltips that cannot be triggered via the keyboard, and should only be used if
|
||||
* alternative methods for conveying the same information for keyboard users is present.
|
||||
* How tooltip or popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.
|
||||
* 'manual' indicates that the tooltip will be triggered programmatically; this value cannot be combined with any other trigger.
|
||||
* 'hover' should only be used if alternative methods for conveying the same information for keyboard users is present.
|
||||
*
|
||||
* @default "hover focus"
|
||||
* @default tooltip: "hover focus", popover: "click"
|
||||
*/
|
||||
trigger?: string;
|
||||
trigger?: Trigger;
|
||||
|
||||
/**
|
||||
* Offset of the tooltip relative to its target.
|
||||
* Offset of the tooltip or popover relative to its target.
|
||||
* For more information refer to Popper.js's offset docs.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
offset?: number | string;
|
||||
offset?: number | string;
|
||||
|
||||
/**
|
||||
* Allow to specify which position Popper will use on fallback.
|
||||
@@ -232,24 +280,24 @@ interface BootstrapTooltipOption {
|
||||
*
|
||||
* @default "flip"
|
||||
*/
|
||||
fallbackPlacement?: PopperBehavior | PopperBehavior[];
|
||||
fallbackPlacement?: Popper.Behavior | ReadonlyArray<Popper.Behavior>;
|
||||
|
||||
/**
|
||||
* Overflow constraint boundary of the tooltip.
|
||||
* Overflow constraint boundary of the tooltip or popover.
|
||||
* Accepts the values of 'viewport', 'window', 'scrollParent',
|
||||
* or an HTMLElement reference (JavaScript only).
|
||||
* For more information refer to Popper.js's preventOverflow docs.
|
||||
*
|
||||
* @default "scrollParent"
|
||||
*/
|
||||
boundary?: "viewport" | "window" | "scrollParent" | HTMLElement;
|
||||
boundary?: Popper.Boundary | HTMLElement;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Events
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
interface BootstrapCarouselEventHandler<TElement> extends JQuery.Event<TElement, undefined> {
|
||||
export interface CarouselEventHandler<TElement> extends JQuery.Event<TElement, undefined> {
|
||||
/**
|
||||
* The direction in which the carousel is sliding.
|
||||
*/
|
||||
@@ -266,34 +314,53 @@ interface BootstrapCarouselEventHandler<TElement> extends JQuery.Event<TElement,
|
||||
to: number;
|
||||
}
|
||||
|
||||
type BootstrapAlertEvent = "close.bs.alert" | "closed.bs.alert";
|
||||
type BootstrapCarouselEvent = "slide.bs.carousel" | "slid.bs.carousel";
|
||||
type BootstrapDropdownEvent = "show.bs.dropdown" | "shown.bs.dropdown" | "hide.bs.dropdown" | "hidden.bs.dropdown";
|
||||
type BootstrapModalEvent = "show.bs.modal" | "shown.bs.modal" | "hide.bs.modal" | "hidden.bs.modal";
|
||||
type BootstrapTooltipEvent = "show.bs.tooltip" | "shown.bs.tooltip" | "hide.bs.tooltip" | "hidden.bs.tooltip" | "inserted.bs.tooltip";
|
||||
export type AlertEvent = "close.bs.alert" | "closed.bs.alert";
|
||||
export type CarouselEvent = "slide.bs.carousel" | "slid.bs.carousel";
|
||||
export type CollapseEvent = "show.bs.collapse" | "shown.bs.collapse" | "hide.bs.collapse" | "hidden.bs.collapse";
|
||||
export type DropdownEvent = "show.bs.dropdown" | "shown.bs.dropdown" | "hide.bs.dropdown" | "hidden.bs.dropdown";
|
||||
export type ModalEvent = "show.bs.modal" | "shown.bs.modal" | "hide.bs.modal" | "hidden.bs.modal";
|
||||
export type PopoverEvent = "show.bs.popover" | "shown.bs.popover" | "hide.bs.popover" | "hidden.bs.popover" | "inserted.bs.popover";
|
||||
export type ScrollspyEvent = "activate.bs.scrollspy";
|
||||
export type TapEvent = "show.bs.tab" | "shown.bs.tab" | "hide.bs.tab" | "hidden.bs.tab";
|
||||
export type TooltipEvent = "show.bs.tooltip" | "shown.bs.tooltip" | "hide.bs.tooltip" | "hidden.bs.tooltip" | "inserted.bs.tooltip";
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// jQuery
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement> {
|
||||
alert(action?: "close" | "dispose"): this;
|
||||
declare global {
|
||||
interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement> {
|
||||
alert(action?: "close" | "dispose"): this;
|
||||
|
||||
button(action: "toggle" | "dispose"): this;
|
||||
button(action: "toggle" | "dispose"): this;
|
||||
|
||||
carousel(action: "cycle" | "pause" | number | "prev" | "next" | "dispose"): this;
|
||||
carousel(options?: BootstrapCarouselOption): this;
|
||||
carousel(action: "cycle" | "pause" | number | "prev" | "next" | "dispose"): this;
|
||||
carousel(options?: CarouselOption): this;
|
||||
|
||||
dropdown(action: "toggle" | "update" | "dispose"): this;
|
||||
dropdown(options?: BootstrapDropdownOption): this;
|
||||
collapse(action: "toggle" | "show" | "hide" | "dispose"): this;
|
||||
collapse(options?: CollapseOption): this;
|
||||
|
||||
modal(action: "toggle" | "show" | "hide" | "handleUpdate" | "dispose"): this;
|
||||
modal(options?: BootstrapModalOption): this;
|
||||
dropdown(action: "toggle" | "update" | "dispose"): this;
|
||||
dropdown(options?: DropdownOption): this;
|
||||
|
||||
tooltip(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this;
|
||||
tooltip(options?: BootstrapTooltipOption): this;
|
||||
modal(action: "toggle" | "show" | "hide" | "handleUpdate" | "dispose"): this;
|
||||
modal(options?: ModalOption): this;
|
||||
|
||||
on(events: BootstrapCarouselEvent, handler: JQuery.EventHandlerBase<TElement, BootstrapCarouselEventHandler<TElement>>): this;
|
||||
on(events: BootstrapAlertEvent | BootstrapDropdownEvent | BootstrapModalEvent | BootstrapTooltipEvent,
|
||||
handler: JQuery.EventHandler<TElement>): this;
|
||||
popover(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this;
|
||||
popover(options?: PopoverOption): this;
|
||||
|
||||
scrollspy(action: "refresh" | "dispose"): this;
|
||||
scrollspy(options?: ScrollspyOption): this;
|
||||
|
||||
tab(action: "show" | "dispose"): this;
|
||||
|
||||
tooltip(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this;
|
||||
tooltip(options?: TooltipOption): this;
|
||||
|
||||
on(events: CarouselEvent, handler: JQuery.EventHandlerBase<TElement, CarouselEventHandler<TElement>>): this;
|
||||
on(events:
|
||||
AlertEvent | CollapseEvent | DropdownEvent | ModalEvent |
|
||||
PopoverEvent | ScrollspyEvent | TapEvent | TooltipEvent,
|
||||
handler: JQuery.EventHandler<TElement>): this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"popper.js": "^1.14.1"
|
||||
}
|
||||
}
|
||||
Vendored
+33
-4
@@ -167,6 +167,11 @@ declare namespace Bull {
|
||||
* End date when the repeat job should stop repeating
|
||||
*/
|
||||
endDate?: Date | string | number;
|
||||
|
||||
/**
|
||||
* Number of times the job should repeat at max.
|
||||
*/
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
interface JobOptions {
|
||||
@@ -273,18 +278,30 @@ declare namespace Bull {
|
||||
*
|
||||
* The callback is called everytime a job is placed in the queue.
|
||||
* It is passed an instance of the job as first argument.
|
||||
* The callback can also be defined as the string path to a module
|
||||
* exporting the callback function. Using a path has several advantages:
|
||||
* - The process is sandboxed so if it crashes it does not affect the worker.
|
||||
* - You can run blocking code without affecting the queue (jobs will not stall).
|
||||
* - Much better utilization of multi-core CPUs.
|
||||
* - Less connections to redis.
|
||||
*
|
||||
* A promise must be returned to signal job completion.
|
||||
* If the promise is rejected, the error will be passed as a second argument to the "failed" event.
|
||||
* If it is resolved, its value will be the "completed" event's second argument.
|
||||
*/
|
||||
process(callback: (job: Job) => void): Promise<any>;
|
||||
process(callback: ((job: Job) => void) | string): Promise<any>;
|
||||
|
||||
/**
|
||||
* Defines a processing function for the jobs placed into a given Queue.
|
||||
*
|
||||
* The callback is called everytime a job is placed in the queue.
|
||||
* It is passed an instance of the job as first argument.
|
||||
* The callback can also be defined as the string path to a module
|
||||
* exporting the callback function. Using a path has several advantages:
|
||||
* - The process is sandboxed so if it crashes it does not affect the worker.
|
||||
* - You can run blocking code without affecting the queue (jobs will not stall).
|
||||
* - Much better utilization of multi-core CPUs.
|
||||
* - Less connections to redis.
|
||||
*
|
||||
* A promise must be returned to signal job completion.
|
||||
* If the promise is rejected, the error will be passed as a second argument to the "failed" event.
|
||||
@@ -292,7 +309,7 @@ declare namespace Bull {
|
||||
*
|
||||
* @param concurrency Bull will then call you handler in parallel respecting this max number.
|
||||
*/
|
||||
process(concurrency: number, callback: (job: Job) => void): Promise<any>;
|
||||
process(concurrency: number, callback: ((job: Job) => void) | string): Promise<any>;
|
||||
|
||||
/**
|
||||
* Defines a processing function for the jobs placed into a given Queue.
|
||||
@@ -314,6 +331,12 @@ declare namespace Bull {
|
||||
*
|
||||
* The callback is called everytime a job is placed in the queue.
|
||||
* It is passed an instance of the job as first argument.
|
||||
* The callback can also be defined as the string path to a module
|
||||
* exporting the callback function. Using a path has several advantages:
|
||||
* - The process is sandboxed so if it crashes it does not affect the worker.
|
||||
* - You can run blocking code without affecting the queue (jobs will not stall).
|
||||
* - Much better utilization of multi-core CPUs.
|
||||
* - Less connections to redis.
|
||||
*
|
||||
* A promise must be returned to signal job completion.
|
||||
* If the promise is rejected, the error will be passed as a second argument to the "failed" event.
|
||||
@@ -322,7 +345,7 @@ declare namespace Bull {
|
||||
* @param name Bull will only call the handler if the job name matches
|
||||
*/
|
||||
// tslint:disable-next-line:unified-signatures
|
||||
process(name: string, callback: (job: Job) => void): Promise<any>;
|
||||
process(name: string, callback: ((job: Job) => void) | string): Promise<any>;
|
||||
|
||||
/**
|
||||
* Defines a processing function for the jobs placed into a given Queue.
|
||||
@@ -345,6 +368,12 @@ declare namespace Bull {
|
||||
*
|
||||
* The callback is called everytime a job is placed in the queue.
|
||||
* It is passed an instance of the job as first argument.
|
||||
* The callback can also be defined as the string path to a module
|
||||
* exporting the callback function. Using a path has several advantages:
|
||||
* - The process is sandboxed so if it crashes it does not affect the worker.
|
||||
* - You can run blocking code without affecting the queue (jobs will not stall).
|
||||
* - Much better utilization of multi-core CPUs.
|
||||
* - Less connections to redis.
|
||||
*
|
||||
* A promise must be returned to signal job completion.
|
||||
* If the promise is rejected, the error will be passed as a second argument to the "failed" event.
|
||||
@@ -353,7 +382,7 @@ declare namespace Bull {
|
||||
* @param name Bull will only call the handler if the job name matches
|
||||
* @param concurrency Bull will then call you handler in parallel respecting this max number.
|
||||
*/
|
||||
process(name: string, concurrency: number, callback: (job: Job) => void): Promise<any>;
|
||||
process(name: string, concurrency: number, callback: ((job: Job) => void) | string): Promise<any>;
|
||||
|
||||
/**
|
||||
* Defines a processing function for the jobs placed into a given Queue.
|
||||
|
||||
Vendored
+1
-1
@@ -5041,7 +5041,7 @@ declare namespace chrome.runtime {
|
||||
|
||||
export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> {}
|
||||
|
||||
export interface PortMessageEvent extends chrome.events.Event<(message: Object, port: Port) => void> {}
|
||||
export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> {}
|
||||
|
||||
export interface ExtensionMessageEvent extends chrome.events.Event<(message: any, sender: MessageSender, sendResponse: (response: any) => void) => void> {}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import express = require('express');
|
||||
import compress = require('compression');
|
||||
|
||||
@@ -7,3 +6,15 @@ app.use(compress());
|
||||
app.use(compress({
|
||||
threshold: 512
|
||||
}));
|
||||
app.use(compress({
|
||||
threshold: 512,
|
||||
filter: (req, res) => {
|
||||
if (req.headers['x-no-compression']) {
|
||||
// don't compress responses with this request header
|
||||
return false;
|
||||
}
|
||||
|
||||
// fallback to standard filter function
|
||||
return compress.filter(req, res);
|
||||
}
|
||||
}));
|
||||
Vendored
+17
-5
@@ -1,13 +1,26 @@
|
||||
// Type definitions for compression
|
||||
// Project: https://github.com/expressjs/compression
|
||||
// Definitions by: Santi Albo <https://github.com/santialbo>
|
||||
// Rob van der Burgt <https://github.com/rburgt>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import * as express from 'express';
|
||||
|
||||
declare function e(options?: e.CompressionOptions): express.RequestHandler;
|
||||
|
||||
declare namespace e {
|
||||
interface CompressionOptions {
|
||||
/**
|
||||
* Default filter, used for extending filter given in CompressionOptions
|
||||
* See https://github.com/expressjs/compression#filter-1 regarding the usage
|
||||
*/
|
||||
export function filter(req: express.Request, res: express.Response): boolean;
|
||||
|
||||
interface CompressionFilter {
|
||||
(req: express.Request, res: express.Response): boolean;
|
||||
}
|
||||
|
||||
interface CompressionOptions {
|
||||
/**
|
||||
* See https://github.com/expressjs/compression#chunksize regarding the usage.
|
||||
*/
|
||||
@@ -31,7 +44,7 @@ declare namespace e {
|
||||
/**
|
||||
* See https://github.com/expressjs/compression#threshold regarding the usage.
|
||||
*/
|
||||
threshold?: number|string;
|
||||
threshold?: number | string;
|
||||
|
||||
/**
|
||||
* See https://github.com/expressjs/compression#windowbits regarding the usage.
|
||||
@@ -41,8 +54,8 @@ declare namespace e {
|
||||
/**
|
||||
* See https://github.com/expressjs/compression#filter regarding the usage.
|
||||
*/
|
||||
filter?: Function;
|
||||
|
||||
filter?: CompressionFilter;
|
||||
|
||||
/**
|
||||
* See https://nodejs.org/api/zlib.html#zlib_class_options regarding the usage.
|
||||
*/
|
||||
@@ -55,5 +68,4 @@ declare namespace e {
|
||||
}
|
||||
}
|
||||
|
||||
declare function e(options?: e.CompressionOptions): express.RequestHandler;
|
||||
export = e;
|
||||
|
||||
@@ -113,7 +113,11 @@ interface CustomDatum {
|
||||
|
||||
// Get contour generator -------------------------------------------------------
|
||||
|
||||
const contDensDefault: d3Contour.ContourDensity<[number, number]> = d3Contour.contourDensity();
|
||||
// test generic parameter defaults for ContourDensity and contourDensity
|
||||
const contDensDefault: d3Contour.ContourDensity = d3Contour.contourDensity();
|
||||
// tslint:disable-next-line: use-default-type-parameter
|
||||
const contDensDefaultCopy: d3Contour.ContourDensity<[number, number]> = contDensDefault;
|
||||
// test with explicit generic parameter
|
||||
let contDensCustom: d3Contour.ContourDensity<CustomDatum> = d3Contour.contourDensity<CustomDatum>();
|
||||
|
||||
// Configure contour generator =================================================
|
||||
|
||||
Vendored
+10
-11
@@ -120,8 +120,13 @@ export function contours(): Contours;
|
||||
|
||||
/**
|
||||
* A contour generator for density estimates.
|
||||
*
|
||||
* The generic refers to the data type of an element in the data array
|
||||
* used with the density contour generator. If omitted, the default setting assumes that,
|
||||
* the elements of the data array used with the density contour generator are two-element arrays.
|
||||
* The first element corresponds to the x-dimension, the second to the y-dimension.
|
||||
*/
|
||||
export interface ContourDensity<Datum> {
|
||||
export interface ContourDensity<Datum = [number, number]> {
|
||||
/**
|
||||
* Estimates the density contours for the given array of data, returning an array of GeoJSON MultiPolygon geometry objects.
|
||||
* Each geometry object represents the area where the estimated number of points per square pixel is greater than or equal to
|
||||
@@ -238,21 +243,15 @@ export interface ContourDensity<Datum> {
|
||||
bandwidth(bandwidth: number): this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new contour generator for density estimates with the default settings.
|
||||
*
|
||||
* The default settings assume that, the elements of the data array used
|
||||
* with the density contour generator are two-element arrays. The first element
|
||||
* corresponds to the x-dimension, the second to the y-dimension.
|
||||
*/
|
||||
export function contourDensity(): ContourDensity<[number, number]>;
|
||||
/**
|
||||
* Construct a new contour generator for density estimates.
|
||||
*
|
||||
* The generic refers to the data type of an element in the data array
|
||||
* used with the density contour generator.
|
||||
* used with the density contour generator. If omitted, the default setting assumes that,
|
||||
* the elements of the data array used with the density contour generator are two-element arrays.
|
||||
* The first element corresponds to the x-dimension, the second to the y-dimension.
|
||||
*
|
||||
* Important: ensure that the x- and y-accessor functions are configured to
|
||||
* match the data type used for the generic Datum.
|
||||
*/
|
||||
export function contourDensity<Datum>(): ContourDensity<Datum>;
|
||||
export function contourDensity<Datum = [number, number]>(): ContourDensity<Datum>;
|
||||
|
||||
Vendored
+4
-2
@@ -1,9 +1,10 @@
|
||||
// Type definitions for deepmerge 1.3
|
||||
// Type definitions for deepmerge 2.1
|
||||
// Project: https://github.com/KyleAMathews/deepmerge
|
||||
// Definitions by: marvinscharle <https://github.com/marvinscharle>
|
||||
// syy1125 <https://github.com/syy1125>
|
||||
// AppLover69 <https://github.com/AppLover69>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
export = deepmerge;
|
||||
|
||||
@@ -14,6 +15,7 @@ declare namespace deepmerge {
|
||||
interface Options {
|
||||
clone?: boolean;
|
||||
arrayMerge?(destination: any[], source: any[], options?: Options): any[];
|
||||
isMergeableObject?(value: object): boolean;
|
||||
}
|
||||
|
||||
function all<T>(objects: Array<Partial<T>>, options?: Options): T;
|
||||
|
||||
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
/*!
|
||||
* Dynamsoft WebTwain PDF Addon
|
||||
* Product: Dynamsoft Web Twain
|
||||
* Web Site: http://www.dynamsoft.com
|
||||
*
|
||||
* Copyright 2018, Dynamsoft Corporation
|
||||
* Author: Dynamsoft Support Team
|
||||
* Version: 13.4
|
||||
*/
|
||||
|
||||
declare enum EnumDWT_ConverMode {
|
||||
CM_DEFAULT = 0,
|
||||
TWPT_CM_RENDERALLGRAY = 1
|
||||
}
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
interface PDF {
|
||||
/**
|
||||
* Download and install pdf rasterizer add-on on the local system.
|
||||
* @method Dynamsoft.WebTwain#Download
|
||||
* @param {string} remoteFile specifies the value of which frame to get.
|
||||
* @param {function} optionalAsyncSuccessFunc optional.
|
||||
* The function to call when the download succeeds. Please refer to the function prototype OnSuccess.
|
||||
* @param {function} optionalAsyncFailureFunc optional.
|
||||
* The function to call when the download fails. Please refer to the function prototype OnFailure.
|
||||
* @return {bool}
|
||||
*/
|
||||
Download(remoteFile: string,
|
||||
optionalAsyncSuccessFunc?: () => void,
|
||||
optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean;
|
||||
|
||||
/**
|
||||
* Input the password to decrypt PDF files using PDF Rasterizer add-on.
|
||||
* @method Dynamsoft.WebTwain#SetPassword
|
||||
* @param {string} password Specifies the PDF password.
|
||||
* @return {bool}
|
||||
*/
|
||||
SetPassword(password: string): boolean;
|
||||
|
||||
/**
|
||||
* Set the image convert mode for PDF Rasterizer in Dynamic Web TWAIN.
|
||||
* @method Dynamsoft.WebTwain#SetConvertMode
|
||||
* @param {EnumDWT_ConverMode} convertMode Specifies the image convert mode.
|
||||
* @return {bool}
|
||||
*/
|
||||
SetConvertMode(convertMode: EnumDWT_ConverMode): boolean;
|
||||
|
||||
/**
|
||||
* Set the output resolution for the PDF Rasterizer in Dynamic Web TWAIN.
|
||||
* @method Dynamsoft.WebTwain#ReadRect
|
||||
* @param {float} fResolution Specifies the resolution for convert image from PDF file.
|
||||
* @return {bool}
|
||||
*/
|
||||
SetResolution(fResolution: number): boolean;
|
||||
|
||||
/**
|
||||
* Judges whether the local PDF is text-based or not.
|
||||
* @method Dynamsoft.WebTwain#ReadRect
|
||||
* @param {string} localFile specifies the local path of the target PDF.
|
||||
* @return {bool}
|
||||
*/
|
||||
IsTextBasedPDF(localFile: string): boolean;
|
||||
}
|
||||
|
||||
interface WebTwainAddon {
|
||||
PDF: PDF;
|
||||
}
|
||||
|
||||
interface WebTwain {
|
||||
Addon: WebTwainAddon;
|
||||
}
|
||||
@@ -103,8 +103,8 @@ function downloadImage() {
|
||||
function loadPDF() {
|
||||
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
|
||||
if (DWObject) {
|
||||
DWObject.Addon.PDF.SetResolution(200);
|
||||
DWObject.Addon.PDF.SetConvertMode(1);
|
||||
DWObject.Addon.PDF.SetResolution(200);
|
||||
DWObject.Addon.PDF.SetConvertMode(1);
|
||||
DWObject.IfShowFileDialog = true;
|
||||
DWObject.LoadImageEx(" ", 5);
|
||||
}
|
||||
|
||||
Vendored
+4
-70
@@ -1,7 +1,8 @@
|
||||
// Type definitions for dwt 13.3
|
||||
// Type definitions for dwt 13.4
|
||||
// Project: http://www.dynamsoft.com/Products/WebTWAIN_Overview.aspx
|
||||
// Definitions by: Xiao Ling <https://github.com/yushulx>
|
||||
// Josh Hall <https://github.com/jbh>
|
||||
// Lincoln Hu <https://github.com/lincoln2018>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -10,68 +11,11 @@
|
||||
* Product: Dynamsoft Web Twain
|
||||
* Web Site: http://www.dynamsoft.com
|
||||
*
|
||||
* Copyright 2017, Dynamsoft Corporation
|
||||
* Copyright 2018, Dynamsoft Corporation
|
||||
* Author: Dynamsoft Support Team
|
||||
* Version: 13.3
|
||||
* Version: 13.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dynamsoft WebTwain Addon PDF
|
||||
*/
|
||||
declare enum EnumDWT_ConverMode {
|
||||
CM_DEFAULT = 0,
|
||||
TWPT_CM_RENDERALLGRAY = 1
|
||||
}
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
interface PDF {
|
||||
/**
|
||||
* Download and install pdf rasterizer add-on on the local system.
|
||||
* @method Dynamsoft.WebTwain#Download
|
||||
* @param {string} remoteFile specifies the value of which frame to get.
|
||||
* @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess.
|
||||
* @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure.
|
||||
* @return {bool}
|
||||
*/
|
||||
Download(remoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean;
|
||||
|
||||
/**
|
||||
* Input the password to decrypt PDF files using PDF Rasterizer add-on.
|
||||
* @method Dynamsoft.WebTwain#SetPassword
|
||||
* @param {string} password Specifies the PDF password.
|
||||
* @return {bool}
|
||||
*/
|
||||
SetPassword(password: string): boolean;
|
||||
|
||||
/**
|
||||
* Set the image convert mode for PDF Rasterizer in Dynamic Web TWAIN.
|
||||
* @method Dynamsoft.WebTwain#SetConvertMode
|
||||
* @param {EnumDWT_ConverMode} convertMode Specifies the image convert mode.
|
||||
* @return {bool}
|
||||
*/
|
||||
SetConvertMode(convertMode: EnumDWT_ConverMode): boolean;
|
||||
|
||||
/**
|
||||
* Set the output resolution for the PDF Rasterizer in Dynamic Web TWAIN.
|
||||
* @method Dynamsoft.WebTwain#ReadRect
|
||||
* @param {float} fResolution Specifies the resolution for convert image from PDF file.
|
||||
* @return {bool}
|
||||
*/
|
||||
SetResolution(fResolution: number): boolean;
|
||||
|
||||
/**
|
||||
* Judges whether the local PDF is text-based or not.
|
||||
* @method Dynamsoft.WebTwain#ReadRect
|
||||
* @param {string} localFile specifies the local path of the target PDF.
|
||||
* @return {bool}
|
||||
*/
|
||||
IsTextBasedPDF(localFile: string): boolean;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @namespace Dynamsoft
|
||||
*/
|
||||
@@ -1318,21 +1262,11 @@ interface Container {
|
||||
Height: string | number;
|
||||
}
|
||||
|
||||
interface WebTwainAddon {
|
||||
PDF: PDF;
|
||||
}
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
// properties (get/set) / sync functions
|
||||
interface WebTwain {
|
||||
/**
|
||||
* Returns addon.
|
||||
* @type {WebTwainAddon}
|
||||
*/
|
||||
Addon: WebTwainAddon;
|
||||
|
||||
/**
|
||||
* Returns or sets whether multi-page selection is supported.
|
||||
* @type {bool}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"addon.pdf.d.ts",
|
||||
"dwt-tests.ts"
|
||||
]
|
||||
}
|
||||
Vendored
+2
-1
@@ -1,6 +1,7 @@
|
||||
// Type definitions for dynogels 8.0
|
||||
// Project: https://github.com/clarkie/dynogels#readme
|
||||
// Definitions by: Spartan Labs <https://github.com/SpartanLabs>
|
||||
// Ramon de Klein <https://github.com/ramondeklein>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
@@ -76,7 +77,7 @@ export interface Model {
|
||||
getItems(items: string[] | Array<{ [key: string]: string }>, options: GetItemOptions, callback: (err: Error, items: any[]) => void): void;
|
||||
batchGetItems(items: string[] | Array<{ [key: string]: string }>, callback: (err: Error, items: any[]) => void): void;
|
||||
batchGetItems(items: string[] | Array<{ [key: string]: string }>, options: GetItemOptions, callback: (err: Error, items: any[]) => void): void;
|
||||
createTable(options: { [key: string]: CreateTablesOptions } | DynogelsGlobalOptions, callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void;
|
||||
createTable(options: CreateTablesOptions, callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void;
|
||||
createTable(callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void;
|
||||
updateTable(throughput: Throughput, callback: (err: Error, data: AWS.DynamoDB.UpdateTableOutput) => void): void;
|
||||
updateTable(callback: (err: Error, data: AWS.DynamoDB.UpdateTableOutput) => void): void;
|
||||
|
||||
Vendored
+4
-1
@@ -23,6 +23,9 @@ declare module 'ember-data' {
|
||||
type AttributesFor<Model> = keyof Model; // TODO: filter to attr properties only (TS 2.8)
|
||||
type RelationshipsFor<Model> = keyof Model; // TODO: filter to hasMany/belongsTo properties only (TS 2.8)
|
||||
|
||||
export interface ChangedAttributes {
|
||||
[key: string]: [any, any] | undefined;
|
||||
}
|
||||
interface AttributeMeta<Model extends DS.Model> {
|
||||
type: keyof TransformRegistry;
|
||||
options: object;
|
||||
@@ -500,7 +503,7 @@ declare module 'ember-data' {
|
||||
* Returns an object, whose keys are changed properties, and value is
|
||||
* an [oldProp, newProp] array.
|
||||
*/
|
||||
changedAttributes(): {};
|
||||
changedAttributes(): ChangedAttributes;
|
||||
/**
|
||||
* If the model `hasDirtyAttributes` this function will discard any unsaved
|
||||
* changes. If the model `isNew` it will be removed from the store.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import DS, { ChangedAttributes } from 'ember-data';
|
||||
import { assertType } from "./lib/assert";
|
||||
|
||||
const Person = DS.Model.extend({
|
||||
@@ -30,3 +30,7 @@ assertType<Date>(user.get('createdAt'));
|
||||
|
||||
user.serialize();
|
||||
user.serialize({ includeId: true });
|
||||
user.serialize({ includeId: true });
|
||||
|
||||
const attributes = user.changedAttributes();
|
||||
assertType<ChangedAttributes>(attributes);
|
||||
|
||||
Vendored
+5
@@ -2078,6 +2078,7 @@ declare module 'ember' {
|
||||
* Transition the application into another route. The route may
|
||||
* be either a single route or route path:
|
||||
*/
|
||||
transitionTo(name: string, options?: {}): Transition;
|
||||
transitionTo(name: string, ...models: any[]): Transition;
|
||||
transitionTo(name: string, options: {}): Transition;
|
||||
}
|
||||
@@ -3305,6 +3306,7 @@ declare module 'ember' {
|
||||
* @param options optional hash with a queryParams property containing a
|
||||
* mapping of query parameters
|
||||
*/
|
||||
isActive(routeName: string, options?: { queryParams: object }): boolean;
|
||||
isActive(routeName: string, models: RouteModel, options?: { queryParams: object }): boolean;
|
||||
isActive(routeName: string, modelsA: RouteModel, modelsB: RouteModel, options?: { queryParams: object }): boolean;
|
||||
isActive(routeName: string, modelsA: RouteModel, modelsB: RouteModel, modelsC: RouteModel, options?: { queryParams: object }): boolean;
|
||||
@@ -3322,6 +3324,7 @@ declare module 'ember' {
|
||||
* containing a mapping of query parameters
|
||||
* @returns the Transition object associated with this attempted transition
|
||||
*/
|
||||
replaceWith(routeNameOrUrl: string, options?: { queryParams: object }): Ember.Transition;
|
||||
replaceWith(routeNameOrUrl: string, models: RouteModel, options?: { queryParams: object }): Ember.Transition;
|
||||
replaceWith(routeNameOrUrl: string, modelsA: RouteModel, modelsB: RouteModel, options?: { queryParams: object }): Ember.Transition;
|
||||
replaceWith(routeNameOrUrl: string, modelsA: RouteModel, modelsB: RouteModel, modelsC: RouteModel, options?: { queryParams: object }): Ember.Transition;
|
||||
@@ -3339,6 +3342,7 @@ declare module 'ember' {
|
||||
* containing a mapping of query parameters
|
||||
* @returns the Transition object associated with this attempted transition
|
||||
*/
|
||||
transitionTo(routeNameOrUrl: string, options?: { queryParam: object }): Ember.Transition;
|
||||
transitionTo(routeNameOrUrl: string, models: RouteModel, options?: { queryParams: object }): Ember.Transition;
|
||||
transitionTo(routeNameOrUrl: string, modelsA: RouteModel, modelsB: RouteModel, options?: { queryParams: object }): Ember.Transition;
|
||||
transitionTo(routeNameOrUrl: string, modelsA: RouteModel, modelsB: RouteModel, modelsC: RouteModel, options?: { queryParams: object }): Ember.Transition;
|
||||
@@ -3355,6 +3359,7 @@ declare module 'ember' {
|
||||
* a mapping of query parameters
|
||||
* @returns the string representing the generated URL
|
||||
*/
|
||||
urlFor(routeName: string, options?: { queryParams: object }): string;
|
||||
urlFor(routeName: string, models: RouteModel, options?: { queryParams: object }): string;
|
||||
urlFor(routeName: string, modelsA: RouteModel, modelsB: RouteModel, options?: { queryParams: object }): string;
|
||||
urlFor(routeName: string, modelsA: RouteModel, modelsB: RouteModel, modelsC: RouteModel, options?: { queryParams: object }): string;
|
||||
|
||||
@@ -22,3 +22,21 @@ AppRouter.map(function() {
|
||||
this.mount('my-engine');
|
||||
this.mount('my-engine', { as: 'some-other-engine', path: '/some-other-engine'});
|
||||
});
|
||||
|
||||
const RouterServiceConsumer = Ember.Service.extend({
|
||||
router: Ember.inject.service('router'),
|
||||
transitionWithoutModel() {
|
||||
Ember.get(this, 'router')
|
||||
.transitionTo('some-route');
|
||||
},
|
||||
transitionWithModel() {
|
||||
const model = Ember.Object.create();
|
||||
Ember.get(this, 'router')
|
||||
.transitionTo('some.other.route', model);
|
||||
},
|
||||
transitionWithModelAndOptions() {
|
||||
const model = Ember.Object.create();
|
||||
Ember.get(this, 'router')
|
||||
.transitionTo('index', model, { queryParams: { search: 'ember' }});
|
||||
}
|
||||
});
|
||||
|
||||
Vendored
+38
-10
@@ -1,4 +1,4 @@
|
||||
// Type definitions for event-kit 2.x
|
||||
// Type definitions for event-kit 2.4
|
||||
// Project: https://github.com/atom/event-kit
|
||||
// Definitions by: GlenCFL <https://github.com/GlenCFL>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -69,7 +69,8 @@ export class CompositeDisposable implements DisposableLike {
|
||||
* for handlers registered via ::on to be invoked with calls to ::emit.
|
||||
*/
|
||||
// tslint:disable-next-line:no-any
|
||||
export class Emitter<Emissions = { [key: string]: any }> implements DisposableLike {
|
||||
export class Emitter<OptionalEmissions = { [key: string]: any }, RequiredEmissions = {}>
|
||||
implements DisposableLike {
|
||||
disposed: boolean;
|
||||
|
||||
/** Construct an emitter. */
|
||||
@@ -83,31 +84,58 @@ export class Emitter<Emissions = { [key: string]: any }> implements DisposableLi
|
||||
|
||||
// Event Subscription
|
||||
/** Registers a handler to be invoked whenever the given event is emitted. */
|
||||
on<T extends keyof Emissions>(eventName: T, handler: (value?: Emissions[T]) => void):
|
||||
Disposable;
|
||||
on<T extends keyof OptionalEmissions>(eventName: T, handler: (value?:
|
||||
OptionalEmissions[T]) => void): Disposable;
|
||||
/** Registers a handler to be invoked whenever the given event is emitted. */
|
||||
on<T extends keyof RequiredEmissions>(eventName: T, handler: (value:
|
||||
RequiredEmissions[T]) => void): Disposable;
|
||||
|
||||
/**
|
||||
* Register the given handler function to be invoked the next time an event
|
||||
* with the given name is emitted via ::emit.
|
||||
*/
|
||||
once<T extends keyof Emissions>(eventName: T, handler: (value?: Emissions[T]) => void):
|
||||
Disposable;
|
||||
once<T extends keyof OptionalEmissions>(eventName: T, handler: (value?:
|
||||
OptionalEmissions[T]) => void): Disposable;
|
||||
/**
|
||||
* Register the given handler function to be invoked the next time an event
|
||||
* with the given name is emitted via ::emit.
|
||||
*/
|
||||
once<T extends keyof RequiredEmissions>(eventName: T, handler: (value:
|
||||
RequiredEmissions[T]) => void): Disposable;
|
||||
|
||||
/**
|
||||
* Register the given handler function to be invoked before all other
|
||||
* handlers existing at the time of subscription whenever events by the
|
||||
* given name are emitted via ::emit.
|
||||
*/
|
||||
preempt<T extends keyof Emissions>(eventName: T, handler: (value?: Emissions[T]) => void):
|
||||
Disposable;
|
||||
preempt<T extends keyof OptionalEmissions>(eventName: T, handler: (value?:
|
||||
OptionalEmissions[T]) => void): Disposable;
|
||||
/**
|
||||
* Register the given handler function to be invoked before all other
|
||||
* handlers existing at the time of subscription whenever events by the
|
||||
* given name are emitted via ::emit.
|
||||
*/
|
||||
preempt<T extends keyof RequiredEmissions>(eventName: T, handler: (value:
|
||||
RequiredEmissions[T]) => void): Disposable;
|
||||
|
||||
// Event Emission
|
||||
/** Invoke the handlers registered via ::on for the given event name. */
|
||||
emit<T extends keyof Emissions>(eventName: T, value?: Emissions[T]): void;
|
||||
emit<T extends keyof OptionalEmissions>(eventName: T, value?:
|
||||
OptionalEmissions[T]): void;
|
||||
/** Invoke the handlers registered via ::on for the given event name. */
|
||||
emit<T extends keyof RequiredEmissions>(eventName: T, value:
|
||||
RequiredEmissions[T]): void;
|
||||
|
||||
/**
|
||||
* Asynchronously invoke the handlers registered via ::on for the given event name.
|
||||
* @return A promise that will be fulfilled once all handlers have been invoked.
|
||||
*/
|
||||
emitAsync<T extends keyof Emissions>(eventName: T, value?: Emissions[T]): Promise<void>;
|
||||
emitAsync<T extends keyof OptionalEmissions>(eventName: T, value?:
|
||||
OptionalEmissions[T]): Promise<void>;
|
||||
/**
|
||||
* Asynchronously invoke the handlers registered via ::on for the given event name.
|
||||
* @return A promise that will be fulfilled once all handlers have been invoked.
|
||||
*/
|
||||
emitAsync<T extends keyof RequiredEmissions>(eventName: T, value:
|
||||
RequiredEmissions[T]): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import * as DataFormatter from "excel-style-dataformatter";
|
||||
import * as enLocales from "excel-style-dataformatter/lib/locales/en-US";
|
||||
import * as ruLocales from "excel-style-dataformatter/lib/locales/ru";
|
||||
|
||||
const localesOptions: DataFormatter.LocalesOptions = {
|
||||
name: "test",
|
||||
months: ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'],
|
||||
monthsShort: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'],
|
||||
days: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'],
|
||||
daysShort: ['su', 'mo', 'tu', 'we', 'th', 'fr', 'sa'],
|
||||
thousandSeparator: ',',
|
||||
decimalSeparator: '.',
|
||||
formats: {
|
||||
'Test format 1': '#.#',
|
||||
'Test format 2': '$ #,##0.00;[Red]$ -#,##0.00',
|
||||
}
|
||||
};
|
||||
const formatterOptions: DataFormatter.FormatterOptions = {
|
||||
debug: true,
|
||||
UTCOffset: 100,
|
||||
locale: "test",
|
||||
transformCode: (code: string): string => {
|
||||
return code + "string";
|
||||
},
|
||||
locales: [localesOptions, ruLocales]
|
||||
};
|
||||
const dataFormatter1 = new DataFormatter(formatterOptions);
|
||||
const dataFormatter2 = new DataFormatter();
|
||||
dataFormatter2.defineLocales([enLocales, ruLocales]);
|
||||
dataFormatter2.setLocale("ru");
|
||||
dataFormatter2.setUTCOffset(null);
|
||||
dataFormatter2.setUTCOffset(100);
|
||||
const result: DataFormatter.FormatResult = dataFormatter2.format("testValue", "testType", "testFormat");
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// Type definitions for excel-style-dataformatter 2.0
|
||||
// Project: https://github.com/fakundo/Excel-Style-Javascript-DataFormatter
|
||||
// Definitions by: SanderDeWaal1992 <https://github.com/SanderDeWaal1992>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare class DataFormatter {
|
||||
constructor(options?: DataFormatter.FormatterOptions);
|
||||
|
||||
/**
|
||||
* Format a value
|
||||
* @param value
|
||||
* @param type value type
|
||||
* @param format format preset
|
||||
*/
|
||||
format(value: any, type: string, format: string): DataFormatter.FormatResult;
|
||||
/**
|
||||
* Defines locales
|
||||
* @param locales
|
||||
*/
|
||||
defineLocales(locales: DataFormatter.LocalesOptions[]): void;
|
||||
/**
|
||||
* Sets locale
|
||||
* If locale doesn't exist, sets default
|
||||
* @param locale
|
||||
*/
|
||||
setLocale(locale: string): void;
|
||||
/**
|
||||
* Sets UTC offset for dates
|
||||
* @param offset in minutes
|
||||
*/
|
||||
setUTCOffset(offset: number | null): void;
|
||||
}
|
||||
|
||||
declare namespace DataFormatter {
|
||||
interface LocalesOptions {
|
||||
name: string;
|
||||
months: string[];
|
||||
monthsShort: string[];
|
||||
days: string[];
|
||||
daysShort: string[];
|
||||
thousandSeparator: string;
|
||||
decimalSeparator: string;
|
||||
formats: {
|
||||
[index: string]: string
|
||||
};
|
||||
}
|
||||
interface FormatterOptions {
|
||||
debug?: boolean;
|
||||
UTCOffset?: number | null;
|
||||
locale?: string;
|
||||
transformCode?: (code: any) => any;
|
||||
locales?: LocalesOptions[];
|
||||
}
|
||||
|
||||
interface FormatResult {
|
||||
value: string;
|
||||
align: string;
|
||||
color: string;
|
||||
pattern: string;
|
||||
}
|
||||
}
|
||||
|
||||
export = DataFormatter;
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as DataFormatter from "../../index";
|
||||
|
||||
declare const locale: DataFormatter.LocalesOptions;
|
||||
export = locale;
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as DataFormatter from "../../index";
|
||||
|
||||
declare const locale: DataFormatter.LocalesOptions;
|
||||
export = locale;
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"lib/locales/en-US.d.ts",
|
||||
"lib/locales/ru.d.ts",
|
||||
"excel-style-dataformatter-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
+45
-44
@@ -1,46 +1,38 @@
|
||||
import assert = require('assert');
|
||||
import execa = require('execa');
|
||||
import { PassThrough } from "stream";
|
||||
import { PassThrough } from 'stream';
|
||||
|
||||
execa('unicorns')
|
||||
.then(result => {
|
||||
assert(result.cmd === 'unicorns');
|
||||
assert(result.code === 0);
|
||||
assert(result.failed === false);
|
||||
assert(result.killed === false);
|
||||
assert(result.signal === null);
|
||||
assert(result.stderr === 'bad unicorns');
|
||||
assert(result.stdout === 'good unicorns');
|
||||
assert(result.timedOut === false);
|
||||
});
|
||||
execa('unicorns').then(result => {
|
||||
assert(result.cmd === 'unicorns');
|
||||
assert(result.code === 0);
|
||||
assert(result.failed === false);
|
||||
assert(result.killed === false);
|
||||
assert(result.signal === null);
|
||||
assert(result.stderr === 'bad unicorns');
|
||||
assert(result.stdout === 'good unicorns');
|
||||
assert(result.timedOut === false);
|
||||
});
|
||||
|
||||
execa('foo')
|
||||
.catch(error => {
|
||||
assert(error.cmd === 'foo');
|
||||
assert(error.code === 128);
|
||||
assert(error.failed === true);
|
||||
assert(error.killed === false);
|
||||
assert(error.signal === 'SIGINT');
|
||||
assert(error.stderr === 'stderr');
|
||||
assert(error.stdout === 'stdout');
|
||||
assert(error.timedOut === false);
|
||||
});
|
||||
execa('foo').catch(error => {
|
||||
assert(error.cmd === 'foo');
|
||||
assert(error.code === 128);
|
||||
assert(error.failed === true);
|
||||
assert(error.killed === false);
|
||||
assert(error.signal === 'SIGINT');
|
||||
assert(error.stderr === 'stderr');
|
||||
assert(error.stdout === 'stdout');
|
||||
assert(error.timedOut === false);
|
||||
});
|
||||
|
||||
execa('noop', ['foo'])
|
||||
.then(result => result.stderr.toLocaleLowerCase());
|
||||
execa('noop', ['foo']).then(result => result.stderr.toLocaleLowerCase());
|
||||
|
||||
execa.stdout('unicorns')
|
||||
.then(stdout => stdout.toLocaleLowerCase());
|
||||
execa.stdout('echo', ['unicorns'])
|
||||
.then(stdout => stdout.toLocaleLowerCase());
|
||||
execa.stdout('unicorns').then(stdout => stdout.toLocaleLowerCase());
|
||||
execa.stdout('echo', ['unicorns']).then(stdout => stdout.toLocaleLowerCase());
|
||||
|
||||
execa.stderr('unicorns')
|
||||
.then(stderr => stderr.toLocaleLowerCase());
|
||||
execa.stderr('echo', ['unicorns'])
|
||||
.then(stderr => stderr.toLocaleLowerCase());
|
||||
execa.stderr('unicorns').then(stderr => stderr.toLocaleLowerCase());
|
||||
execa.stderr('echo', ['unicorns']).then(stderr => stderr.toLocaleLowerCase());
|
||||
|
||||
execa.shell('echo unicorns')
|
||||
.then(result => result.stdout.toLocaleLowerCase());
|
||||
execa.shell('echo unicorns').then(result => result.stdout.toLocaleLowerCase());
|
||||
|
||||
{
|
||||
let result: string;
|
||||
@@ -54,14 +46,14 @@ execa.shell('echo unicorns')
|
||||
execa('echo', ['unicorns']).stdout.pipe(process.stdout);
|
||||
execa('echo', ['unicorns']).stderr.pipe(process.stderr);
|
||||
|
||||
execa('forever', {extendEnv: false}).pid;
|
||||
execa('forever', {argv0: 'hi'}).pid;
|
||||
execa('forever', {localDir: '~'}).pid;
|
||||
execa('forever', {reject: false}).pid;
|
||||
execa('forever', {cleanup: false}).pid;
|
||||
execa('forever', {stdin: 1}).pid;
|
||||
execa('forever', {stdout: 'ignore'}).pid;
|
||||
execa('forever', {stderr: undefined}).pid;
|
||||
execa('forever', { extendEnv: false }).pid;
|
||||
execa('forever', { argv0: 'hi' }).pid;
|
||||
execa('forever', { localDir: '~' }).pid;
|
||||
execa('forever', { reject: false }).pid;
|
||||
execa('forever', { cleanup: false }).pid;
|
||||
execa('forever', { stdin: 1 }).pid;
|
||||
execa('forever', { stdout: 'ignore' }).pid;
|
||||
execa('forever', { stderr: undefined }).pid;
|
||||
|
||||
async () => {
|
||||
const { stdout } = await execa('noop', ['foo'], { stripEof: false });
|
||||
@@ -119,7 +111,9 @@ async () => {
|
||||
}
|
||||
|
||||
async () => {
|
||||
const { timedOut, code } = await execa('delay', ['3000', '22'], { timeout: 9000 });
|
||||
const { timedOut, code } = await execa('delay', ['3000', '22'], {
|
||||
timeout: 9000
|
||||
});
|
||||
assert(timedOut === true);
|
||||
assert(code === 22);
|
||||
};
|
||||
@@ -131,3 +125,10 @@ async () => {
|
||||
|
||||
assert(stdout === 'foo');
|
||||
};
|
||||
|
||||
const args: ReadonlyArray<string> = ['bar'];
|
||||
const stdio: ReadonlyArray<'ignore'> = ['ignore'];
|
||||
execa('foo', args);
|
||||
execa('foo', args, {
|
||||
stdio
|
||||
});
|
||||
|
||||
Vendored
+39
-9
@@ -1,4 +1,4 @@
|
||||
// Type definitions for execa 0.8
|
||||
// Type definitions for execa 0.9
|
||||
// Project: https://github.com/sindresorhus/execa#readme
|
||||
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
@@ -23,7 +23,11 @@ declare namespace execa {
|
||||
* Think of this as a mix of `child_process.execFile` and `child_process.spawn`.
|
||||
* @returns a `child_process` instance which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties.
|
||||
*/
|
||||
(file: string, args?: string[], options?: Options): ExecaChildProcess;
|
||||
(
|
||||
file: string,
|
||||
args?: ReadonlyArray<string>,
|
||||
options?: Options
|
||||
): ExecaChildProcess;
|
||||
(file: string, options?: Options): ExecaChildProcess;
|
||||
|
||||
/**
|
||||
@@ -32,7 +36,11 @@ declare namespace execa {
|
||||
* Think of this as a mix of `child_process.execFile` and `child_process.spawn`.
|
||||
* @returns a `child_process` instance which is enhanced to also be a `Promise` for `stdout`.
|
||||
*/
|
||||
stdout(file: string, args?: string[], options?: Options): Promise<string>;
|
||||
stdout(
|
||||
file: string,
|
||||
args?: ReadonlyArray<string>,
|
||||
options?: Options
|
||||
): Promise<string>;
|
||||
stdout(file: string, options?: Options): Promise<string>;
|
||||
|
||||
/**
|
||||
@@ -41,7 +49,11 @@ declare namespace execa {
|
||||
* Think of this as a mix of `child_process.execFile` and `child_process.spawn`.
|
||||
* @returns a `child_process` instance which is enhanced to also be a `Promise` for `stderr`.
|
||||
*/
|
||||
stderr(file: string, args?: string[], options?: Options): Promise<string>;
|
||||
stderr(
|
||||
file: string,
|
||||
args?: ReadonlyArray<string>,
|
||||
options?: Options
|
||||
): Promise<string>;
|
||||
stderr(file: string, options?: Options): Promise<string>;
|
||||
|
||||
/**
|
||||
@@ -59,7 +71,11 @@ declare namespace execa {
|
||||
* @returns the same result object as `child_process.spawnSync`.
|
||||
* @throws an `Error` if the command fails.
|
||||
*/
|
||||
sync(file: string, args?: string[], options?: SyncOptions): ExecaReturns;
|
||||
sync(
|
||||
file: string,
|
||||
args?: ReadonlyArray<string>,
|
||||
options?: SyncOptions
|
||||
): ExecaReturns;
|
||||
sync(file: string, options?: SyncOptions): ExecaReturns;
|
||||
|
||||
/**
|
||||
@@ -71,7 +87,15 @@ declare namespace execa {
|
||||
shellSync(command: string, options?: Options): ExecaReturns;
|
||||
}
|
||||
|
||||
type StdIOOption = 'pipe' | 'ipc' | 'ignore' | Stream | number | null | undefined;
|
||||
type StdIOOption =
|
||||
| 'pipe'
|
||||
| 'ipc'
|
||||
| 'ignore'
|
||||
| 'inherit'
|
||||
| Stream
|
||||
| number
|
||||
| null
|
||||
| undefined;
|
||||
|
||||
interface CommonOptions {
|
||||
/**
|
||||
@@ -103,7 +127,7 @@ declare namespace execa {
|
||||
*
|
||||
* @see https://nodejs.org/api/child_process.html#child_process_options_stdio
|
||||
*/
|
||||
stdio?: 'pipe' | 'ignore' | 'inherit' | StdIOOption[];
|
||||
stdio?: 'pipe' | 'ignore' | 'inherit' | ReadonlyArray<StdIOOption>;
|
||||
/**
|
||||
* Prepare child to run independently of its parent process.
|
||||
* Specific behavior depends on the platform.
|
||||
@@ -253,10 +277,16 @@ declare namespace execa {
|
||||
type ExecaError = Error & ExecaReturns;
|
||||
|
||||
interface ExecaChildPromise {
|
||||
catch<TResult = never>(onrejected?: ((reason: ExecaError) => TResult | PromiseLike<TResult>) | null): Promise<ExecaReturns | TResult>;
|
||||
catch<TResult = never>(
|
||||
onrejected?:
|
||||
| ((reason: ExecaError) => TResult | PromiseLike<TResult>)
|
||||
| null
|
||||
): Promise<ExecaReturns | TResult>;
|
||||
}
|
||||
|
||||
type ExecaChildProcess = ChildProcess & ExecaChildPromise & Promise<ExecaReturns>;
|
||||
type ExecaChildProcess = ChildProcess &
|
||||
ExecaChildPromise &
|
||||
Promise<ExecaReturns>;
|
||||
}
|
||||
|
||||
declare var execa: execa.ExecaStatic;
|
||||
|
||||
@@ -289,14 +289,37 @@ async () => {
|
||||
};
|
||||
|
||||
async () => {
|
||||
// Video test
|
||||
const result = await ImagePicker.launchImageLibraryAsync({
|
||||
mediaTypes: ImagePicker.MediaTypeOptions.Videos
|
||||
mediaTypes: ImagePicker.MediaTypeOptions.Videos,
|
||||
});
|
||||
|
||||
if (!result.cancelled) {
|
||||
result.uri;
|
||||
result.width;
|
||||
result.height;
|
||||
result.duration;
|
||||
result.type;
|
||||
}
|
||||
};
|
||||
|
||||
async () => {
|
||||
// Image test
|
||||
const result = await ImagePicker.launchImageLibraryAsync({
|
||||
mediaTypes: ImagePicker.MediaTypeOptions.Images,
|
||||
base64: true,
|
||||
aspect: [4, 3],
|
||||
quality: 1,
|
||||
exif: true,
|
||||
});
|
||||
|
||||
if (!result.cancelled) {
|
||||
result.uri;
|
||||
result.width;
|
||||
result.height;
|
||||
result.exif;
|
||||
result.base64;
|
||||
result.type;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Vendored
+6
@@ -1418,6 +1418,10 @@ export namespace ImagePicker {
|
||||
uri: string;
|
||||
width: number;
|
||||
height: number;
|
||||
type: 'video' | 'image';
|
||||
base64?: string;
|
||||
exif?: object;
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
type ImageResult = { cancelled: true } | ({ cancelled: false } & ImageInfo);
|
||||
@@ -1434,6 +1438,8 @@ export namespace ImagePicker {
|
||||
allowsEditing?: boolean;
|
||||
aspect?: [number, number];
|
||||
quality?: number;
|
||||
base64?: boolean;
|
||||
exif?: boolean;
|
||||
mediaTypes?: keyof _MediaTypeOptions;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ const graphqlOption: graphqlHTTP.OptionsObj = {
|
||||
extensions: (args) => { }
|
||||
};
|
||||
|
||||
const graphqlOptionRequest = (request: express.Request): graphqlHTTP.OptionsObj => ({
|
||||
const graphqlOptionRequest = (request: express.Request, response: express.Response): graphqlHTTP.OptionsObj => ({
|
||||
graphiql: true,
|
||||
schema: schema,
|
||||
context: request.session
|
||||
});
|
||||
|
||||
const graphqlOptionRequestAsync = async (request: express.Request): Promise<graphqlHTTP.OptionsObj> => {
|
||||
const graphqlOptionRequestAsync = async (request: express.Request, response: express.Response): Promise<graphqlHTTP.OptionsObj> => {
|
||||
return {
|
||||
graphiql: true,
|
||||
schema: await Promise.resolve(schema),
|
||||
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@ declare namespace graphqlHTTP {
|
||||
* Used to configure the graphQLHTTP middleware by providing a schema
|
||||
* and other configuration options.
|
||||
*/
|
||||
export type Options = ((req: Request) => OptionsObj) | ((req: Request) => Promise<OptionsObj>) | OptionsObj
|
||||
export type Options = ((req: Request, res: Response) => OptionsObj) | ((req: Request, res: Response) => Promise<OptionsObj>) | OptionsObj
|
||||
export type OptionsObj = {
|
||||
/**
|
||||
* A GraphQL schema from graphql-js.
|
||||
|
||||
+1
-1
@@ -4,8 +4,8 @@
|
||||
// Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="socket.io" />
|
||||
/// <reference types="feathersjs__socket-commons"/>
|
||||
import SocketIO = require("socket.io");
|
||||
|
||||
export default function feathersSocketIO(callback?: (io: SocketIO.Server) => void): () => void;
|
||||
export default function feathersSocketIO(options: number | SocketIO.ServerOptions, callback?: (io: SocketIO.Server) => void): () => void;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as changelog from 'generate-changelog';
|
||||
|
||||
changelog.generate({
|
||||
exclude: ['chore'],
|
||||
minor: true,
|
||||
repoUrl: 'https://github.com/lob/generate-changelog',
|
||||
tag: 'v1.6.0...v1.7.0'
|
||||
}).then(changelog => changelog.trim());
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// Type definitions for generate-changelog 1.7
|
||||
// Project: https://github.com/lob/generate-changelog#readme
|
||||
// Definitions by: Florian Keller <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface Options {
|
||||
/** exclude listed commit types (e.g. `['chore', 'style', 'refactor']`) */
|
||||
exclude?: string[];
|
||||
/** whether it should be a patch changelog */
|
||||
patch?: boolean;
|
||||
/** whether it should be a minor changelog */
|
||||
minor?: boolean;
|
||||
/** whether it should be a major changelog */
|
||||
major?: boolean;
|
||||
/** repo URL that will be used when linking commits */
|
||||
repoUrl?: string;
|
||||
/** generate from specific tag or range (e.g. `v1.2.3` or `v1.2.3..v1.2.4`)' */
|
||||
tag?: string;
|
||||
}
|
||||
|
||||
export function generate(options: Options): Promise<string>;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"generate-changelog-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -41,6 +41,9 @@ const opts = {
|
||||
|
||||
const pool = genericPool.createPool<Connection>(factory, opts);
|
||||
|
||||
pool.use((conn: Connection) => 'test')
|
||||
.then((result: string) => { });
|
||||
|
||||
pool.acquire()
|
||||
.then((conn: Connection) => {
|
||||
return pool.release(conn);
|
||||
|
||||
Vendored
+1
@@ -22,6 +22,7 @@ export class Pool<T> extends EventEmitter {
|
||||
destroy(resource: T): void;
|
||||
drain(): PromiseLike<undefined>;
|
||||
clear(): PromiseLike<undefined[]>;
|
||||
use<U>(cb: (resource: T) => U): PromiseLike<U>;
|
||||
}
|
||||
|
||||
export interface Factory<T> {
|
||||
|
||||
Vendored
+24
-20
@@ -4,7 +4,11 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
declare module Gijgo {
|
||||
declare module 'gijgo' {
|
||||
export = Types;
|
||||
}
|
||||
|
||||
declare module Types {
|
||||
|
||||
//Grid
|
||||
interface GridPager {
|
||||
@@ -151,8 +155,8 @@ declare module Gijgo {
|
||||
count(): number;
|
||||
destroy(keepTableTag?: boolean, keepWrapperTag?: boolean): void;
|
||||
downloadCSV(filename?: string, includeAllRecords?: boolean): Grid<Entity, Params>;
|
||||
edit(id: string): Grid<Entity, Params>;
|
||||
expandAll(): Grid<Entity, Params>;
|
||||
edit(id: string): Grid<Entity, Params>;
|
||||
expandAll(): Grid<Entity, Params>;
|
||||
//get(position: number): Entity; //TODO: rename to getByPosition to avoid conflicts with jquery.get
|
||||
getAll(): Array<Entity>;
|
||||
getById(id: string): Entity;
|
||||
@@ -263,7 +267,7 @@ declare module Gijgo {
|
||||
close(): DatePicker;
|
||||
destroy(): void;
|
||||
open(): DatePicker;
|
||||
value(value: string): string | DatePicker;
|
||||
value(value?: string): string | DatePicker;
|
||||
}
|
||||
|
||||
// DropDown
|
||||
@@ -306,7 +310,7 @@ declare module Gijgo {
|
||||
}
|
||||
|
||||
interface Editor extends JQuery {
|
||||
content(html: string): string | Editor;
|
||||
content(html?: string): string | Editor;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
@@ -332,7 +336,7 @@ declare module Gijgo {
|
||||
close(): TimePicker;
|
||||
destroy(): void;
|
||||
open(): TimePicker;
|
||||
value(value: string): string | TimePicker;
|
||||
value(value?: string): string | TimePicker;
|
||||
}
|
||||
|
||||
// Tree
|
||||
@@ -368,7 +372,7 @@ declare module Gijgo {
|
||||
checkedField?: string;
|
||||
cascadeCheck?: boolean;
|
||||
dragAndDrop?: boolean;
|
||||
paramNames: TreeParamNames;
|
||||
paramNames?: TreeParamNames;
|
||||
lazyLoading?: boolean;
|
||||
|
||||
|
||||
@@ -408,9 +412,9 @@ declare module Gijgo {
|
||||
selectAll() : Tree;
|
||||
unselectAll() : Tree;
|
||||
getSelections() : Array<string>;
|
||||
getChildren(node: any, cascade: boolean) : Array<any>;
|
||||
enable(node: any, cascade: boolean) : Tree;
|
||||
disable(node: any, cascade: boolean) : Tree;
|
||||
getChildren(node: any, cascade?: boolean) : Array<any>;
|
||||
enable(node: any, cascade?: boolean) : Tree;
|
||||
disable(node: any, cascade?: boolean) : Tree;
|
||||
enableAll() : Tree;
|
||||
disableAll() : Tree;
|
||||
|
||||
@@ -424,21 +428,21 @@ declare module Gijgo {
|
||||
|
||||
|
||||
interface JQuery {
|
||||
grid(settings: Gijgo.GridSettings<any>): Gijgo.Grid<any, any>;
|
||||
grid<Entity>(settings: Gijgo.GridSettings<Entity>): Gijgo.Grid<Entity, any>;
|
||||
grid<Entity, Params>(settings: Gijgo.GridSettings<Entity>): Gijgo.Grid<Entity, Params>;
|
||||
grid(settings: Types.GridSettings<any>): Types.Grid<any, any>;
|
||||
grid<Entity>(settings: Types.GridSettings<Entity>): Types.Grid<Entity, any>;
|
||||
grid<Entity, Params>(settings: Types.GridSettings<Entity>): Types.Grid<Entity, Params>;
|
||||
|
||||
dialog(settings: Gijgo.DialogSettings): Gijgo.Dialog;
|
||||
dialog(settings: Types.DialogSettings): Types.Dialog;
|
||||
|
||||
checkbox(settings: Gijgo.CheckboxSettings): Gijgo.Checkbox;
|
||||
checkbox(settings: Types.CheckboxSettings): Types.Checkbox;
|
||||
|
||||
datepicker(settings: Gijgo.DatePickerSettings): Gijgo.DatePicker;
|
||||
datepicker(settings: Types.DatePickerSettings): Types.DatePicker;
|
||||
|
||||
dropdown(settings: Gijgo.DropDownSettings): Gijgo.DropDown;
|
||||
dropdown(settings: Types.DropDownSettings): Types.DropDown;
|
||||
|
||||
editor(settings: Gijgo.EditorSettings): Gijgo.Editor;
|
||||
editor(settings: Types.EditorSettings): Types.Editor;
|
||||
|
||||
timepicker(settings: Gijgo.TimePickerSettings): Gijgo.TimePicker;
|
||||
timepicker(settings: Types.TimePickerSettings): Types.TimePicker;
|
||||
|
||||
tree(settings: Gijgo.TreeSettings): Gijgo.Tree;
|
||||
tree(settings: Types.TreeSettings): Types.Tree;
|
||||
}
|
||||
|
||||
@@ -14,8 +14,7 @@ function getDriveService() {
|
||||
.setScope('https://www.googleapis.com/auth/drive')
|
||||
.setParam('login_hint', Session.getActiveUser().getEmail())
|
||||
.setParam('access_type', 'offline')
|
||||
.setParam('approval_prompt', 'force')
|
||||
;
|
||||
.setParam('approval_prompt', 'force');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,9 +23,5 @@ function getDriveService() {
|
||||
function authCallback(request: any) {
|
||||
const driveService = getDriveService();
|
||||
const isAuthorized = driveService.handleCallback(request);
|
||||
if (isAuthorized) {
|
||||
Logger.log('success');
|
||||
} else {
|
||||
Logger.log('denied');
|
||||
}
|
||||
Logger.log(isAuthorized ? 'success' : 'denied');
|
||||
}
|
||||
|
||||
Vendored
+4
-3
@@ -392,8 +392,8 @@ declare namespace google.maps {
|
||||
export module Data {
|
||||
export interface DataOptions {
|
||||
controlPosition?: ControlPosition;
|
||||
controls?: string[];
|
||||
drawingMode?: string;
|
||||
controls?: DrawingMode[] | null;
|
||||
drawingMode?: DrawingMode | null;
|
||||
featureFactory?: (geometry: Data.Geometry) => Data.Feature;
|
||||
map?: Map;
|
||||
style?: Data.StylingFunction|Data.StyleOptions;
|
||||
@@ -1863,7 +1863,8 @@ declare namespace google.maps {
|
||||
getZIndex(): number;
|
||||
setMap(map: Map | null): void;
|
||||
setUrl(url: string): void;
|
||||
setZIndez(zIndex: number): void;
|
||||
setZIndex(zIndex: number): void;
|
||||
setOptions(options: KmlLayerOptions): void;
|
||||
}
|
||||
|
||||
export interface KmlLayerOptions {
|
||||
|
||||
@@ -52,6 +52,20 @@ got('todomvc.com', {
|
||||
encoding: 'utf8',
|
||||
hostname: 'todomvc'
|
||||
}).then(response => str = response.body);
|
||||
got('todomvc.com', {
|
||||
form: true,
|
||||
body: [{}],
|
||||
encoding: 'utf8',
|
||||
hostname: 'todomvc',
|
||||
timeout: 2000
|
||||
}).then(response => str = response.body);
|
||||
got('todomvc.com', {
|
||||
form: true,
|
||||
body: [{}],
|
||||
encoding: 'utf8',
|
||||
hostname: 'todomvc',
|
||||
timeout: {connect: 20, request: 20, socket: 20}
|
||||
}).then(response => str = response.body);
|
||||
// following must lead to type checking error: got('todomvc.com', {form: true, body: ''}).then(response => str = response.body);
|
||||
|
||||
got('todomvc.com', {encoding: null, hostname: 'todomvc'}).then(response => buf = response.body);
|
||||
|
||||
Vendored
+6
-2
@@ -98,7 +98,11 @@ declare namespace got {
|
||||
json?: boolean;
|
||||
}
|
||||
|
||||
type GotOptions<E extends string | null> = http.RequestOptions & {
|
||||
interface TimoutRequestOptions extends http.RequestOptions {
|
||||
timeout?: any;
|
||||
}
|
||||
|
||||
interface GotOptions<E extends string | null> extends TimoutRequestOptions {
|
||||
encoding?: E;
|
||||
query?: string | object;
|
||||
timeout?: number | TimeoutOptions;
|
||||
@@ -106,7 +110,7 @@ declare namespace got {
|
||||
followRedirect?: boolean;
|
||||
decompress?: boolean;
|
||||
useElectronNet?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
interface TimeoutOptions {
|
||||
connect?: number;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import getFieldNames = require("graphql-list-fields");
|
||||
|
||||
import {
|
||||
GraphQLID,
|
||||
GraphQLInterfaceType,
|
||||
GraphQLObjectType,
|
||||
GraphQLResolveInfo,
|
||||
GraphQLSchema,
|
||||
GraphQLString
|
||||
} from "graphql";
|
||||
|
||||
const sampleGraphQLResolveInfo: GraphQLResolveInfo = {
|
||||
fieldName: "",
|
||||
fieldNodes: [],
|
||||
returnType: GraphQLString,
|
||||
parentType: new GraphQLInterfaceType({
|
||||
name: "Sample",
|
||||
fields: {
|
||||
name: { type: GraphQLString }
|
||||
}
|
||||
}),
|
||||
path: undefined,
|
||||
schema: new GraphQLSchema({
|
||||
query: new GraphQLObjectType({
|
||||
name: "SampleType",
|
||||
fields: {}
|
||||
})
|
||||
}),
|
||||
fragments: {},
|
||||
rootValue: null,
|
||||
operation: {
|
||||
kind: "OperationDefinition",
|
||||
operation: "query",
|
||||
selectionSet: {
|
||||
kind: "SelectionSet",
|
||||
selections: []
|
||||
}
|
||||
},
|
||||
variableValues: {}
|
||||
};
|
||||
|
||||
const fieldNames: string[] = getFieldNames(sampleGraphQLResolveInfo);
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for graphql-list-fields 2.0
|
||||
// Project: https://github.com/jakepusateri/graphql-list-fields#readme
|
||||
// Definitions by: Chris Filipowski <https://github.com/filipows>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { GraphQLResolveInfo } from "graphql";
|
||||
|
||||
declare function getFieldList(info: GraphQLResolveInfo): string[];
|
||||
|
||||
export = getFieldList;
|
||||
@@ -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",
|
||||
"graphql-list-fields-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+15
-1
@@ -21,6 +21,9 @@ import {
|
||||
GraphQLOutputType,
|
||||
GraphQLFieldResolver,
|
||||
GraphQLTypeResolver,
|
||||
GraphQLUnionType,
|
||||
GraphQLEnumType,
|
||||
GraphQLScalarType,
|
||||
Thunk
|
||||
} from "graphql";
|
||||
|
||||
@@ -58,9 +61,20 @@ export const backwardConnectionArgs: GraphQLFieldConfigArgumentMap & {
|
||||
*/
|
||||
export const connectionArgs: GraphQLFieldConfigArgumentMap & ForwardConnectionArgs & BackwardConnectionArgs;
|
||||
|
||||
export type ConnectionConfigNodeTypeNullable =
|
||||
| GraphQLScalarType
|
||||
| GraphQLObjectType
|
||||
| GraphQLInterfaceType
|
||||
| GraphQLUnionType
|
||||
| GraphQLEnumType;
|
||||
|
||||
export type ConnectionConfigNodeType =
|
||||
| ConnectionConfigNodeTypeNullable
|
||||
| GraphQLNonNull<ConnectionConfigNodeTypeNullable>;
|
||||
|
||||
export interface ConnectionConfig {
|
||||
name?: string | null;
|
||||
nodeType: GraphQLObjectType;
|
||||
nodeType: ConnectionConfigNodeType;
|
||||
resolveNode?: GraphQLFieldResolver<any, any> | null;
|
||||
resolveCursor?: GraphQLFieldResolver<any, any> | null;
|
||||
edgeFields?: Thunk<GraphQLFieldConfigMap<any, any>> | null;
|
||||
|
||||
@@ -16,6 +16,14 @@ interface SomeTestResult {
|
||||
someTestResultProp: string;
|
||||
}
|
||||
|
||||
const batchFunction = (sources: ReadonlyArray<SomeTestSource>) => {
|
||||
const someTestResult: SomeTestResult = {
|
||||
someTestResultProp: "Hello"
|
||||
};
|
||||
|
||||
return sources.map(source => someTestResult);
|
||||
};
|
||||
|
||||
const asyncBatchFunction = async (sources: ReadonlyArray<SomeTestSource>) => {
|
||||
return new Promise<SomeTestResult[]>(resolve => {
|
||||
const res = [
|
||||
@@ -27,19 +35,35 @@ const asyncBatchFunction = async (sources: ReadonlyArray<SomeTestSource>) => {
|
||||
});
|
||||
};
|
||||
|
||||
const asyncBatchFunctionWhenTReturnIsArray = async (
|
||||
sources: ReadonlyArray<SomeTestSource>
|
||||
) => {
|
||||
const sourceBatches = sources.map(() => {
|
||||
return new Promise<SomeTestResult[]>(resolve => {
|
||||
const res = [
|
||||
{
|
||||
someTestResultProp: ""
|
||||
}
|
||||
];
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
|
||||
return Promise.all(sourceBatches);
|
||||
};
|
||||
|
||||
// $ExpectType ResolverFunction<SomeTestSource, any, any, SomeTestResult>
|
||||
const withSourceAndResultTyped = createBatchResolver<
|
||||
SomeTestSource,
|
||||
SomeTestResult
|
||||
>((sources, _, __) => {
|
||||
return sources.map(source => {
|
||||
const res: SomeTestResult = {
|
||||
someTestResultProp: ""
|
||||
};
|
||||
// $ExpectType ReadonlyArray<SomeTestSource>
|
||||
const verifySources = sources;
|
||||
|
||||
return res;
|
||||
});
|
||||
return batchFunction(sources);
|
||||
});
|
||||
|
||||
// $ExpectType ResolverFunction<SomeTestSource, any, any, SomeTestResult>
|
||||
const withSourceAndResultTypedAsPromise = createBatchResolver<
|
||||
SomeTestSource,
|
||||
SomeTestResult
|
||||
@@ -50,6 +74,7 @@ const withSourceAndResultTypedAsPromise = createBatchResolver<
|
||||
return result;
|
||||
});
|
||||
|
||||
// $ExpectType ResolverFunction<SomeTestSource, SomeTestArgs, any, SomeTestResult>
|
||||
const withSourceAndArgsAndResultTyped = createBatchResolver<
|
||||
SomeTestSource,
|
||||
SomeTestResult,
|
||||
@@ -64,6 +89,7 @@ const withSourceAndArgsAndResultTyped = createBatchResolver<
|
||||
return result;
|
||||
});
|
||||
|
||||
// $ExpectType ResolverFunction<SomeTestSource, SomeTestArgs, SomeTestContext, SomeTestResult>
|
||||
const withSourceAndArgsAndContextTyped = createBatchResolver<
|
||||
SomeTestSource,
|
||||
SomeTestResult,
|
||||
@@ -80,3 +106,13 @@ const withSourceAndArgsAndContextTyped = createBatchResolver<
|
||||
const result = await asyncBatchFunction(sources);
|
||||
return result;
|
||||
});
|
||||
|
||||
// $ExpectType ResolverFunction<SomeTestSource, any, any, SomeTestResult[]>
|
||||
const withResultIsArray = createBatchResolver<SomeTestSource, SomeTestResult[]>(
|
||||
(sources, _, __) => {
|
||||
// $ExpectType ReadonlyArray<SomeTestSource>
|
||||
const verifySources = sources;
|
||||
|
||||
return asyncBatchFunctionWhenTReturnIsArray(sources);
|
||||
}
|
||||
);
|
||||
|
||||
+24
-1
@@ -4,6 +4,22 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/**
|
||||
* Creates a GraphQL.js field resolver that batches together multiple resolves
|
||||
* together that share the *exact* same GraphQL field selection.
|
||||
*
|
||||
* Note:
|
||||
* The batchResolveFunction you supply always expects you to return an array of TReturn (or a promise with this array).
|
||||
* This is because you will have to return a TReturn for every source given to you by the batch function.
|
||||
* For an example of this please see the examples in the original project repository:
|
||||
* https://github.com/calebmer/graphql-resolve-batch/tree/master/examples
|
||||
*
|
||||
* @template TSource The original type of a single source.
|
||||
* @template TReturn The return type of the field resolver.
|
||||
* @template TArgs The type of supplied arguments.
|
||||
* @template TContext The type of the current resolver context.
|
||||
* @param batchResolveFn A batch function to resolve all fields for the given sources in a single batch.
|
||||
*/
|
||||
export function createBatchResolver<
|
||||
TSource,
|
||||
TReturn,
|
||||
@@ -13,12 +29,19 @@ export function createBatchResolver<
|
||||
batchResolveFn: BatchResolveFunction<TSource, TArgs, TContext, TReturn>
|
||||
): ResolverFunction<TSource, TArgs, TContext, TReturn>;
|
||||
|
||||
/**
|
||||
* The resulting field resolver that batches together multiple resolves.
|
||||
* Graphql-resolve-batch will always return a promise for this resulting resolver.
|
||||
*/
|
||||
export type ResolverFunction<TSource, TArgs, TContext, TReturn> = (
|
||||
source: TSource,
|
||||
args: TArgs,
|
||||
context: TContext
|
||||
) => Promise<TReturn> | Promise<TReturn[]>;
|
||||
) => Promise<TReturn>;
|
||||
|
||||
/**
|
||||
* A batch function to resolve all fields for the given sources in a single batch.
|
||||
*/
|
||||
export type BatchResolveFunction<TSource, TArgs, TContext, TReturn> = (
|
||||
sources: ReadonlyArray<TSource>,
|
||||
args: TArgs,
|
||||
|
||||
Vendored
+4
@@ -12,6 +12,7 @@
|
||||
// Tim Griesser <https://github.com/tgriesser>
|
||||
// Dylan Stewart <https://github.com/dyst5422>
|
||||
// Alessio Dionisi <https://github.com/adnsio>
|
||||
// Divyendu Singh <https://github.com/divyenduz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -100,6 +101,9 @@ export {
|
||||
// Build a GraphQLSchema from a GraphQL schema language document.
|
||||
buildSchema,
|
||||
|
||||
// Get the description of an AST node
|
||||
getDescription,
|
||||
|
||||
// Extends an existing GraphQLSchema from a parsed GraphQL Schema
|
||||
// language AST.
|
||||
extendSchema,
|
||||
|
||||
Vendored
+21
@@ -61,6 +61,27 @@ export class GraphQLSchema {
|
||||
getDirective(name: string): GraphQLDirective;
|
||||
}
|
||||
|
||||
export type GraphQLSchemaValidationOptions = {
|
||||
/**
|
||||
* When building a schema from a GraphQL service's introspection result, it
|
||||
* might be safe to assume the schema is valid. Set to true to assume the
|
||||
* produced schema is valid.
|
||||
*
|
||||
* Default: false
|
||||
*/
|
||||
assumeValid?: boolean;
|
||||
|
||||
/**
|
||||
* If provided, the schema will consider fields or types with names included
|
||||
* in this list valid, even if they do not adhere to the specification's
|
||||
* schema validation rules.
|
||||
*
|
||||
* This option is provided to ease adoption and may be removed in a future
|
||||
* major release.
|
||||
*/
|
||||
allowedLegacyNames?: ReadonlyArray<string>;
|
||||
};
|
||||
|
||||
export interface GraphQLSchemaConfig {
|
||||
query: GraphQLObjectType;
|
||||
mutation?: GraphQLObjectType;
|
||||
|
||||
+24
-5
@@ -1,6 +1,17 @@
|
||||
import { DocumentNode, Location } from '../language/ast';
|
||||
import { DocumentNode, Location, StringValueNode } from '../language/ast';
|
||||
import { Source } from '../language/source';
|
||||
import { GraphQLSchema } from '../type/schema';
|
||||
import { GraphQLSchema, GraphQLSchemaValidationOptions } from '../type/schema';
|
||||
|
||||
interface BuildSchemaOptions extends GraphQLSchemaValidationOptions {
|
||||
/**
|
||||
* Descriptions are defined as preceding string literals, however an older
|
||||
* experimental version of the SDL supported preceding comments as
|
||||
* descriptions. Set to true to enable this deprecated behavior.
|
||||
*
|
||||
* Default: false
|
||||
*/
|
||||
commentDescriptions?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* This takes the ast of a schema document produced by the parse function in
|
||||
@@ -15,10 +26,18 @@ import { GraphQLSchema } from '../type/schema';
|
||||
export function buildASTSchema(ast: DocumentNode): GraphQLSchema;
|
||||
|
||||
/**
|
||||
* Given an ast node, returns its string description based on a contiguous
|
||||
* block full-line of comments preceding it.
|
||||
* Given an ast node, returns its string description.
|
||||
*
|
||||
* Accepts options as a second argument:
|
||||
*
|
||||
* - commentDescriptions:
|
||||
* Provide true to use preceding comments as the description.
|
||||
*
|
||||
*/
|
||||
export function getDescription(node: { loc?: Location }): string;
|
||||
export function getDescription(
|
||||
node: { description?: StringValueNode; loc?: Location },
|
||||
options: BuildSchemaOptions
|
||||
): string;
|
||||
|
||||
/**
|
||||
* A helper function to build a GraphQLSchema directly from a source
|
||||
|
||||
Vendored
+1
-1
@@ -27,7 +27,7 @@ export { getOperationAST } from './getOperationAST';
|
||||
export { buildClientSchema } from './buildClientSchema';
|
||||
|
||||
// Build a GraphQLSchema from GraphQL Schema language.
|
||||
export { buildASTSchema, buildSchema } from './buildASTSchema';
|
||||
export { buildASTSchema, buildSchema, getDescription } from './buildASTSchema';
|
||||
|
||||
// Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST.
|
||||
export { extendSchema } from './extendSchema';
|
||||
|
||||
Vendored
+4
-4
@@ -120,7 +120,7 @@ export interface PluginBase<T> {
|
||||
* * server - the server object with a plugin-specific server.realm.
|
||||
* * options - any options passed to the plugin during registration via server.register().
|
||||
*/
|
||||
register: (server: Server, options: T) => Promise<void>;
|
||||
register: (server: Server, options: T) => void | Promise<void>;
|
||||
|
||||
/** (optional) if true, allows the plugin to be registered multiple times with the same server. Defaults to false. */
|
||||
multiple?: boolean;
|
||||
@@ -1706,7 +1706,7 @@ export interface RouteOptions {
|
||||
* * credentials - if true, allows user credentials to be sent ('Access-Control-Allow-Credentials'). Defaults to false.
|
||||
* [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscors)
|
||||
*/
|
||||
cors?: false | RouteOptionsCors;
|
||||
cors?: boolean | RouteOptionsCors;
|
||||
|
||||
/**
|
||||
* Default value: none.
|
||||
@@ -2586,7 +2586,7 @@ export interface ServerInjectOptions extends Shot.RequestOptions {
|
||||
/**
|
||||
* sets the initial value of request.app, defaults to {}.
|
||||
*/
|
||||
app?: ApplicationState;
|
||||
app: ApplicationState;
|
||||
/**
|
||||
* sets the initial value of request.plugins, defaults to {}.
|
||||
*/
|
||||
@@ -3257,7 +3257,7 @@ export class Server extends Podium {
|
||||
* Initialized with an empty object.
|
||||
* [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverapp)
|
||||
*/
|
||||
app?: ApplicationState;
|
||||
app: ApplicationState;
|
||||
|
||||
/**
|
||||
* Server Auth: properties and methods
|
||||
|
||||
@@ -6,20 +6,20 @@ const options: ServerOptions = {
|
||||
};
|
||||
|
||||
declare module "hapi" {
|
||||
// Demonstrate augmenting the application state.
|
||||
interface ApplicationState {
|
||||
key?: string;
|
||||
}
|
||||
// Demonstrate augmenting the application state.
|
||||
interface ApplicationState {
|
||||
key?: string;
|
||||
}
|
||||
}
|
||||
|
||||
const server = new Server(options);
|
||||
server.app!.key = 'value2';
|
||||
server.app.key = 'value2';
|
||||
|
||||
const serverRoute: ServerRoute = {
|
||||
path: '/',
|
||||
method: 'GET',
|
||||
handler(request, h) {
|
||||
return 'key: ' + request.server.app!.key;
|
||||
return 'key: ' + request.server.app.key;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@ interface Plugin3 {
|
||||
three: 3;
|
||||
}
|
||||
|
||||
interface Plugin4 {
|
||||
four: 4;
|
||||
}
|
||||
|
||||
declare module 'hapi' {
|
||||
interface PluginProperties {
|
||||
example: {
|
||||
@@ -42,6 +46,11 @@ const plugin3: Plugin<Plugin3> = {
|
||||
register: async (server: Server, options: Plugin3) => {}
|
||||
};
|
||||
|
||||
const plugin4: Plugin<Plugin4> = {
|
||||
name: 'plugin4',
|
||||
register: (server: Server, options: Plugin4) => {}
|
||||
};
|
||||
|
||||
const server = new Server({
|
||||
port: 8000,
|
||||
});
|
||||
@@ -90,5 +99,9 @@ server.register([
|
||||
{
|
||||
plugin: plugin1,
|
||||
options: {one: 1}
|
||||
},
|
||||
{
|
||||
plugin: plugin4,
|
||||
options: {four: 4}
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -6,7 +6,7 @@ const options: ServerOptions = {
|
||||
};
|
||||
|
||||
const server = new Server(options);
|
||||
server.app!.key = 'value2';
|
||||
server.app.key = 'value2';
|
||||
|
||||
server.route({
|
||||
path: '/',
|
||||
|
||||
Vendored
+3
-2
@@ -961,7 +961,7 @@ declare namespace Highcharts {
|
||||
* Use this in cases where a linear gradient between a minColor and maxColor is not sufficient.
|
||||
* The stops is an array of tuples, where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color.
|
||||
*/
|
||||
stops?: Array<[number, string]>;
|
||||
stops?: Array<Array<number|string>>;
|
||||
/**
|
||||
* The amount of ticks to draw on the axis. This opens up for aligning the ticks of multiple charts or panes within
|
||||
* a chart. This option overrides the tickPixelInterval option.
|
||||
@@ -1995,6 +1995,7 @@ declare namespace Highcharts {
|
||||
fontWeight?: string;
|
||||
left?: string;
|
||||
opacity?: number;
|
||||
overflow?: string;
|
||||
padding?: string | number;
|
||||
position?: string;
|
||||
top?: string;
|
||||
@@ -3076,7 +3077,7 @@ declare namespace Highcharts {
|
||||
* @default ['50%', '50%']
|
||||
* @since 2.3.0
|
||||
*/
|
||||
center?: [number | string, number | string];
|
||||
center?: Array<number|string>;
|
||||
/**
|
||||
* The end angle of the polar X axis or gauge value axis, given in degrees where 0 is north.
|
||||
* @default startAngle + 360
|
||||
|
||||
@@ -1631,12 +1631,18 @@ function test_Gauge() {
|
||||
type: 'gauge'
|
||||
},
|
||||
pane: {
|
||||
center: ['50%', '85%'],
|
||||
startAngle: -150,
|
||||
endAngle: 150
|
||||
},
|
||||
yAxis: {
|
||||
min: 0,
|
||||
max: 100
|
||||
max: 100,
|
||||
stops: [
|
||||
[0.1, '#DF5353'],
|
||||
[0.5, '#DDDF0D'],
|
||||
[0.9, '#55BF3B'],
|
||||
],
|
||||
},
|
||||
plotOptions: {
|
||||
gauge: {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import voidElements = require('html-void-elements');
|
||||
|
||||
voidElements.indexOf('br');
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// Type definitions for html-void-elements 1.0
|
||||
// Project: https://github.com/wooorm/html-void-elements
|
||||
// Definitions by: rhysd <https://github.com/rhysd>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare const TagNames: string[];
|
||||
export = TagNames;
|
||||
@@ -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",
|
||||
"html-void-elements-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -39,7 +39,7 @@ function testIsValidBBAN() {
|
||||
*/
|
||||
function testPrintFormat() {
|
||||
var iban: string = 'BE68539007547034';
|
||||
var separator: string[] = ['fr'];
|
||||
var separator: string = ' ';
|
||||
var format: string = IBAN.printFormat(iban, separator);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,6 @@ function testPrintFormat() {
|
||||
*/
|
||||
function testToBBAN() {
|
||||
var iban: string = 'BE68539007547034';
|
||||
var separator: string[] = ['-'];
|
||||
var separator: string = '-';
|
||||
var bban: string = IBAN.toBBAN(iban, separator);
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+4
-4
@@ -42,17 +42,17 @@ interface IBANStatic {
|
||||
/**
|
||||
* @summary Returns the IBAN in a print format.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string} The IBAN in print format.
|
||||
* @param {string} separator The separator to use between IBAN blocks, defaults to ' '.
|
||||
*/
|
||||
printFormat(iban: string, separator: string[]): string;
|
||||
printFormat(iban: string, separator?: string): string;
|
||||
|
||||
/**
|
||||
* @summary Convert the passed IBAN to a country-specific BBAN.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string[]} Separator the separator to use between BBAN blocks.
|
||||
* @param {string} separator The separator to use between BBAN blocks, defaults to ' '.
|
||||
* @returns {string} The BBAN
|
||||
*/
|
||||
toBBAN(iban: string, separator: string[]): string;
|
||||
toBBAN(iban: string, separator?: string): string;
|
||||
}
|
||||
|
||||
declare var IBAN: IBANStatic;
|
||||
|
||||
Vendored
+10
-6
@@ -4,20 +4,21 @@
|
||||
// Parvez <https://github.com/ppathan>
|
||||
// Jouderian <https://github.com/jouderianjr>
|
||||
// Qibang <https://github.com/bang88>
|
||||
// Jason Dreyzehner <https://github.com/bitjson>
|
||||
// Synarque <https://github.com/synarque>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// TypeScript Version: 2.3
|
||||
/// <reference types="rx" />
|
||||
|
||||
import through = require("through");
|
||||
import through = require('through');
|
||||
|
||||
declare namespace inquirer {
|
||||
type Prompts = { [name: string]: PromptModule };
|
||||
type ChoiceType = string | objects.ChoiceOption | objects.Separator;
|
||||
type Questions<T> =
|
||||
| Question<T>
|
||||
| Question<T>[]
|
||||
| ReadonlyArray<Question<T>>
|
||||
| Rx.Observable<Question<T>>;
|
||||
|
||||
interface Inquirer {
|
||||
@@ -97,7 +98,10 @@ declare namespace inquirer {
|
||||
* Array values can be simple strings, or objects containing a name (to display) and a value properties
|
||||
* (to save in the answers hash). Values can also be a Separator.
|
||||
*/
|
||||
choices?: ChoiceType[] | ((answers: T) => ChoiceType[]) | ((answers: T) => Promise<ChoiceType[]>);
|
||||
choices?:
|
||||
| ReadonlyArray<ChoiceType>
|
||||
| ((answers: T) => ReadonlyArray<ChoiceType>);
|
||||
| ((answers: T) => Promise<ReadonlyArray<ChoiceType>>);
|
||||
/**
|
||||
* Receive the user input and should return true if the value is valid, and an error message (String)
|
||||
* otherwise. If false is returned, a default error message is provided.
|
||||
@@ -254,11 +258,11 @@ declare namespace inquirer {
|
||||
*/
|
||||
interface Choices {
|
||||
new <T = Answers>(
|
||||
choices: (string | Separator | ChoiceOption)[],
|
||||
choices: ReadonlyArray<string | Separator | ChoiceOption>,
|
||||
answers?: T
|
||||
): Choices;
|
||||
choices: Choice[];
|
||||
realChoices: Choice[];
|
||||
choices: ReadonlyArray<Choice>;
|
||||
realChoices: ReadonlyArray<Choice>;
|
||||
length: number;
|
||||
realLength: number;
|
||||
/**
|
||||
|
||||
@@ -563,3 +563,24 @@ function likesFood(aFood: string) {
|
||||
inquirer.prompt<Answers4>(questions, function(answers) {
|
||||
console.log(JSON.stringify(answers, null, " "));
|
||||
});
|
||||
|
||||
// immutable usage
|
||||
const immutableChoices: ReadonlyArray<string> = [
|
||||
'Order a pizza',
|
||||
'Make a reservation',
|
||||
'Ask opening hours',
|
||||
'Talk to the receptionist'
|
||||
];
|
||||
inquirer.prompt(
|
||||
[
|
||||
{
|
||||
type: 'rawlist',
|
||||
name: 'theme',
|
||||
message: 'What do you want to do?',
|
||||
choices: immutableChoices
|
||||
}
|
||||
],
|
||||
function(answers: inquirer.Answers) {
|
||||
console.log(JSON.stringify(answers, null, ' '));
|
||||
}
|
||||
);
|
||||
|
||||
Vendored
+1
@@ -595,6 +595,7 @@ declare namespace IORedis {
|
||||
hget(key: string, field: string, callback?: (err: Error, res: string) => void): Pipeline;
|
||||
|
||||
hmset(key: string, field: string, value: any, ...args: string[]): Pipeline;
|
||||
hmset(key: string, data: any, callback?: (err: Error, res: 0 | 1) => void): Pipeline;
|
||||
|
||||
hmget(key: string, ...fields: string[]): Pipeline;
|
||||
|
||||
|
||||
Vendored
+2
-1
@@ -10,6 +10,7 @@
|
||||
// Youngrok Kim <https://github.com/rokoroku>
|
||||
// Dan Kraus <https://github.com/dankraus>
|
||||
// Anjun Wang <https://github.com/wanganjun>
|
||||
// Rafael Kallis <https://github.com/rafaelkallis>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
@@ -376,7 +377,7 @@ export interface AnySchema extends JoiObject {
|
||||
* override, that error will be returned and the override will be ignored (unless the `abortEarly`
|
||||
* option has been set to `false`).
|
||||
*/
|
||||
error?(err: Error | ValidationErrorFunction): this;
|
||||
error(err: Error | ValidationErrorFunction): this;
|
||||
|
||||
/**
|
||||
* Returns a plain object representing the schema's rules and properties
|
||||
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
// Type definitions for jQuery Browser Plugin 0.1
|
||||
// Project: https://github.com/gabceb/jquery-browser-plugin
|
||||
// Definitions by: Anderson Friaça <https://github.com/AndersonFriaca>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="jquery" />
|
||||
|
||||
export interface Matchs {
|
||||
version?: string;
|
||||
versionNumber?: number;
|
||||
platform?: string;
|
||||
mobile?: boolean;
|
||||
desktop?: boolean;
|
||||
webkit?: boolean;
|
||||
name?: string;
|
||||
android?: boolean;
|
||||
bb?: boolean;
|
||||
blackberry?: boolean;
|
||||
ipad?: boolean;
|
||||
iphone?: boolean;
|
||||
ipod?: boolean;
|
||||
kindle?: boolean;
|
||||
playbook?: boolean;
|
||||
silk?: boolean;
|
||||
['windows phone']?: boolean;
|
||||
cros?: boolean;
|
||||
mac?: boolean;
|
||||
linux?: boolean;
|
||||
win?: boolean;
|
||||
chrome?: boolean;
|
||||
opr?: boolean;
|
||||
safari?: boolean;
|
||||
rv?: boolean;
|
||||
iemobile?: boolean;
|
||||
msie?: boolean;
|
||||
msedge?: boolean;
|
||||
uaMatch: ((ua?: string) => Matchs);
|
||||
}
|
||||
declare global {
|
||||
interface Window {
|
||||
jQBrowser: Matchs;
|
||||
}
|
||||
interface JQueryStatic {
|
||||
browser: Matchs;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// basic usage
|
||||
$.browser;
|
||||
$.browser.android;
|
||||
$.browser.uaMatch();
|
||||
window.jQBrowser;
|
||||
window.jQBrowser.android;
|
||||
window.jQBrowser.uaMatch();
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jquery.browser-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"extends": "dtslint/dt.json"}
|
||||
Vendored
+10
-1
@@ -1,6 +1,8 @@
|
||||
// Type definitions for json-schema 4.0 and 6.0
|
||||
// Project: https://www.npmjs.com/package/json-schema
|
||||
// Definitions by: Boris Cherny <https://github.com/bcherny>, Cyrille Tuzi <https://github.com/cyrilletuzi>
|
||||
// Definitions by: Boris Cherny <https://github.com/bcherny>
|
||||
// Cyrille Tuzi <https://github.com/cyrilletuzi>
|
||||
// Lucian Buzzo <https://github.com/lucianbuzzo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -197,6 +199,8 @@ export interface JSONSchema4 {
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
|
||||
*/
|
||||
[k: string]: any
|
||||
|
||||
format?: string
|
||||
}
|
||||
|
||||
/* JSON Schema 6 */
|
||||
@@ -470,4 +474,9 @@ export interface JSONSchema6 {
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
|
||||
*/
|
||||
examples?: JSONSchema6Type[]
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8
|
||||
*/
|
||||
format?: string
|
||||
}
|
||||
|
||||
@@ -64,7 +64,8 @@ import { JSONSchema4, JSONSchema4Type, JSONSchema4TypeName, JSONSchema6, JSONSch
|
||||
oneOf: [{}],
|
||||
not: {},
|
||||
extends: 'foo',
|
||||
bar: 4
|
||||
bar: 4,
|
||||
format: 'date-time'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,6 +135,7 @@ import { JSONSchema4, JSONSchema4Type, JSONSchema4TypeName, JSONSchema6, JSONSch
|
||||
const: 'foo',
|
||||
contains: {},
|
||||
examples: [{}],
|
||||
propertyNames: {}
|
||||
propertyNames: {},
|
||||
format: 'date-time'
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -10,9 +10,9 @@ export declare namespace json2csv {
|
||||
}
|
||||
|
||||
export interface Options<T> {
|
||||
fields?: (string | FieldInfo<T>);
|
||||
fields?: Array<string | FieldInfo<T>>;
|
||||
ndjson?: boolean;
|
||||
unwind?: string | string[];
|
||||
unwind?: string | Array<string>;
|
||||
flatten?: boolean;
|
||||
defaultValue?: string;
|
||||
quote?: string;
|
||||
|
||||
@@ -17,9 +17,27 @@ parse({});
|
||||
parse([]);
|
||||
parse({}, {});
|
||||
|
||||
interface Car {
|
||||
car: string;
|
||||
price: number;
|
||||
}
|
||||
|
||||
new Parser();
|
||||
const parser: Parser<ExampleObj> = new Parser({});
|
||||
s = parser.parse({ str: '', num: 1, obj: {} });
|
||||
|
||||
const opts: json2csv.Options<Car> = {
|
||||
fields: [{
|
||||
label: 'Car Name',
|
||||
value: 'car'
|
||||
}, {
|
||||
label: 'Price USD',
|
||||
value: 'price'
|
||||
}]
|
||||
};
|
||||
|
||||
const json2csvParser = new Parser<Car>(opts);
|
||||
|
||||
parser.parse([]);
|
||||
const transform: Transform<ExampleObj> = new Transform<ExampleObj>({ quote: '' });
|
||||
const nodeTransform: NodeTransform = transform;
|
||||
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for jsonwebtoken 7.2.1
|
||||
// Type definitions for jsonwebtoken 7.2.2
|
||||
// Project: https://github.com/auth0/node-jsonwebtoken
|
||||
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>,
|
||||
// Daniel Heim <https://github.com/danielheim>,
|
||||
@@ -167,4 +167,4 @@ declare function verify(
|
||||
declare function decode(
|
||||
token: string,
|
||||
options?: DecodeOptions,
|
||||
): null | object | string;
|
||||
): null | { [key: string]: any } | string;
|
||||
|
||||
@@ -11,39 +11,44 @@ var token: string;
|
||||
var cert: Buffer;
|
||||
|
||||
interface ITestObject {
|
||||
'foo': string
|
||||
foo: string;
|
||||
}
|
||||
|
||||
const testObject = { foo: 'bar' }
|
||||
const testObject = { foo: "bar" };
|
||||
|
||||
/**
|
||||
* jwt.sign
|
||||
* https://github.com/auth0/node-jsonwebtoken#usage
|
||||
*/
|
||||
// sign with default (HMAC SHA256)
|
||||
token = jwt.sign(testObject, 'shhhhh');
|
||||
token = jwt.sign(testObject, "shhhhh");
|
||||
|
||||
// sign with default (HMAC SHA256) and single audience
|
||||
token = jwt.sign(testObject, 'shhhhh', { audience: "theAudience"});
|
||||
token = jwt.sign(testObject, "shhhhh", { audience: "theAudience" });
|
||||
|
||||
// sign with default (HMAC SHA256) and multiple audiences
|
||||
token = jwt.sign(testObject, 'shhhhh', { audience: ["audience1", "audience2"]});
|
||||
token = jwt.sign(testObject, "shhhhh", {
|
||||
audience: ["audience1", "audience2"],
|
||||
});
|
||||
|
||||
// sign with default (HMAC SHA256) and a keyid
|
||||
token = jwt.sign(testObject, 'shhhhh', { keyid: "theKeyId"});
|
||||
token = jwt.sign(testObject, "shhhhh", { keyid: "theKeyId" });
|
||||
|
||||
// sign with RSA SHA256
|
||||
cert = fs.readFileSync('private.key'); // get private key
|
||||
token = jwt.sign(testObject, cert, { algorithm: 'RS256'});
|
||||
cert = fs.readFileSync("private.key"); // get private key
|
||||
token = jwt.sign(testObject, cert, { algorithm: "RS256" });
|
||||
|
||||
// sign with encrypted RSA SHA256 private key (only PEM encoding is supported)
|
||||
const privKey: Buffer = fs.readFileSync('encrypted_private.key'); // get private key
|
||||
const secret = {key: privKey.toString(), passphrase: 'keypwd'}
|
||||
token = jwt.sign(testObject, secret, { algorithm: 'RS256' }); // the algorithm option is mandatory in this case
|
||||
const privKey: Buffer = fs.readFileSync("encrypted_private.key"); // get private key
|
||||
const secret = { key: privKey.toString(), passphrase: "keypwd" };
|
||||
token = jwt.sign(testObject, secret, { algorithm: "RS256" }); // the algorithm option is mandatory in this case
|
||||
|
||||
// sign asynchronously
|
||||
jwt.sign(testObject, cert, { algorithm: 'RS256' }, function(err: Error, token: string) {
|
||||
console.log(token);
|
||||
jwt.sign(testObject, cert, { algorithm: "RS256" }, function(
|
||||
err: Error,
|
||||
token: string,
|
||||
) {
|
||||
console.log(token);
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -51,10 +56,10 @@ jwt.sign(testObject, cert, { algorithm: 'RS256' }, function(err: Error, token: s
|
||||
* https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback
|
||||
*/
|
||||
// verify a token symmetric
|
||||
jwt.verify(token, 'shhhhh', function(err, decoded) {
|
||||
const result = decoded as ITestObject
|
||||
jwt.verify(token, "shhhhh", function(err, decoded) {
|
||||
const result = decoded as ITestObject;
|
||||
|
||||
console.log(result.foo) // bar
|
||||
console.log(result.foo); // bar
|
||||
});
|
||||
|
||||
// use external time for verifying
|
||||
@@ -65,41 +70,44 @@ jwt.verify(token, 'shhhhh', { clockTimestamp: 1 }, function(err, decoded) {
|
||||
});
|
||||
|
||||
// invalid token
|
||||
jwt.verify(token, 'wrong-secret', function(err, decoded) {
|
||||
// err
|
||||
// decoded undefined
|
||||
jwt.verify(token, "wrong-secret", function(err, decoded) {
|
||||
// err
|
||||
// decoded undefined
|
||||
});
|
||||
|
||||
// verify a token asymmetric
|
||||
cert = fs.readFileSync('public.pem'); // get public key
|
||||
jwt.verify(token, cert, function (err, decoded) {
|
||||
const result = decoded as ITestObject
|
||||
cert = fs.readFileSync("public.pem"); // get public key
|
||||
jwt.verify(token, cert, function(err, decoded) {
|
||||
const result = decoded as ITestObject;
|
||||
|
||||
console.log(result.foo) // bar
|
||||
console.log(result.foo); // bar
|
||||
});
|
||||
|
||||
// verify audience
|
||||
cert = fs.readFileSync('public.pem'); // get public key
|
||||
jwt.verify(token, cert, { audience: 'urn:foo' }, function(err, decoded) {
|
||||
// if audience mismatch, err == invalid audience
|
||||
cert = fs.readFileSync("public.pem"); // get public key
|
||||
jwt.verify(token, cert, { audience: "urn:foo" }, function(err, decoded) {
|
||||
// if audience mismatch, err == invalid audience
|
||||
});
|
||||
|
||||
// verify issuer
|
||||
cert = fs.readFileSync('public.pem'); // get public key
|
||||
jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(err, decoded) {
|
||||
// if issuer mismatch, err == invalid issuer
|
||||
cert = fs.readFileSync("public.pem"); // get public key
|
||||
jwt.verify(token, cert, { audience: "urn:foo", issuer: "urn:issuer" }, function(
|
||||
err,
|
||||
decoded,
|
||||
) {
|
||||
// if issuer mismatch, err == invalid issuer
|
||||
});
|
||||
|
||||
// verify algorithm
|
||||
cert = fs.readFileSync('public.pem'); // get public key
|
||||
jwt.verify(token, cert, { algorithms: ['RS256'] }, function(err, decoded) {
|
||||
// if algorithm mismatch, err == invalid algorithm
|
||||
cert = fs.readFileSync("public.pem"); // get public key
|
||||
jwt.verify(token, cert, { algorithms: ["RS256"] }, function(err, decoded) {
|
||||
// if algorithm mismatch, err == invalid algorithm
|
||||
});
|
||||
|
||||
// verify without expiration check
|
||||
cert = fs.readFileSync('public.pem'); // get public key
|
||||
cert = fs.readFileSync("public.pem"); // get public key
|
||||
jwt.verify(token, cert, { ignoreExpiration: true }, function(err, decoded) {
|
||||
// if ignoreExpration == false and token is expired, err == expired token
|
||||
// if ignoreExpration == false and token is expired, err == expired token
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -110,6 +118,10 @@ var decoded = jwt.decode(token);
|
||||
|
||||
decoded = jwt.decode(token, { complete: false });
|
||||
|
||||
if (decoded !== null && typeof decoded === "object") {
|
||||
console.log(decoded.foo);
|
||||
}
|
||||
|
||||
decoded = jwt.decode(token, { json: false });
|
||||
|
||||
decoded = jwt.decode(token, { complete: false, json: false });
|
||||
|
||||
Vendored
+14
-1
@@ -5,6 +5,10 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
export interface ToCssOptions {
|
||||
indent?: number;
|
||||
}
|
||||
|
||||
export interface Rule {
|
||||
className: string;
|
||||
selector: string;
|
||||
@@ -62,7 +66,7 @@ export interface StyleSheet<T> {
|
||||
/**
|
||||
* Convert rules to a CSS string.
|
||||
*/
|
||||
toString(options?: { indent?: number }): string;
|
||||
toString(options?: ToCssOptions): string;
|
||||
}
|
||||
export type GenerateClassName<T> = (rule: Rule, sheet?: StyleSheet<T>) => string;
|
||||
export interface Style {
|
||||
@@ -96,6 +100,15 @@ export interface RuleOptions {
|
||||
index: number;
|
||||
className: string;
|
||||
}
|
||||
export declare class SheetsRegistry {
|
||||
constructor();
|
||||
registry: ReadonlyArray<StyleSheet<any>>;
|
||||
readonly index: number;
|
||||
add(sheet: StyleSheet<any>): void;
|
||||
reset(): void;
|
||||
remove(sheet: StyleSheet<any>): void;
|
||||
toString(options?: ToCssOptions): string;
|
||||
}
|
||||
declare class JSS {
|
||||
constructor(options?: Partial<JSSOptions>);
|
||||
createStyleSheet<T>(
|
||||
|
||||
+47
-12
@@ -2,7 +2,8 @@
|
||||
|
||||
import {
|
||||
create as createJSS,
|
||||
default as sharedInstance
|
||||
SheetsRegistry,
|
||||
default as sharedInstance,
|
||||
} from 'jss';
|
||||
|
||||
const jss = createJSS().setup({});
|
||||
@@ -21,28 +22,30 @@ const styleSheet = jss.createStyleSheet(
|
||||
{
|
||||
link: true,
|
||||
}
|
||||
).attach();
|
||||
);
|
||||
|
||||
styleSheet.classes.container; // $ExpectType string
|
||||
styleSheet.classes.ruleWithMockObservable; // $ExpectType string
|
||||
const attachedStyleSheet = styleSheet.attach();
|
||||
|
||||
const rule = styleSheet.addRule('dynamicRule', { color: 'indigo' });
|
||||
attachedStyleSheet.classes.container; // $ExpectType string
|
||||
attachedStyleSheet.classes.ruleWithMockObservable; // $ExpectType string
|
||||
|
||||
const rule = attachedStyleSheet.addRule('dynamicRule', { color: 'indigo' });
|
||||
rule.prop('border-radius', 5).prop('color'); // $ExpectType string
|
||||
styleSheet.classes.dynamicRule; // $ExpectType string
|
||||
attachedStyleSheet.classes.dynamicRule; // $ExpectType string
|
||||
|
||||
styleSheet.deleteRule('dynamicRule');
|
||||
attachedStyleSheet.deleteRule('dynamicRule');
|
||||
|
||||
// test that `addRule` supports the shorthand signature
|
||||
const dynamicRule = styleSheet.addRule({ color: 'red' });
|
||||
const dynamicRule = attachedStyleSheet.addRule({ color: 'red' });
|
||||
|
||||
const div = document.createElement('div');
|
||||
dynamicRule.applyTo(div);
|
||||
|
||||
const containerRule = styleSheet.getRule('container');
|
||||
const containerRule = attachedStyleSheet.getRule('container');
|
||||
const containerJSON = containerRule.toJSON();
|
||||
const css = styleSheet.toString();
|
||||
const css = attachedStyleSheet.toString();
|
||||
|
||||
styleSheet.addRules({
|
||||
attachedStyleSheet.addRules({
|
||||
rule1: {
|
||||
fontFamily: 'Roboto',
|
||||
color: '#FFFFFF',
|
||||
@@ -53,10 +56,42 @@ styleSheet.addRules({
|
||||
},
|
||||
});
|
||||
|
||||
styleSheet.detach();
|
||||
attachedStyleSheet.detach();
|
||||
|
||||
sharedInstance.createStyleSheet({
|
||||
container: {
|
||||
background: '#000099',
|
||||
}
|
||||
});
|
||||
|
||||
/* SheetsRegistry test */
|
||||
const sheetsRegistry = new SheetsRegistry();
|
||||
sheetsRegistry.add(styleSheet);
|
||||
|
||||
const secondStyleSheet = jss.createStyleSheet(
|
||||
{
|
||||
ruleWithMockObservable: {
|
||||
subscribe() {}
|
||||
},
|
||||
container2: {
|
||||
display: 'flex',
|
||||
width: 150,
|
||||
opacity: .8,
|
||||
},
|
||||
},
|
||||
{
|
||||
link: true,
|
||||
}
|
||||
);
|
||||
|
||||
sheetsRegistry.add(secondStyleSheet);
|
||||
sheetsRegistry.registry.length; // $ExpectType number
|
||||
sheetsRegistry.remove(secondStyleSheet);
|
||||
|
||||
sheetsRegistry.index; // $ExpectType number
|
||||
sheetsRegistry.index = 5; // $ExpectError
|
||||
sheetsRegistry.toString(); // $ExpectType string
|
||||
// With css options
|
||||
sheetsRegistry.toString({indent: 5}); // $ExpectType string
|
||||
|
||||
sheetsRegistry.reset();
|
||||
|
||||
Vendored
+2
-2
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/koajs/cors
|
||||
// Definitions by: Xavier Stouder <https://github.com/Xstoudi>, Izayoi Ko <https://github.com/izayoiko>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
import * as Koa from "koa";
|
||||
|
||||
@@ -11,7 +11,7 @@ export = cors;
|
||||
|
||||
declare namespace cors {
|
||||
interface Options {
|
||||
origin?: ((req: Koa.Request) => string) | string;
|
||||
origin?: ((ctx: Koa.Context) => string) | string;
|
||||
allowMethods?: string[] | string;
|
||||
exposeHeaders?: string[] | string;
|
||||
allowHeaders?: string[] | string;
|
||||
|
||||
Vendored
+2
@@ -153,6 +153,7 @@ declare namespace Knex {
|
||||
pluck(column: string): QueryBuilder;
|
||||
|
||||
insert(data: any, returning?: string | string[]): QueryBuilder;
|
||||
modify(callback: QueryCallback, ...args: any[]): QueryBuilder;
|
||||
update(data: any, returning?: string | string[]): QueryBuilder;
|
||||
update(columnName: string, value: Value, returning?: string | string[]): QueryBuilder;
|
||||
returning(column: string | string[]): QueryBuilder;
|
||||
@@ -403,6 +404,7 @@ declare namespace Knex {
|
||||
interface SchemaBuilder extends Bluebird<any> {
|
||||
createTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): SchemaBuilder;
|
||||
createTableIfNotExists(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): SchemaBuilder;
|
||||
alterTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): SchemaBuilder;
|
||||
renameTable(oldTableName: string, newTableName: string): Bluebird<void>;
|
||||
dropTable(tableName: string): SchemaBuilder;
|
||||
hasTable(tableName: string): Bluebird<boolean>;
|
||||
|
||||
@@ -763,6 +763,10 @@ knex.schema.createTable('users', function (table) {
|
||||
table.timestamps(true, true);
|
||||
});
|
||||
|
||||
knex.schema.alterTable('users', function (table) {
|
||||
table.string('role').nullable();
|
||||
});
|
||||
|
||||
knex.schema.renameTable('users', 'old_users');
|
||||
|
||||
knex.schema.dropTable('users');
|
||||
@@ -1026,6 +1030,9 @@ knex('users')
|
||||
}).unionAll(function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
}).modify(function(builder) {
|
||||
let self: Knex.QueryBuilder = this;
|
||||
self = builder;
|
||||
});
|
||||
|
||||
//
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user