Merge branch 'master' into d3-graphviz

This commit is contained in:
DomParfitt
2018-10-16 10:04:07 +01:00
committed by GitHub
341 changed files with 12654 additions and 4549 deletions
+1 -1
View File
@@ -3012,7 +3012,7 @@
/types/node/v7/ @parambirs @tellnes @WilcoBakker @eps1lon @KSXGitHub @Archcry
/types/node/v8/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @hoo29 @n-e @brunoscheufler @KSXGitHub @islishude @r3nya
/types/node/v9/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 @n-e @brunoscheufler @mohsen1 @KSXGitHub @a-tarasyuk @islishude @r3nya @eyqs
/types/node/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 @n-e @brunoscheufler @mohsen1 @KSXGitHub @a-tarasyuk @islishude @r3nya @ZaneHannanAU @ThomasdenH @eyqs @matthieusieben
/types/node/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 @n-e @brunoscheufler @mohsen1 @KSXGitHub @a-tarasyuk @islishude @r3nya @ZaneHannanAU @ThomasdenH @eyqs
/types/node-7z/ @erkie
/types/node-array-ext/ @Beng89
/types/node-cache/ @chrootsu @dthunell @useltmann
+4 -3
View File
@@ -533,9 +533,10 @@ AFRAME.registerComponent('audioanalyser-waveform', {
rings.forEach(function transformRing(ring: THREE.Line, index: number) {
var normLevel;
normLevel = levels[RINGCOUNT - index - 1] + 0.01; // Avoid scaling by 0.
(ring.material as THREE.LineBasicMaterial).color.setHSL(colors[index], 1, normLevel);
ring.material.linewidth = normLevel * 3;
ring.material.opacity = normLevel;
const lineMaterial = ring.material as THREE.LineBasicMaterial;
lineMaterial.color.setHSL(colors[index], 1, normLevel);
lineMaterial.linewidth = normLevel * 3;
lineMaterial.opacity = normLevel;
ring.scale.z = normLevel;
});
},
+1
View File
@@ -2,6 +2,7 @@
"extends": "dtslint/dt.json",
"rules": {
// All are TODOs
"no-any-union": false,
"no-empty-interface": false,
"prefer-const": false
}
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
+2 -1
View File
@@ -6,7 +6,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/apollographql/apollo-codegen
// Definitions by: Bradley Ayers <https://github.com/bradleyayers>, Maria Carrasco <https://github.com/kostspielig>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
import { Options } from 'graphql/utilities/schemaPrinter';
+19 -1
View File
@@ -7,7 +7,10 @@
export = apostrophe;
export as namespace apos;
declare function apostrophe(options: any, ...args: any[]): any;
declare function apostrophe(
options: apostrophe.AposConstructor,
...args: any[]
): any;
declare namespace apostrophe {
const moogBundle: {
@@ -15,6 +18,20 @@ declare namespace apostrophe {
modules: string[];
};
// Pass in custom modules as first argument
// second argument is additional custom options e.g. restApi exposed by apostrophe-headless
interface AposConstructor<M = {}, O = {}> {
afterInit?: () => void;
afterListen?: () => void;
initFailed?: (error: any) => void;
baseUrl?: string;
modules: { [K in AposCoreModules & M]?: AposModuleOptions | O };
prefix?: string;
root?: string;
rootDir?: string;
shortName: string;
}
const ui: {
globalBusy: (state: any) => any;
link: (
@@ -297,6 +314,7 @@ declare namespace apostrophe {
label: string;
fields: string[];
}[];
beforeConstruct?: (self: any, options: any) => any;
defer?: boolean;
filters?: {
projection?: {
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/arangodb/arangodb
// Definitions by: Alan Plum <https://github.com/pluma>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
/// <reference types="node" />
+1 -1
View File
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"lib": ["es6", "esnext.asynciterable"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
+15 -13
View File
@@ -7,29 +7,31 @@ export = A2MML;
declare var A2MML: ascii2mathml;
interface Options {
decimalMark?: string;
colSep?: string;
rowSep?: string;
display?: 'inline' | 'block';
dir?: 'ltr' | 'rtl';
bare?: boolean;
standalone?: boolean;
annotate?: boolean;
}
interface ascii2mathml {
/**
* Generates a function with default options set to convert
* ASCIIMath expression to MathML markup.
* @param options Options
*/
(options: Options): ascii2mathml;
(options: A2MML.Options): ascii2mathml;
/**
* Converts ASCIIMath expression to MathML markup.
* @param asciimath ASCIIMath expression
* @param options Options
*/
(asciimath: string, options?: Options): string;
(asciimath: string, options?: A2MML.Options): string;
}
declare namespace A2MML {
interface Options {
decimalMark?: string;
colSep?: string;
rowSep?: string;
display?: 'inline' | 'block';
dir?: 'ltr' | 'rtl';
bare?: boolean;
standalone?: boolean;
annotate?: boolean;
}
}
+4 -1
View File
@@ -4,6 +4,9 @@
"await-promise": [true, "CancellablePromise"],
"indent": [true, "spaces", 4],
"max-line-length": [true, 100],
"no-any": true
"no-any": true,
// TODOs
"no-declare-current-package": false
}
}
+1
View File
@@ -98,6 +98,7 @@ interface Auth0LockAuthOptions {
params?: Auth0LockAuthParamsOptions;
redirect?: boolean;
redirectUrl?: string;
responseMode?: string;
responseType?: string;
sso?: boolean;
audience?: string;
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
+3 -1
View File
@@ -19,7 +19,7 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), {
backgroundColor: "#000000",
borderWidth: 1,
label: "test",
data: [1]
data: [1, null, 3]
}
]
},
@@ -36,6 +36,7 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), {
tooltips: {
filter: data => Number(data.yLabel) > 0,
intersect: true,
mode: 'index',
itemSort: (a, b) => Math.random() - 0.5,
position: "average",
caretPadding: 2,
@@ -125,6 +126,7 @@ const chartConfig: Chart.ChartConfiguration = {
backgroundColor: '#37738353',
borderColor: '#37738353',
borderWidth: 3,
borderCapStyle: 'round',
fill: true
}]
},
+10 -8
View File
@@ -174,6 +174,8 @@ declare namespace Chart {
type PositionType = 'left' | 'right' | 'top' | 'bottom';
type InteractionMode = 'point' | 'nearest' | 'single' | 'label' | 'index' | 'x-axis' | 'dataset' | 'x' | 'y';
interface ChartArea {
top: number;
right: number;
@@ -185,10 +187,10 @@ declare namespace Chart {
text?: string;
fillStyle?: string;
hidden?: boolean;
lineCap?: string;
lineCap?: 'butt' | 'round' | 'square';
lineDash?: number[];
lineDashOffset?: number;
lineJoin?: string;
lineJoin?: 'bevel' | 'round' | 'miter';
lineWidth?: number;
strokeStyle?: string;
pointStyle?: PointStyle;
@@ -331,7 +333,7 @@ declare namespace Chart {
interface ChartTooltipOptions {
enabled?: boolean;
custom?(a: any): void;
mode?: string;
mode?: InteractionMode;
intersect?: boolean;
backgroundColor?: ChartColor;
titleFontFamily?: string;
@@ -373,7 +375,7 @@ declare namespace Chart {
type ChartTooltipPositioner = (elements: any[], eventPosition: Point) => Point;
interface ChartHoverOptions {
mode?: string;
mode?: InteractionMode;
animationDuration?: number;
intersect?: boolean;
onHover?(this: Chart, event: MouseEvent, activeElements: Array<{}>): any;
@@ -541,12 +543,12 @@ declare namespace Chart {
backgroundColor?: ChartColor | ChartColor[];
borderWidth?: number | number[];
borderColor?: ChartColor | ChartColor[];
borderCapStyle?: string;
borderCapStyle?: 'butt' | 'round' | 'square';
borderDash?: number[];
borderDashOffset?: number;
borderJoinStyle?: string;
borderJoinStyle?: 'bevel' | 'round' | 'miter';
borderSkipped?: PositionType;
data?: number[] | ChartPoint[];
data?: Array<number | null | undefined> | ChartPoint[];
fill?: boolean | number | string;
hoverBackgroundColor?: string | string[];
hoverBorderColor?: string | string[];
@@ -566,7 +568,7 @@ declare namespace Chart {
pointStyle?: PointStyle | HTMLImageElement | HTMLCanvasElement | Array<PointStyle | HTMLImageElement | HTMLCanvasElement>;
xAxisID?: string;
yAxisID?: string;
type?: string;
type?: ChartType | string;
hidden?: boolean;
hideInLegendAndTooltip?: boolean;
showLine?: boolean;
+51
View File
@@ -0,0 +1,51 @@
// Type definitions for CodeMirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: Nikolaj Kappler <https://github.com/nkappler>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// See docs https://codemirror.net/doc/manual.html#addon_panel
import * as CodeMirror from "codemirror";
declare module "codemirror" {
interface Panel {
/**Removes the panel from the editor */
clear(): void;
/**Notifies panel that height of DOM node has changed */
changed(height?: number): void;
}
interface ShowPanelOptions {
/**Controls the position of the newly added panel. The following values are recognized:
* `top` (default): Adds the panel at the very top.
* `after-top`: Adds the panel at the bottom of the top panels.
* `bottom`: Adds the panel at the very bottom.
* `before-bottom`: Adds the panel at the top of the bottom panels.
*/
position?: "top" | "after-top" | "bottom" | "before-bottom";
/**The new panel will be added before the given panel. */
before?: Panel;
/**The new panel will be added after the given panel. */
after?: Panel;
/**The new panel will replace the given panel. */
replace?: Panel;
/**Whether to scroll the editor to keep the text's vertical position stable, when adding a panel above it. Defaults to false. */
stable?: boolean;
}
interface Editor {
/**
* Places a DOM node above or below an editor and shrinks the editor to make room for the node.
* When using the `after`, `before` or `replace` options, if the panel doesn't exists or has been removed, the value of the `position` option will be used as a fallback.
* @param node the DOM node
* @param options optional options object
*/
addPanel(node: HTMLElement, options?: ShowPanelOptions): Panel;
}
}
declare module "codemirror/addon/display/panel" {
export = CodeMirror;
}
+17
View File
@@ -0,0 +1,17 @@
var cm: CodeMirror.Editor = CodeMirror(document.body);
var panel1 = cm.addPanel(document.body);
var panel2: CodeMirror.Panel = cm.addPanel(document.body, {
position: "top",
after: panel1,
before: panel1,
replace: panel1,
stable: true
});
panel2.changed();
panel2.changed(100);
panel2.clear();
+2
View File
@@ -20,11 +20,13 @@
"files": [
"index.d.ts",
"codemirror-matchbrackets.d.ts",
"codemirror-panel.d.ts",
"codemirror-runmode.d.ts",
"codemirror-showhint.d.ts",
"searchcursor.d.ts",
"test/index.ts",
"test/matchbrackets.ts",
"test/panel.ts",
"test/runmode.ts",
"test/searchcursor.ts",
"test/showhint.ts"
+3 -3
View File
@@ -1,4 +1,4 @@
import { CometD, Listener, Message } from "cometd";
import { CometD, Listener, Message, SubscriptionHandle } from "cometd";
const cometd = new CometD();
@@ -78,7 +78,7 @@ cometd.unsubscribe(subscription3, additionalInfoUnsubscribe, unsubscribeReply =>
// Subscribers versus Listeners
// ============================
let _reportListener: Listener | undefined;
let _reportListener: SubscriptionHandle | undefined;
cometd.addListener("/meta/handshake", message => {
// Only subscribe if the handshake is successful
@@ -106,7 +106,7 @@ cometd.addListener("/meta/handshake", message => {
// Dynamic Resubscription
// ======================
let _subscription: Listener | undefined;
let _subscription: SubscriptionHandle | undefined;
class Controller {
dynamicSubscribe = () => {
+18 -9
View File
@@ -1,6 +1,6 @@
// Type definitions for CometD 4.0
// Project: http://cometd.org
// Definitions by: Derek Cicerone <https://github.com/derekcicerone>, Daniel Perez Alvarez <https://github.com/unindented>
// Definitions by: Derek Cicerone <https://github.com/derekcicerone>, Daniel Perez Alvarez <https://github.com/unindented>, Alex Henry <https://github.com/alxHenry>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -75,6 +75,15 @@ export interface Message {
}
export type Listener = (message: Message) => void;
export type Callback = (data: any) => void;
export interface SubscriptionHandle {
id: number;
channel: string;
listener: boolean;
callback: Callback;
scope?: any;
}
export interface Extension {
incoming?: Listener;
@@ -202,14 +211,14 @@ export class CometD {
* @param callback the callback to call when a message is sent to the channel
* @returns the subscription handle to be passed to `removeListener`
*/
addListener(channel: string, callback: Listener): Listener;
addListener(channel: string, callback: Listener): SubscriptionHandle;
/**
* Removes the subscription obtained with a call to `addListener`.
*
* @param subscription the subscription to unsubscribe.
*/
removeListener(subscription: Listener): void;
removeListener(subscription: SubscriptionHandle): void;
/**
* Removes all listeners registered with `addListener` or `subscribe`.
@@ -234,7 +243,7 @@ export class CometD {
* @param subscribeCallback a function to be invoked when the subscription is acknowledged
* @return the subscription handle to be passed to `unsubscribe`
*/
subscribe(channel: string, callback: Listener, subscribeCallback?: Listener): Listener;
subscribe(channel: string, callback: Callback, subscribeCallback?: Listener): SubscriptionHandle;
/**
* Subscribes to the given channel, performing the given callback in the given scope when a
@@ -255,7 +264,7 @@ export class CometD {
* @param subscribeCallback a function to be invoked when the subscription is acknowledged
* @return the subscription handle to be passed to `unsubscribe`
*/
subscribe(channel: string, callback: Listener, subscribeProps: object, subscribeCallback?: Listener): Listener;
subscribe(channel: string, callback: Callback, subscribeProps: object, subscribeCallback?: Listener): SubscriptionHandle;
/**
* Unsubscribes the subscription obtained with a call to `subscribe`.
@@ -263,7 +272,7 @@ export class CometD {
* @param subscription the subscription to unsubscribe.
* @param unsubscribeCallback a function to be invoked when the unsubscription is acknowledged
*/
unsubscribe(subscription: Listener, unsubscribeCallback?: Listener): void;
unsubscribe(subscription: SubscriptionHandle, unsubscribeCallback?: Listener): void;
/**
* Unsubscribes the subscription obtained with a call to `subscribe`.
@@ -272,12 +281,12 @@ export class CometD {
* @param unsubscribeProps an object to be merged with the unsubscribe message
* @param unsubscribeCallback a function to be invoked when the unsubscription is acknowledged
*/
unsubscribe(subscription: Listener, unsubscribeProps: object, unsubscribeCallback?: Listener): void;
unsubscribe(subscription: SubscriptionHandle, unsubscribeProps: object, unsubscribeCallback?: Listener): void;
/**
* Resubscribes as necessary in case of a re-handshake.
*/
resubscribe(subscription: Listener, subscribeProps?: object): Listener;
resubscribe(subscription: SubscriptionHandle, subscribeProps?: object): SubscriptionHandle;
/**
* Removes all subscriptions added via `subscribe`, but does not remove the listeners added via
@@ -463,5 +472,5 @@ export class CometD {
* @param isListener whether it was a listener
* @param message the message received from the Bayeux server
*/
onListenerException: (exception: any, subscriptionHandle: Listener, isListener: boolean, message: string) => void;
onListenerException: (exception: any, subscriptionHandle: SubscriptionHandle, isListener: boolean, message: string) => void;
}
+6 -2
View File
@@ -596,6 +596,7 @@ numbersArray = d3Array.pairs(readonlyMergedArray, (a, b) => {
// getting a permutation of array elements
mergedArray = d3Array.permute(mergedArray, [1, 0, 2, 5, 3, 4, 6]);
mergedArray = d3Array.permute(readonlyMergedArray, [1, 0, 2, 5, 3, 4, 6]);
mergedArray = d3Array.permute(readonlyMergedArray, nums);
// Getting an ordered array with object properties
@@ -606,7 +607,10 @@ const testObject = {
more: [10, 30, 40]
};
const x: Array<number | string | Date | number[]> = d3Array.permute(testObject, ['name', 'val', 'when', 'more']);
const p1: Array<number | string | Date | number[]> = d3Array.permute(testObject, ['name', 'val', 'when', 'more']);
const p2: Array<Date | number[]> = d3Array.permute(testObject, ['when', 'more']);
// $ExpectError
const p3 = d3Array.permute(testObject, ['when', 'unknown']);
// range() ---------------------------------------------------------------------
@@ -913,7 +917,7 @@ mixedObject = binMixedObject_DateOrUndefined[0];
dateOrUndefined = binMixedObject_DateOrUndefined.x0;
dateOrUndefined = binMixedObject_DateOrUndefined.x1;
// Histogram Tresholds =========================================================
// Histogram Thresholds ========================================================
numbersArray = [-1, 0, 1, 1, 3, 20, 234];
typedArray = new Uint8Array(numbersArray);
+16 -7
View File
@@ -228,19 +228,23 @@ export function pairs<T>(array: ArrayLike<T>): Array<[T, T]>;
* Returns the empty array if the input array has fewer than two elements.
*
* @param array Array of input elements
* @param reducer A reducer function taking as input to adjecent elements of the input array and returning a reduced value.
* @param reducer A reducer function taking as input to adjacent elements of the input array and returning a reduced value.
*/
export function pairs<T, U>(array: ArrayLike<T>, reducer: (a: T, b: T) => U): U[];
/**
* Given the specified array, return an array corresponding to the list of indices in 'keys'.
* Returns a permutation of the specified array using the specified array of indexes.
* The returned array contains the corresponding element in array for each index in indexes, in order.
* For example, `permute(["a", "b", "c"], [1, 2, 0]) // ["b", "c", "a"]`
*/
export function permute<T>(array: { [key: number]: T }, keys: ArrayLike<number>): T[];
/**
* Given the specified object, return an array corresponding to the list of property names in 'keys'.
* Extract the values from an object into an array with a stable order. For example:
* `var object = {yield: 27, year: 1931, site: "University Farm"};`
* `d3.permute(object, ["site", "yield"]); // ["University Farm", 27]`
*/
export function permute<T>(object: { [key: string]: T }, keys: ArrayLike<string>): T[];
export function permute<T, K extends keyof T>(object: T, keys: ArrayLike<K>): Array<T[K]>;
/**
* Generates a 0-based numeric sequence. The output range does not include 'stop'.
@@ -347,6 +351,11 @@ export type ThresholdNumberArrayGenerator<Value extends number | undefined> =
export type ThresholdDateArrayGenerator<Value extends Date | undefined> =
(values: ArrayLike<Value>, min: Date, max: Date) => Value[];
/**
* @deprecated Use ThresholdNumberArrayGenerator or ThresholdDateArrayGenerator.
*/
export type ThresholdArrayGenerator = ThresholdNumberArrayGenerator<number>;
/**
* @deprecated Use `HistogramGeneratorNumber<Datum, Value>` for `number` values and `HistogramGeneratorDate<Datum, Value> for `Date` values.
*/
@@ -403,7 +412,7 @@ export interface HistogramGeneratorDate<Datum, Value extends Date | undefined> e
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param thresholds A function which accepts as arguments the array of materialized values, and
* optionally the domain minimum and maximum. The function calcutates and returns the array of values to be used as
* optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as
* thresholds in determining the bins.
*/
thresholds(thresholds: ThresholdDateArrayGenerator<Value>): this;
@@ -434,7 +443,7 @@ export interface HistogramGeneratorNumber<Datum, Value extends number | undefine
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param count A function which accepts as arguments the array of materialized values, and
* optionally the domain minimum and maximum. The function calcutates and returns the suggested
* optionally the domain minimum and maximum. The function calculates and returns the suggested
* number of bins.
*/
thresholds(count: ThresholdCountGenerator<Value>): this;
@@ -456,7 +465,7 @@ export interface HistogramGeneratorNumber<Datum, Value extends number | undefine
* and the last bin.x1 is always equal to the maximum domain value.
*
* @param thresholds A function which accepts as arguments the array of materialized values, and
* optionally the domain minimum and maximum. The function calcutates and returns the array of values to be used as
* optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as
* thresholds in determining the bins.
*/
thresholds(thresholds: ThresholdNumberArrayGenerator<Value>): this;
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
+3
View File
@@ -21,6 +21,9 @@ describe('Test', () => {
await element(by.id('scrollView')).swipe('down', 'fast');
await element(by.type('UIPickerView')).setColumnToValue(1, "6");
await expect(element(by.id('element').withAncestor(by.id('parent_element')))).toNotExist();
await expect(element(by.id('element').withDescendant(by.id('child_element')))).toNotExist();
await waitFor(element(by.id('element'))).toBeVisible().withTimeout(2000);
await device.pressBack();
await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down');
+24 -16
View File
@@ -1,6 +1,6 @@
// Type definitions for detox 7.3
// Type definitions for detox 9.0
// Project: https://github.com/wix/detox
// Definitions by: Tareq El-Masri <https://github.com/TareqElMasri>
// Definitions by: Tareq El-Masri <https://github.com/TareqElMasri>, Steve Chun <https://github.com/stevechun>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare const detox: Detox.Detox;
@@ -22,7 +22,7 @@ declare namespace Detox {
* await detox.init(config);
* });
*/
init(config: any, options: DetoxInitOptions): Promise<void>;
init(config: any, options?: DetoxInitOptions): Promise<void>;
/**
* Artifacts currently include only logs from the app process before each task
* @param args
@@ -157,18 +157,6 @@ declare namespace Detox {
interface Element {
(by: Matchers): DetoxAny;
/**
* Select by parent element
* @param parent
* @example await element(by.id('Grandson883').withAncestor(by.id('Son883')));
*/
withAncestor(parent: Element): DetoxAny;
/**
* Select by child element
* @param parent
* @example await element(by.id('Son883').withDescendant(by.id('Grandson883')));
*/
withDescendant(child: Element): DetoxAny;
/**
* Choose from multiple elements matching the same matcher using index
* @param index
@@ -177,6 +165,8 @@ declare namespace Detox {
atIndex(index: number): DetoxAny;
}
interface Matchers {
(by: Matchers): Matchers;
/**
* by.id will match an id that is given to the view via testID prop.
* @param id
@@ -209,6 +199,24 @@ declare namespace Detox {
* @example await element(by.traits(['button']));
*/
traits(traits: string[]): Matchers;
/**
* Find an element by a matcher with a parent matcher
* @param parentBy
* @example await element(by.id('Grandson883').withAncestor(by.id('Son883')));
*/
withAncestor(parentBy: Matchers): Matchers;
/**
* Find an element by a matcher with a child matcher
* @param childBy
* @example await element(by.id('Son883').withDescendant(by.id('Grandson883')));
*/
withDescendant(childBy: Matchers): Matchers;
/**
* Find an element by multiple matchers
* @param by
* @example await element(by.text('Product').and(by.id('product_name'));
*/
and(by: Matchers): Matchers;
}
interface Expect<R> {
(element: Element): Expect<any>;
@@ -275,7 +283,7 @@ declare namespace Detox {
withTimeout(millis: number): Promise<void>;
/**
* Performs the action repeatedly on the element until an expectation is met
* @param element
* @param by
* @example await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down');
*/
whileElement(by: Matchers): DetoxAny;
+1 -1
View File
@@ -6,7 +6,7 @@
*
* Copyright 2018, Dynamsoft Corporation
* Author: Dynamsoft Support Team
* Version: 13.4
* Version: 14.2
*/
declare enum EnumDWT_ConvertMode {
+4 -4
View File
@@ -1,4 +1,4 @@
// Type definitions for dwt 13.4
// Type definitions for dwt 14.2
// Project: http://www.dynamsoft.com/Products/WebTWAIN_Overview.aspx
// Definitions by: Xiao Ling <https://github.com/yushulx>
// Josh Hall <https://github.com/jbh>
@@ -14,7 +14,7 @@
*
* Copyright 2018, Dynamsoft Corporation
* Author: Dynamsoft Support Team
* Version: 13.4
* Version: 14.2
*/
/**
@@ -2889,12 +2889,12 @@ interface WebTwain {
* @return {number}
*/
GetImageYResolution(sImageIndex: number): number;
/**
* Return the runtime license info.
* @method WebTwain#GetLicenseInfo
*/
GetLicenseInfo(): { Domain: string, Detail: LicenseDetailItem[] };
GetLicenseInfo(optionalAsyncSuccessFunc?: (result: any) => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean;
/**
* Returns the index of the selected image.
+11 -11
View File
@@ -39,8 +39,8 @@ export class Client {
deleteScript(params: DeleteScriptParams, callback: (error: any, response: any) => void): void;
deleteTemplate(params: DeleteTemplateParams): Promise<any>;
deleteTemplate(params: DeleteTemplateParams, callback: (error: any, response: any) => void): void;
exists(params: ExistsParams): Promise<any>;
exists(params: ExistsParams, callback: (error: any, response: any, status?: any) => void): void;
exists(params: ExistsParams): Promise<boolean>;
exists(params: ExistsParams, callback: (error: any, response: boolean, status?: any) => void): void;
explain(params: ExplainParams): Promise<ExplainResponse>;
explain(params: ExplainParams, callback: (error: any, response: ExplainResponse) => void): void;
fieldStats(params: FieldStatsParams): Promise<FieldStatsResponse>;
@@ -443,7 +443,7 @@ export interface IndexDocumentParams<T> extends GenericParams {
waitForActiveShards?: string;
opType?: "index" | "create";
parent?: string;
refresh?: string;
refresh?: Refresh;
routing?: string;
timeout?: TimeSpan;
timestamp?: Date | number;
@@ -1036,14 +1036,14 @@ export class Indices {
deleteAlias(params: IndicesDeleteAliasParams): Promise<any>;
deleteTemplate(params: IndicesDeleteTemplateParams, callback: (error: any, response: any, status: any) => void): void;
deleteTemplate(params: IndicesDeleteTemplateParams): Promise<any>;
exists(params: IndicesExistsParams, callback: (error: any, response: any, status: any) => void): void;
exists(params: IndicesExistsParams): Promise<any>;
existsAlias(params: IndicesExistsAliasParams, callback: (error: any, response: any, status: any) => void): void;
existsAlias(params: IndicesExistsAliasParams): Promise<any>;
existsTemplate(params: IndicesExistsTemplateParams, callback: (error: any, response: any, status: any) => void): void;
existsTemplate(params: IndicesExistsTemplateParams): Promise<any>;
existsType(params: IndicesExistsTypeParams, callback: (error: any, response: any, status: any) => void): void;
existsType(params: IndicesExistsTypeParams): Promise<any>;
exists(params: IndicesExistsParams, callback: (error: any, response: boolean, status: any) => void): void;
exists(params: IndicesExistsParams): Promise<boolean>;
existsAlias(params: IndicesExistsAliasParams, callback: (error: any, response: boolean, status: any) => void): void;
existsAlias(params: IndicesExistsAliasParams): Promise<boolean>;
existsTemplate(params: IndicesExistsTemplateParams, callback: (error: any, response: boolean, status: any) => void): void;
existsTemplate(params: IndicesExistsTemplateParams): Promise<boolean>;
existsType(params: IndicesExistsTypeParams, callback: (error: any, response: boolean, status: any) => void): void;
existsType(params: IndicesExistsTypeParams): Promise<boolean>;
flush(params: IndicesFlushParams, callback: (error: any, response: any, status: any) => void): void;
flush(params: IndicesFlushParams): Promise<any>;
flushSynced(params: IndicesFlushSyncedParams, callback: (error: any, response: any, status: any) => void): void;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"electron": "^1.7.5"
"electron": "*"
}
}
+19 -6
View File
@@ -14,18 +14,31 @@
"../"
],
"paths": {
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/service": ["ember__service"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/controller": ["ember__controller"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"],
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"]
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+24 -2
View File
@@ -14,9 +14,31 @@
"../"
],
"paths": {
"@ember/service": ["ember__service"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"]
"@ember/object/*": ["ember__object/*"],
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+1 -1
View File
@@ -248,6 +248,6 @@ describe('rendering test', function() {
// render the component
await this.render(hbs`{{ x-foo value=value}}`);
chai.expect(this.element.querySelector('div>.value').textContent.trim()).to.equal('cat', 'The component shows the correct value');
chai.expect(this.element.querySelector('div>.value')!.textContent!.trim()).to.equal('cat', 'The component shows the correct value');
});
});
+24 -4
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
@@ -13,12 +14,31 @@
"../"
],
"paths": {
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"]
"@ember/object/*": ["ember__object/*"],
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+23 -2
View File
@@ -14,10 +14,31 @@
"../"
],
"paths": {
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"]
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+21 -4
View File
@@ -14,14 +14,31 @@
"../"
],
"paths": {
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"],
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"]
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+24 -4
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
@@ -13,12 +14,31 @@
"../"
],
"paths": {
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"]
"@ember/object/*": ["ember__object/*"],
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+1 -1
View File
@@ -3,7 +3,7 @@
// Definitions by: Dan Freeman <https://github.com/dfreeman>
// Mike North <https://github.com/mike-north>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
// TypeScript Version: 2.8
import Ember from 'ember';
+3 -2
View File
@@ -2,12 +2,13 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictFunctionTypes": false,
"baseUrl": "../../",
"typeRoots": [
"../../"
+22 -3
View File
@@ -14,12 +14,31 @@
"../"
],
"paths": {
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"]
"@ember/object/*": ["ember__object/*"],
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+20 -20
View File
@@ -15,31 +15,31 @@
"../"
],
"paths": {
"@ember/string": ["ember__string"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/service": ["ember__service"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/controller": ["ember__controller"],
"@ember/polyfills": ["ember__polyfills"]
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+3 -1
View File
@@ -21,8 +21,10 @@
"@ember/engine/*": ["ember__engine/*"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/service": ["ember__service"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"]
"@ember/application/*": ["ember__application/*"],
"@ember/controller": ["ember__controller"]
},
"types": [],
"noEmit": true,
+135 -123
View File
@@ -1,8 +1,8 @@
import Ember from 'ember';
import { assertType } from './lib/assert';
import CoreObject from '@ember/object/core';
/** Newable tests */
const co1 = new Ember.CoreObject();
const co1 = new CoreObject();
// TODO: Enable in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
// co1.concatenatedProperties; // $ExpectType string[]
@@ -12,7 +12,7 @@ co1.destroy(); // $ExpectType CoreObject
co1.toString(); // $ExpectType string
/** .create tests */
const co2 = Ember.CoreObject.create();
const co2 = CoreObject.create();
// TODO: Enable in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
// co2.concatenatedProperties; // $ExpectType string[]
co2.isDestroyed; // $ExpectType boolean
@@ -21,13 +21,13 @@ co2.destroy(); // $ExpectType CoreObject
co2.toString(); // $ExpectType string
/** .create tests w/ initial instance data passed in */
const co3 = Ember.CoreObject.create({ foo: '123', bar: 456 });
const co3 = CoreObject.create({ foo: '123', bar: 456 });
co3.foo; // $ExpectType string
co3.bar; // $ExpectType number
/** .extend with a zero-argument .create() */
const co4 = Ember.CoreObject.extend({
const co4 = CoreObject.extend({
foo: '123',
bar: 456,
baz(): [string, number] {
@@ -40,8 +40,8 @@ co4.bar; // $ExpectType number
co4.baz; // $ExpectType () => [string, number]
/** .extend with inconsistent arguments passed into .create() */
const class05 = Ember.CoreObject.extend({
foo: '123' as (string | boolean),
const class05 = CoreObject.extend({
foo: '123' as string | boolean,
bar: 456,
baz() {
return [this.foo, this.bar];
@@ -54,33 +54,36 @@ assertType<string>(c05b.foo); // $ExpectError
assertType<boolean>(c05c.foo); // $ExpectError
/** two .extend arguments with a zero-argument .create() */
const co6 = Ember.CoreObject.extend({
foo: '123',
bar: 456,
baz() {
return [this.foo, this.bar];
const co6 = CoreObject.extend(
{
foo: '123',
bar: 456,
baz() {
return [this.foo, this.bar];
},
func1() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.foo; // $ExpectType string
// this does not include stuff from later extend args
this.bee; // $ExpectError
}
},
func1() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.foo; // $ExpectType string
// this does not include stuff from later extend args
this.bee; // $ExpectError
{
foo: 99,
bee: 'honey',
func2() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
this.foo; // $ExpectType string & number
// this includes stuff from earlier extend-args
this.bar; // $ExpectType number
}
}
}, {
foo: 99,
bee: 'honey',
func2() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
this.foo; // $ExpectType string & number
// this includes stuff from earlier extend-args
this.bar; // $ExpectType number
}
}).create();
).create();
// TODO: enable in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
// assertType<string>(co6.foo); // $ExpectError
@@ -88,45 +91,49 @@ assertType<number>(co6.bar); // $ExpectType number
assertType<() => Array<string | number>>(co6.baz); // $ExpectType () => (string | number)[]
/** three .extend arguments with a zero-argument .create() */
const co7 = Ember.CoreObject.extend({
foo: '123',
bar: 456,
baz() {
return [this.foo, this.bar];
const co7 = CoreObject.extend(
{
foo: '123',
bar: 456,
baz() {
return [this.foo, this.bar];
},
func1() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.foo; // $ExpectType string
// this does not include stuff from later extend args
this.bee; // $ExpectError
}
},
func1() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.foo; // $ExpectType string
// this does not include stuff from later extend args
this.bee; // $ExpectError
{
foo: 99,
bee: 'honey',
func2() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
this.foo; // $ExpectType string & number
// this includes stuff from earlier extend-args
this.bar; // $ExpectType number
}
},
{
foo: '99',
money: 'in the banana stand',
func3() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.money; // $ExpectType string
// this includes stuff from earlier extend-args
this.bee; // $ExpectType string
this.bar; // $ExpectType number
}
}
}, {
foo: 99,
bee: 'honey',
func2() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
this.foo; // $ExpectType string & number
// this includes stuff from earlier extend-args
this.bar; // $ExpectType number
}
}, {
foo: '99',
money: 'in the banana stand',
func3() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.money; // $ExpectType string
// this includes stuff from earlier extend-args
this.bee; // $ExpectType string
this.bar; // $ExpectType number
}
}).create();
).create();
// TODO: enable in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
// assertType<number>(co7.foo); // $ExpectError
assertType<number>(co7.bar); // $ExpectType number
@@ -134,62 +141,67 @@ assertType<string>(co7.money); // $ExpectType string
assertType<() => Array<string | number>>(co7.baz); // $ExpectType () => (string | number)[]
/** four .extend arguments with a zero-argument .create() */
const co8 = Ember.CoreObject.extend({
foo: '123',
bar: 456,
baz() {
return [this.foo, this.bar];
const co8 = CoreObject.extend(
{
foo: '123',
bar: 456,
baz() {
return [this.foo, this.bar];
},
func1() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.foo; // $ExpectType string
// this does not include stuff from later extend args
this.bee; // $ExpectError
}
},
func1() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.foo; // $ExpectType string
// this does not include stuff from later extend args
this.bee; // $ExpectError
{
foo: 99,
bee: 'honey',
func2() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
this.foo; // $ExpectType string & number
// this includes stuff from earlier extend-args
this.bar; // $ExpectType number
// this does not include stuff from later extend args
this.money; // $ExpectError
}
},
{
foo: '99',
money: 'in the banana stand',
func3() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.money; // $ExpectType string
// this includes stuff from earlier extend-args
this.bee; // $ExpectType string
this.bar; // $ExpectType number
// this does not include stuff from later extend args
this.neighborhood; // $ExpectError
}
},
{
foo: '99',
neighborhood: 'sudden valley',
func4() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.neighborhood; // $ExpectType string
// this includes stuff from earlier extend-args
this.bee; // $ExpectType string
this.bar; // $ExpectType number
this.money; // $ExpectType string
}
}
}, {
foo: 99,
bee: 'honey',
func2() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
this.foo; // $ExpectType string & number
// this includes stuff from earlier extend-args
this.bar; // $ExpectType number
// this does not include stuff from later extend args
this.money; // $ExpectError
}
}, {
foo: '99',
money: 'in the banana stand',
func3() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.money; // $ExpectType string
// this includes stuff from earlier extend-args
this.bee; // $ExpectType string
this.bar; // $ExpectType number
// this does not include stuff from later extend args
this.neighborhood; // $ExpectError
}
}, {
foo: '99',
neighborhood: 'sudden valley',
func4() {
// this includes stuff from CoreObject
this.init; // $ExpectType () => void
// this includes stuff from this extend-arg
this.neighborhood; // $ExpectType string
// this includes stuff from earlier extend-args
this.bee; // $ExpectType string
this.bar; // $ExpectType number
this.money; // $ExpectType string
}
}).create();
).create();
// TODO: enable in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
// assertType<number>(co8.foo); // $ExpectError
@@ -1,5 +1,4 @@
import { assertType } from './lib/assert';
import Ember from 'ember';
import { PersonWithNumberName, Person } from './create';
Person.create({ firstName: 99 }); // $ExpectError
+20 -3
View File
@@ -17,14 +17,31 @@
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"],
"@ember/test-helpers": ["ember__test-helpers"]
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
}
},
"files": [
+22 -3
View File
@@ -15,12 +15,31 @@
"../"
],
"paths": {
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/application": ["ember__application"],
"@ember/application/*": ["ember__application/*"],
"@ember/array": ["ember__array"],
"@ember/array/*": ["ember__array/*"],
"@ember/component": ["ember__component"],
"@ember/component/*": ["ember__component/*"],
"@ember/controller": ["ember__controller"],
"@ember/debug": ["ember__debug"],
"@ember/debug/*": ["ember__debug/*"],
"@ember/engine": ["ember__engine"],
"@ember/engine/*": ["ember__engine/*"],
"@ember/error": ["ember__error"],
"@ember/object": ["ember__object"],
"@ember/object/*": ["ember__object/*"],
"@ember/polyfills": ["ember__polyfills"],
"@ember/routing": ["ember__routing"],
"@ember/routing/*": ["ember__routing/*"],
"@ember/runloop": ["ember__runloop"],
"@ember/runloop/*": ["ember__runloop/*"],
"@ember/service": ["ember__service"],
"@ember/string": ["ember__string"],
"@ember/test": ["ember__test"],
"@ember/test/*": ["ember__test/*"]
"@ember/test/*": ["ember__test/*"],
"@ember/utils": ["ember__utils"],
"@ember/utils/*": ["ember__utils/*"]
},
"types": [],
"noEmit": true,
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -7,7 +7,7 @@
// Margus Lamp <https://github.com/mlamp>
// Firede <https://github.com/firede>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
import { Request, Response } from "express";
import { DocumentNode, GraphQLSchema, GraphQLError } from "graphql";
+2 -1
View File
@@ -3,7 +3,8 @@
"module": "commonjs",
"target": "es2015",
"lib": [
"es6"
"es6",
"esnext.asynciterable"
],
"noImplicitAny": true,
"noImplicitThis": true,
+30 -2
View File
@@ -1,7 +1,35 @@
import { Request, Response } from "express";
import * as mung from "express-mung";
function redact(body: Object, req: Request, res: Response) {
    return body;
function redact(body: {}, req: Request, res: Response) {
return body;
}
mung.json(redact);
mung.json(redact, { mungError: true });
function redactAsync(body: {}, req: Request, res: Response) {
return Promise.resolve(body);
}
mung.jsonAsync(redactAsync);
mung.jsonAsync(redactAsync, { mungError: true });
function transformHeaders(req: Request, res: Response) {
return;
}
mung.headers(transformHeaders);
function transformHeadersAsync(req: Request, res: Response) {
return Promise.resolve();
}
mung.headersAsync(transformHeadersAsync);
function transformChunk(chunk: string | Buffer, encoding: string | null, req: Request, res: Response) {
return 'chunk';
}
mung.write(transformChunk);
mung.write(transformChunk, { mungError: true });
+30 -17
View File
@@ -1,4 +1,4 @@
// Type definitions for express-mung 0.4.2
// Type definitions for express-mung 0.5.1
// Project: https://github.com/richardschneider/express-mung
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -8,37 +8,50 @@
/// <reference types="node"/>
declare module "express-mung" {
import { Request, Response } from "express";
import * as http from "http";
import { Request, Response, RequestHandler } from "express";
type Transform = (body: {}, request: Request, response: Response) => any;
type TransformHeader = (body: http.IncomingMessage, request: Request, response: Response) => any;
type TransformAsync = (body: {}, request: Request, response: Response) => PromiseLike<any>;
type TransformHeader = (request: Request, response: Response) => any;
type TransformHeaderAsync = (request: Request, response: Response) => PromiseLike<any>;
type TransformChunk = (chunk: string | Buffer, encoding: string | null, request: Request, response: Response) => string | Buffer;
type Options = { mungError: boolean };
/**
* Transform the JSON body of the response.
* @param {Transform} fn A transformation function.
* @return {any} The body.
* @param {Options} [options] json options.
* @return {RequestHandler} Middleware to transform the body
*/
export function json(fn: Transform): any;
export function json(fn: Transform, options?: Options): RequestHandler;
/**
* Transform the JSON body of the response.
* @param {Transform} fn A transformation function.
* @return {any} The body.
* Asynchronously transform the JSON body of the response.
* @param {TransformAsync} fn A transformation function.
* @param {Options} [options] jsonAsync options.
* @return {RequestHandler} Middleware to transform the body
*/
export function jsonAsync(fn: Transform): PromiseLike<any>;
export function jsonAsync(fn: TransformAsync, options?: Options): RequestHandler;
/**
* Transform the HTTP headers of the response.
* @param {Transform} fn A transformation function.
* @return {any} The body.
* @param {TransformHeader} fn A transformation function.
* @return {RequestHandler} Middleware to transform the headers
*/
export function headers(fn: TransformHeader): any;
export function headers(fn: TransformHeader): RequestHandler;
/**
* Transform the HTTP headers of the response.
* @param {Transform} fn A transformation function.
* @return {any} The body.
* Asynchronously transform the HTTP headers of the response.
* @param {TransformHeaderAsync} fn A transformation function.
* @return {RequestHandler} Middleware to transform the headers
*/
export function headersAsync(fn: TransformHeader): PromiseLike<any>;
export function headersAsync(fn: TransformHeaderAsync): RequestHandler;
/**
* Transform chunks as they are written to the response
* @param {TransformChunk} fn A transformation function.
* @param {Options} [options] Write options.
* @return {RequestHandler} Middleware to transform chunks.
*/
export function write(fn: TransformChunk, options?: Options): RequestHandler;
}
+2 -2
View File
@@ -6,7 +6,7 @@
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
@@ -20,4 +20,4 @@
"index.d.ts",
"express-mung-tests.ts"
]
}
}
+22
View File
@@ -0,0 +1,22 @@
import express = require('express');
import ntlm = require('express-ntlm');
const app = express();
app.use(ntlm({
debug() {
const args = Array.prototype.slice.apply(arguments);
console.log.apply(null, args);
},
domain: 'MYDOMAIN',
domaincontroller: 'ldap://myad.example',
// use different port (default: 389)
// domaincontroller: 'ldap://myad.example:3899',
}));
app.all('*', (request, response) => {
response.end(JSON.stringify(request.ntlm)); // {"DomainName":"MYDOMAIN","UserName":"MYUSER","Workstation":"MYWORKSTATION"}
});
app.listen(80);
+40
View File
@@ -0,0 +1,40 @@
// Type definitions for express-ntlm 2.3
// Project: https://github.com/einfallstoll/express-ntlm
// Definitions by: Emily Marigold Klassen <https://github.com/forivall>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { ConnectionOptions } from 'tls';
import { Handler } from 'express';
declare function expressNtlm(options?: expressNtlm.Options): Handler;
declare namespace expressNtlm {
interface Options {
prefix?: string;
badrequest?: Handler;
internalservererror?: Handler;
forbidden?: Handler;
unauthorized?: Handler;
domain?: string;
domaincontroller?: string;
tlsOptions?: ConnectionOptions;
debug?(prefix: string, message: string): void;
}
interface RequestNtlm {
DomainName?: string;
UserName?: string;
Workstation?: string;
}
}
declare global {
namespace Express {
interface Request {
ntlm?: expressNtlm.RequestNtlm;
}
}
}
export = expressNtlm;
+23
View File
@@ -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",
"express-ntlm-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }
@@ -1,16 +1,22 @@
import * as express from 'express';
import expressSitemapXml from 'express-sitemap-xml';
import expressSitemapXml, { LeafObject } from 'express-sitemap-xml';
const urls = ['/page1', '/page2'];
const page2Leaf: LeafObject = {
changeFreq: 'weekly',
lastMod: new Date(),
url: '/page2'
};
const leaves = ['/page1', page2Leaf];
const base = 'http://example.com';
const getUrls = () => urls;
const getUrlsPromise = () => Promise.resolve(urls);
const getLeaves = () => leaves;
const getLeavesPromise = () => Promise.resolve(leaves);
expressSitemapXml.buildSitemaps(urls, base).then(sitemap => typeof sitemap === 'object');
expressSitemapXml.buildSitemaps(leaves, base).then(sitemap => typeof sitemap === 'object');
const sitemap1 = expressSitemapXml(getUrls, base);
const sitemap2 = expressSitemapXml(getUrlsPromise, base);
const sitemap1 = expressSitemapXml(getLeaves, base);
const sitemap2 = expressSitemapXml(getLeavesPromise, base);
express().use(sitemap1);
express().use(sitemap2);
+12 -4
View File
@@ -6,14 +6,22 @@
import * as express from 'express';
export interface Sitemap {
[url: string]: string;
export interface LeafObject {
changeFreq?: string;
lastMod?: string | Date;
url: string;
}
declare function expressSitemapXml(getUrls: (() => (string[] | Promise<string[]>)), base: string): express.RequestHandler;
export type SitemapLeaf = string | LeafObject;
export interface Sitemap {
[leaf: string]: string;
}
declare function expressSitemapXml(getUrls: (() => (SitemapLeaf[] | Promise<SitemapLeaf[]>)), base: string): express.RequestHandler;
declare namespace expressSitemapXml {
function buildSitemaps(urls: string[], base: string): Promise<Sitemap>;
function buildSitemaps(urls: SitemapLeaf[], base: string): Promise<Sitemap>;
}
export default expressSitemapXml;
+3 -3
View File
@@ -5890,7 +5890,7 @@ declare namespace browser.contextMenus {
/** A list of all contexts that apply to the menu. */
contexts: ContextType[];
editable: boolean;
mediaType: string;
mediaType?: string;
linkUrl?: string;
linkText?: string;
srcUrl?: string;
@@ -6131,7 +6131,7 @@ declare namespace browser.menus {
/** A list of all contexts that apply to the menu. */
contexts: ContextType[];
editable: boolean;
mediaType: string;
mediaType?: string;
linkUrl?: string;
linkText?: string;
srcUrl?: string;
@@ -6915,7 +6915,7 @@ declare namespace browser.tabs {
type _TabsOnUpdatedEvent<T = (tabId: number, changeInfo: {
/** The tab's new attention state. */
attention: boolean;
attention?: boolean;
/** The tab's new audible state. */
audible?: boolean;
/** True while the tab is not loaded with content. */
+19
View File
@@ -0,0 +1,19 @@
import { createClient } from '@google/maps';
const client = createClient({
key: 'my-google-maps-api-key',
language: 'ja',
// tslint:disable-next-line
Promise: Promise,
});
client
.geocode({ address: 'Leaning Tower of Pisa' })
.asPromise()
.then(response => {
response.json.results.forEach(result => {
console.log(
result.geometry.location
);
});
});
+3439
View File
File diff suppressed because it is too large Load Diff
+29
View File
@@ -0,0 +1,29 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"paths": {
"@google/maps": [
"google__maps"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"google__maps-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}
+2
View File
@@ -2613,6 +2613,7 @@ declare namespace google.maps {
strictBounds?: boolean;
types?: string[];
type?: string;
fields?: string[];
}
export interface AutocompletePrediction {
@@ -2727,6 +2728,7 @@ declare namespace google.maps {
export interface PlaceResult {
address_components: GeocoderAddressComponent[];
adr_address: string;
aspects: PlaceAspectRating[];
formatted_address: string;
formatted_phone_number: string;
geometry: PlaceGeometry;
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/tjmehta/graphql-date
// Definitions by: Eric Naeseth <https://github.com/enaeseth>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
import { GraphQLScalarType } from 'graphql';
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"esnext.asynciterable"
],
"noImplicitAny": true,
"noImplicitThis": true,
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"esnext.asynciterable"
],
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/excitement-engineer/graphql-iso-date
// Definitions by: Jason Waldrip <https://github.com/jwaldrip>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
import { GraphQLScalarType } from "graphql";
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"esnext.asynciterable"
],
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -2,7 +2,7 @@
// 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
// TypeScript Version: 2.6
import { GraphQLResolveInfo } from "graphql";
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"esnext.asynciterable"
],
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -2,6 +2,6 @@
// Project: https://github.com/ivome/graphql-query-complexity
// Definitions by: Abhik Mitra <https://github.com/abhikmitra>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
import createQueryComplexityValidator from "./dist";
export default createQueryComplexityValidator;
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"esnext.asynciterable"
],
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/graphql/graphql-relay-js
// Definitions by: Arvitaly <https://github.com/arvitaly>, nitintutlani <https://github.com/nitintutlani>, Grelinfo <https://github.com/Grelinfo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
import {
GraphQLBoolean,
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"esnext.asynciterable"
],
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/calebmer/graphql-resolve-batch#readme
// Definitions by: Rutger Hendrickx <https://github.com/nayni>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
import { GraphQLResolveInfo } from 'graphql';
+1 -1
View File
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"lib": ["es6", "esnext.asynciterable"],
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/taion/graphql-type-json#readme
// Definitions by: Pavel Ivanov <https://github.com/schfkt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
import { GraphQLScalarType } from "graphql";
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"esnext.asynciterable"
],
"noImplicitAny": true,
"noImplicitThis": true,
+1 -1
View File
@@ -17,7 +17,7 @@
// Curtis Layne <https://github.com/clayne11>
// Jonathan Cardoso <https://github.com/JCMais>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.6
// The primary entry point into fulfilling a GraphQL request.
export { graphql, graphqlSync, GraphQLArgs } from "./graphql";
+20 -1
View File
@@ -1 +1,20 @@
{ "extends": "dtslint/dt.json" }
{
"extends": "dtslint/dt.json",
"rules": {
// All are TODOs
"array-type": false,
"interface-over-type-literal": false,
"jsdoc-format": false,
"no-any-union": false,
"no-consecutive-blank-lines": false,
"no-duplicate-imports": false,
"no-empty-interface": false,
"no-redundant-undefined": false,
"no-unnecessary-generics": false,
"semicolon": false,
"strict-export-declare-modifiers": false,
"unified-signatures": false,
"use-default-type-parameter": false,
"void-return": false
}
}
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/sindresorhus/gulp-filter
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
+1 -4
View File
@@ -14,10 +14,7 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"uglify-js": ["uglify-js/v2"]
}
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/jamesknelson/gulp-rev-replace
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
+1 -6
View File
@@ -14,12 +14,7 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"uglify-js": [
"uglify-js/v2"
]
}
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
+4 -3
View File
@@ -3,6 +3,7 @@
// Definitions by: Christopher Haws <https://github.com/ChristopherHaws>
// Leonard Thieu <https://github.com/leonard-thieu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node"/>
@@ -13,17 +14,17 @@ declare namespace GulpUglify {
/**
* Pass false to skip mangling names.
*/
mangle?: boolean;
mangle?: UglifyJS.MangleOptions | boolean;
/**
* Pass if you wish to specify additional output options. The defaults are optimized for best compression.
*/
output?: UglifyJS.BeautifierOptions;
output?: UglifyJS.OutputOptions;
/**
* Pass an object to specify custom compressor options. Pass false to skip compression completely.
*/
compress?: UglifyJS.CompressorOptions | boolean;
compress?: UglifyJS.CompressOptions | boolean;
}
}
+1 -6
View File
@@ -14,12 +14,7 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"uglify-js": [
"uglify-js/v2"
]
}
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/jonkemp/gulp-useref
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
+1 -4
View File
@@ -14,10 +14,7 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"uglify-js": ["uglify-js/v2"]
}
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
+9 -9
View File
@@ -580,43 +580,43 @@ declare namespace Highcharts {
* @default rgba(0, 0, 0, 0.75)
* @since 6.0.0
*/
fill: string;
fill?: string;
/**
* The height of the shape.
* @default undefined
* @since 6.0.0
*/
height: number;
height?: number;
/**
* The radius of the shape.
* @default 0
* @since 6.0.0
*/
r: number;
r?: number;
/**
* The color of the shape's stroke.
* @default rgba(0, 0, 0, 0.75)
* @since 6.0.0
*/
stroke: string;
stroke?: string;
/**
* The pixel stroke width of the shape.
* @default 1
* @since 6.0.0
*/
strokeWidth: number;
strokeWidth?: number;
/**
* The type of the shape, e.g. circle or rectangle.
* @default "rect"
* @since 6.0.0
*/
type: "circle" | "path" | "rect";
type?: "circle" | "path" | "rect";
/**
* The width of the shape.
* @default undefined
* @since 6.0.0
*/
width: number;
width?: number;
}
interface AnnotationsShape extends AnnotationsShapeOptions {
@@ -625,13 +625,13 @@ declare namespace Highcharts {
* @default undefined
* @since 6.0.0
*/
markerEnd: string;
markerEnd?: string;
/**
* Id of the marker which will be drawn at the final vertex of the path. Custom markers can be defined in defs property.
* @default undefined
* @since 6.0.0
*/
markerStart: string;
markerStart?: string;
/**
* This option defines the point to which the shape will be connected.
* It can be either the point which exists in the series - it is referenced by the point's id
+3 -3
View File
@@ -1,4 +1,4 @@
import { History, Location } from './index';
import { History, Location, LocationState } from './index';
import { getConfirmation } from './DOMUtils';
export interface MemoryHistoryBuildOptions {
@@ -8,9 +8,9 @@ export interface MemoryHistoryBuildOptions {
keyLength?: number;
}
export interface MemoryHistory extends History {
export interface MemoryHistory<HistoryLocationState = LocationState> extends History<HistoryLocationState> {
index: number;
entries: Location[];
entries: Location<HistoryLocationState>[];
canGo(n: number): boolean;
}
+3 -3
View File
@@ -1,4 +1,4 @@
import { createBrowserHistory, createMemoryHistory, createHashHistory, createLocation, Location } from 'history';
import { createBrowserHistory, createMemoryHistory, createHashHistory, createLocation, Location, History, MemoryHistory } from 'history';
import * as LocationUtils from 'history/LocationUtils';
import * as PathUtils from 'history/PathUtils';
import * as DOMUtils from 'history/DOMUtils';
@@ -7,7 +7,7 @@ import * as ExecutionEnvironment from 'history/ExecutionEnvironment';
let input = { value: "" };
{
let history = createBrowserHistory();
let history: History<{some: 'state'}> = createBrowserHistory();
// Listen for changes to the current location. The
// listener is called once immediately.
@@ -43,7 +43,7 @@ let input = { value: "" };
}
{
let history = createMemoryHistory();
let history: MemoryHistory<{the: 'state'}> = createMemoryHistory();
// Pushing a path string.
history.push('/the/path');
+7 -7
View File
@@ -8,20 +8,20 @@ export as namespace History;
export type Action = 'PUSH' | 'POP' | 'REPLACE';
export type UnregisterCallback = () => void;
export interface History {
export interface History<HistoryLocationState = LocationState> {
length: number;
action: Action;
location: Location;
push(path: Path, state?: LocationState): void;
push(location: LocationDescriptorObject): void;
replace(path: Path, state?: LocationState): void;
replace(location: LocationDescriptorObject): void;
location: Location<HistoryLocationState>;
push(path: Path, state?: HistoryLocationState): void;
push(location: LocationDescriptorObject<HistoryLocationState>): void;
replace(path: Path, state?: HistoryLocationState): void;
replace(location: LocationDescriptorObject<HistoryLocationState>): void;
go(n: number): void;
goBack(): void;
goForward(): void;
block(prompt?: boolean | string | TransitionPromptHook): UnregisterCallback;
listen(listener: LocationListener): UnregisterCallback;
createHref(location: LocationDescriptorObject): Href;
createHref(location: LocationDescriptorObject<HistoryLocationState>): Href;
}
export interface Location<S = LocationState> {
@@ -0,0 +1,73 @@
// Copyright (c) 2018 Brannon Dorsey <brannon@brannondorsey.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
import * as express from 'express';
import * as hostValidation from 'host-validation';
const app = express();
// allow development hosts, a domain name, and a regex for all subdomains
// host can accept strings or regular expressions
app.use(hostValidation({ hosts: ['127.0.0.1:3000',
'localhost:3000',
'mydomain.com',
/.*\.mydomain\.com/] }));
// referer headers can accept strings or regular expressions
app.use(hostValidation({ referers: ['http://trusted-site.com/login.php',
/^http:\/\/othersite\.com\/login\/.*/] }));
// only accept POSTs from HTTPS referrers
app.use(hostValidation({ referers: [/^https:\/\//]}));
// you can include both host and referer values in the config
// by default, only requests that match BOTH Host and Referer values will be allowed
app.use(hostValidation({ hosts: ['trusted-host.com'],
referers: ['https://trusted-host.com/login.php'] }));
// you can use the { mode: 'either' } value in the config accept requests that match
// either the hosts or the referers requirements. Accepted values for mode include
// 'both' and 'either'. The default value is 'both' if none is specified.
app.use(hostValidation({ hosts: ['trusted-host.com'],
referers: ['https://trusted-host.com/login.php'],
mode: 'either' }));
// route-specific rules can be specified like any Express.js middleware
app.use('/login', hostValidation({ hosts: ['trusted-host.com'] }));
app.use('/from-twitter', hostValidation({ referers: [/^https:\/\/twitter.com\//] }));
// Add a custom error handler that's run when host or referer validation fails.
// This function overwrites the default behavior of responding to failed requests
// with a 403 Forbidden error.
app.use('/brew-tea', hostValidation({
hosts: ['office-teapot'],
fail: (req, res, next) => {
// send a 418 "I'm a Teapot" Error
res.status(418).send('I\'m the office teapot. Refer to me only as such.');
}
}));
app.get('/', (req, res) => {
res.send('Hello trusted client, thanks for including 127.0.0.1 in your Host header.');
});
app.listen(3000, () => {
console.log('server allowing HTTP requests from 127.0.0.1 on port 3000');
});
+21
View File
@@ -0,0 +1,21 @@
// Type definitions for host-validation 2.0
// Project: https://github.com/brannondorsey/host-validation
// Definitions by: Rich Liu <https://github.com/dintopple>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Request, Response, NextFunction } from 'express';
declare namespace hostValidation {
interface config {
hosts?: Array<string|RegExp>;
referers?: Array<string|RegExp>;
mode?: 'both' | 'either';
fail?(req: Request, res: Response, next: NextFunction): void;
}
}
declare function hostValidation(opts: hostValidation.config):
(req: Request, res: Response, next: NextFunction) => void;
export = hostValidation;
+23
View File
@@ -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",
"host-validation-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }
+23
View File
@@ -5,6 +5,7 @@
// Giedrius Grabauskas <https://github.com/GiedriusGrabauskas>
// Silas Rech <https://github.com/lenovouser>
// Philipp Katz <https://github.com/qqilihq>
// Milan Konir <https://github.com/butchyyyy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -385,6 +386,12 @@ declare namespace i18next {
* Compatibility JSON version
*/
compatibilityJSON?: string;
/**
* options for i18n nessage format - check documentation of plugin
* @default undefined
*/
i18nFormat?: object;
}
// Add an indexer to assure that interpolation arguments can be passed
@@ -466,6 +473,17 @@ declare namespace i18next {
[key: string]: any;
}
interface Services {
backendConnector: any;
i18nFormat: any;
interpolator: any;
languageDetector: any;
languageUtils: any;
logger: any;
pluralResolver: any;
resourceStore: Resource;
}
interface i18n {
/**
* The default export of the i18next module is an i18next instance ready to be initialized by calling init.
@@ -485,6 +503,11 @@ declare namespace i18next {
*/
use(module: any): i18n;
/**
* Internal container for all used plugins and implmentation details like languageUtils, pluralResolvers, etc.
*/
services: Services;
/**
* Please have a look at the translation functions like interpolation, formatting and plurals for more details on using it.
*/
+1 -1
View File
@@ -2,7 +2,7 @@
// Project: https://github.com/intercom/intercom-node
// Definitions by: Jinesh Shah <https://github.com/jineshshah36>, Josef Hornych <https://github.com/peping>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
// TypeScript Version: 2.2
/// <reference types="node" />
import { List as UserList, User, UserIdentifier } from './User';
+15 -1
View File
@@ -1 +1,15 @@
{ "extends": "dtslint/dt.json" }
{
"extends": "dtslint/dt.json",
"rules": {
// All are TODOs
"array-type": false,
"comment-format": false,
"eofline": false,
"no-consecutive-blank-lines": false,
"no-padding": false,
"no-trailing-whitespace": false,
"semicolon": false,
"strict-export-declare-modifiers": false,
"trim-file": false
}
}

Some files were not shown because too many files have changed in this diff Show More