mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge Update
This commit is contained in:
Vendored
+4
@@ -30,6 +30,10 @@ declare module 'angular' {
|
||||
* Latency Threshold
|
||||
*/
|
||||
latencyThreshold?: number;
|
||||
/**
|
||||
* HTML element selector of parent
|
||||
*/
|
||||
parentSelector?: string;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
@@ -214,6 +214,7 @@ declare module 'angular' {
|
||||
contrastDefaultColor?: string;
|
||||
contrastDarkColors?: string | string[];
|
||||
contrastLightColors?: string | string[];
|
||||
contrastStrongLightColors?: string|string[];
|
||||
}
|
||||
|
||||
interface IThemeHues {
|
||||
|
||||
@@ -292,6 +292,14 @@ function RegionTests() {
|
||||
|
||||
}
|
||||
|
||||
function ViewTests() {
|
||||
const v = new MyView(new MyModel());
|
||||
const isDestroyed: boolean = v.isDestroyed();
|
||||
const isRendered: boolean = v.isRendered();
|
||||
const isAttached: boolean = v.isAttached();
|
||||
const vv: Marionette.View<Backbone.Model> = v.delegateEntityEvents();
|
||||
}
|
||||
|
||||
function CollectionViewTests() {
|
||||
var cv = new MyCollectionView();
|
||||
cv.collection.add(new MyModel());
|
||||
|
||||
Vendored
+4
-1
@@ -856,7 +856,10 @@ declare namespace Marionette {
|
||||
/**
|
||||
* Internal properties extended in Marionette.View.
|
||||
*/
|
||||
isDestroyed: boolean;
|
||||
isDestroyed(): boolean;
|
||||
isRendered(): boolean;
|
||||
isAttached(): boolean;
|
||||
delegateEntityEvents(): View<TModel>;
|
||||
supportsRenderLifecycle: boolean;
|
||||
supportsDestroyLifecycle: boolean;
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -178,7 +178,7 @@ declare namespace CodeMirror {
|
||||
/** Remove a CSS class from a line.line can be a line handle or number.
|
||||
where should be one of "text", "background", or "wrap"(see addLineClass).
|
||||
class can be left off to remove all classes for the specified node, or be a string to remove only a specific class. */
|
||||
removeLineClass(line: any, where: string, class_: string): CodeMirror.LineHandle;
|
||||
removeLineClass(line: any, where: string, class_?: string): CodeMirror.LineHandle;
|
||||
|
||||
/**
|
||||
* Compute the line at the given pixel height.
|
||||
|
||||
@@ -88,6 +88,12 @@ circleDrag = circleDrag
|
||||
|
||||
containerAccessor = circleDrag.container();
|
||||
|
||||
// clickDistance(...) ---------------------------------------------------------
|
||||
|
||||
circleDrag = circleDrag.clickDistance(5);
|
||||
|
||||
const distance: number = circleDrag.clickDistance();
|
||||
|
||||
// set and get filter ---------------------------------------------------------
|
||||
|
||||
let filterFn: (this: SVGCircleElement, datum: CircleDatum, index: number, group: SVGCircleElement[] | NodeListOf<SVGCircleElement>) => boolean;
|
||||
|
||||
Vendored
+16
-2
@@ -1,9 +1,9 @@
|
||||
// Type definitions for D3JS d3-drag module 1.0
|
||||
// Type definitions for D3JS d3-drag module 1.1
|
||||
// Project: https://github.com/d3/d3-drag/
|
||||
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Last module patch version validated against: 1.0.2
|
||||
// Last module patch version validated against: 1.1.0
|
||||
|
||||
import { ArrayLike, Selection, ValueFn } from 'd3-selection';
|
||||
|
||||
@@ -164,6 +164,20 @@ export interface DragBehavior<GElement extends DraggedElementBaseType, Datum, Su
|
||||
*/
|
||||
subject(accessor: ValueFn<GElement, Datum, Subject>): this;
|
||||
|
||||
/**
|
||||
* Return the current click distance threshold, which defaults to zero.
|
||||
*/
|
||||
clickDistance(): number;
|
||||
/**
|
||||
* Set the maximum distance that the mouse can move between mousedown and mouseup that will trigger
|
||||
* a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to
|
||||
* distance from its position on mousedown, the click event follwing mouseup will be suppressed.
|
||||
*
|
||||
* @param distance The distance threshold between mousedown and mouseup measured in client coordinates (event.clientX and event.clientY).
|
||||
* The default is zero.
|
||||
*/
|
||||
clickDistance(distance: number): this;
|
||||
|
||||
/**
|
||||
* Return the first currently-assigned listener matching the specified typenames, if any.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import * as d3Random from 'd3-random';
|
||||
|
||||
import * as seedrandom from 'seedrandom';
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Preparatory Steps
|
||||
@@ -19,40 +19,70 @@ let randomNumberGenerator: () => number;
|
||||
// randomUniform
|
||||
// ------------------------------------------------------------
|
||||
|
||||
randomNumberGenerator = d3Random.randomUniform();
|
||||
randomNumberGenerator = d3Random.randomUniform(0.2);
|
||||
randomNumberGenerator = d3Random.randomUniform(0.2, 5);
|
||||
let prngUniform: d3Random.RandomUniform;
|
||||
|
||||
prngUniform = d3Random.randomUniform;
|
||||
prngUniform = d3Random.randomUniform.source(seedrandom("Schroedinger's flea."));
|
||||
|
||||
randomNumberGenerator = prngUniform();
|
||||
randomNumberGenerator = prngUniform(0.2);
|
||||
randomNumberGenerator = prngUniform(0.2, 5);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// randomNormal
|
||||
// ------------------------------------------------------------
|
||||
|
||||
randomNumberGenerator = d3Random.randomNormal();
|
||||
randomNumberGenerator = d3Random.randomNormal(3);
|
||||
randomNumberGenerator = d3Random.randomNormal(3, 4);
|
||||
let prngNormal: d3Random.RandomNormal;
|
||||
|
||||
prngNormal = d3Random.randomNormal;
|
||||
prngNormal = d3Random.randomNormal.source(seedrandom("Schroedinger's flea."));
|
||||
|
||||
randomNumberGenerator = prngNormal();
|
||||
randomNumberGenerator = prngNormal(3);
|
||||
randomNumberGenerator = prngNormal(3, 4);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// randomLogNormal
|
||||
// ------------------------------------------------------------
|
||||
|
||||
randomNumberGenerator = d3Random.randomLogNormal();
|
||||
randomNumberGenerator = d3Random.randomLogNormal(3);
|
||||
randomNumberGenerator = d3Random.randomLogNormal(3, 4);
|
||||
let prngLogNormal: d3Random.RandomLogNormal;
|
||||
|
||||
prngLogNormal = d3Random.randomLogNormal;
|
||||
prngLogNormal = d3Random.randomLogNormal.source(seedrandom("Schroedinger's flea."));
|
||||
|
||||
randomNumberGenerator = prngLogNormal();
|
||||
randomNumberGenerator = prngLogNormal(3);
|
||||
randomNumberGenerator = prngLogNormal(3, 4);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// randomBates
|
||||
// ------------------------------------------------------------
|
||||
|
||||
randomNumberGenerator = d3Random.randomBates(3);
|
||||
let prngBates: d3Random.RandomBates;
|
||||
|
||||
prngBates = d3Random.randomBates;
|
||||
prngBates = d3Random.randomBates.source(seedrandom("Schroedinger's flea."));
|
||||
|
||||
randomNumberGenerator = prngBates(3);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// randomIrwinHall
|
||||
// ------------------------------------------------------------
|
||||
|
||||
randomNumberGenerator = d3Random.randomIrwinHall(3);
|
||||
let prngIrwinHall: d3Random.RandomIrwinHall;
|
||||
|
||||
prngIrwinHall = d3Random.randomIrwinHall;
|
||||
prngIrwinHall = d3Random.randomIrwinHall.source(seedrandom("Schroedinger's flea."));
|
||||
|
||||
randomNumberGenerator = prngIrwinHall(3);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// randomExponential
|
||||
// ------------------------------------------------------------
|
||||
|
||||
randomNumberGenerator = d3Random.randomExponential(1 / 40);
|
||||
let prngExponential: d3Random.RandomExponential;
|
||||
|
||||
prngExponential = d3Random.randomExponential;
|
||||
prngExponential = d3Random.randomExponential.source(seedrandom("Schroedinger's flea."));
|
||||
|
||||
randomNumberGenerator = prngExponential(1 / 40);
|
||||
|
||||
Vendored
+93
-36
@@ -1,55 +1,112 @@
|
||||
// Type definitions for D3JS d3-random module v1.0.1
|
||||
// Type definitions for D3JS d3-random module 1.1
|
||||
// Project: https://github.com/d3/d3-random/
|
||||
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Returns a function for generating random numbers with a uniform distribution).
|
||||
* The minimum allowed value of a returned number is min, and the maximum is max.
|
||||
* If min is not specified, it defaults to 0; if max is not specified, it defaults to 1.
|
||||
*
|
||||
* @param min The minimum allowed value of a returned number, defaults to 0.
|
||||
* @param max The maximum allowed value of a returned number, defaults to 1.
|
||||
*/
|
||||
export function randomUniform(min?: number, max?: number): () => number;
|
||||
// Last module patch version validated against: 1.1.0
|
||||
|
||||
export interface RandomNumberGenerationSource {
|
||||
/**
|
||||
* Returns the same type of function for generating random numbers but where the given random number
|
||||
* generator source is used as the source of randomness instead of Math.random.
|
||||
* This is useful when a seeded random number generator is preferable to Math.random.
|
||||
*
|
||||
* @param source Source (pseudo-)random number generator implementing the Math.random interface.
|
||||
* The given random number generator must implement the same interface as Math.random and
|
||||
* only return values in the range [0, 1).
|
||||
*/
|
||||
source(source: () => number): this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a function for generating random numbers with a normal (Gaussian) distribution.
|
||||
* The expected value of the generated numbers is mu, with the given standard deviation sigma.
|
||||
* If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1.
|
||||
*
|
||||
* @param mu Expected value, defaults to 0.
|
||||
* @param sigma Standard deviation, defaults to 1.
|
||||
* A configurable random number generator for the uniform distribution.
|
||||
*/
|
||||
export function randomNormal(mu?: number, sigma?: number): () => number;
|
||||
export interface RandomUniform extends RandomNumberGenerationSource {
|
||||
/**
|
||||
* Returns a function for generating random numbers with a uniform distribution).
|
||||
* The minimum allowed value of a returned number is min, and the maximum is max.
|
||||
* If min is not specified, it defaults to 0; if max is not specified, it defaults to 1.
|
||||
*
|
||||
* @param min The minimum allowed value of a returned number, defaults to 0.
|
||||
* @param max The maximum allowed value of a returned number, defaults to 1.
|
||||
*/
|
||||
(min?: number, max?: number): () => number;
|
||||
}
|
||||
|
||||
export const randomUniform: RandomUniform;
|
||||
|
||||
/**
|
||||
* Returns a function for generating random numbers with a log-normal distribution. The expected value of the random variable’s natural logrithm is mu,
|
||||
* with the given standard deviation sigma. If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1.
|
||||
*
|
||||
* @param mu Expected value, defaults to 0.
|
||||
* @param sigma Standard deviation, defaults to 1.
|
||||
* A configurable random number generator for the normal (Gaussian) distribution.
|
||||
*/
|
||||
export function randomLogNormal(mu?: number, sigma?: number): () => number;
|
||||
export interface RandomNormal extends RandomNumberGenerationSource {
|
||||
/**
|
||||
* Returns a function for generating random numbers with a normal (Gaussian) distribution.
|
||||
* The expected value of the generated numbers is mu, with the given standard deviation sigma.
|
||||
* If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1.
|
||||
*
|
||||
* @param mu Expected value, defaults to 0.
|
||||
* @param sigma Standard deviation, defaults to 1.
|
||||
*/
|
||||
(mu?: number, sigma?: number): () => number;
|
||||
}
|
||||
|
||||
export const randomNormal: RandomNormal;
|
||||
|
||||
/**
|
||||
* Returns a function for generating random numbers with a Bates distribution with n independent variables.
|
||||
*
|
||||
* @param n Number of independent random variables to use.
|
||||
* A configurable random number generator for the log-normal distribution.
|
||||
*/
|
||||
export function randomBates(n: number): () => number;
|
||||
export interface RandomLogNormal extends RandomNumberGenerationSource {
|
||||
/**
|
||||
* Returns a function for generating random numbers with a log-normal distribution. The expected value of the random variable’s natural logrithm is mu,
|
||||
* with the given standard deviation sigma. If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1.
|
||||
*
|
||||
* @param mu Expected value, defaults to 0.
|
||||
* @param sigma Standard deviation, defaults to 1.
|
||||
*/
|
||||
(mu?: number, sigma?: number): () => number;
|
||||
}
|
||||
|
||||
export const randomLogNormal: RandomLogNormal;
|
||||
|
||||
/**
|
||||
* Returns a function for generating random numbers with an Irwin–Hall distribution with n independent variables.
|
||||
*
|
||||
* @param n Number of independent random variables to use.
|
||||
* A configurable random number generator for the Bates distribution.
|
||||
*/
|
||||
export function randomIrwinHall(n: number): () => number;
|
||||
export interface RandomBates extends RandomNumberGenerationSource {
|
||||
/**
|
||||
* Returns a function for generating random numbers with a Bates distribution with n independent variables.
|
||||
*
|
||||
* @param n Number of independent random variables to use.
|
||||
*/
|
||||
(n: number): () => number;
|
||||
}
|
||||
|
||||
export const randomBates: RandomBates;
|
||||
|
||||
/**
|
||||
* Returns a function for generating random numbers with an exponential distribution with the rate lambda;
|
||||
* equivalent to time between events in a Poisson process with a mean of 1 / lambda.
|
||||
*
|
||||
* @param lambda Expected time between events.
|
||||
* A configurable random number generator for the Irwin–Hall distribution.
|
||||
*/
|
||||
export function randomExponential(lambda: number): () => number;
|
||||
export interface RandomIrwinHall extends RandomNumberGenerationSource {
|
||||
/**
|
||||
* Returns a function for generating random numbers with an Irwin–Hall distribution with n independent variables.
|
||||
*
|
||||
* @param n Number of independent random variables to use.
|
||||
*/
|
||||
(n: number): () => number;
|
||||
}
|
||||
|
||||
export const randomIrwinHall: RandomIrwinHall;
|
||||
|
||||
/**
|
||||
* A configurable random number generator for the exponential distribution.
|
||||
*/
|
||||
export interface RandomExponential extends RandomNumberGenerationSource {
|
||||
/**
|
||||
* Returns a function for generating random numbers with an exponential distribution with the rate lambda;
|
||||
* equivalent to time between events in a Poisson process with a mean of 1 / lambda.
|
||||
*
|
||||
* @param lambda Expected time between events.
|
||||
*/
|
||||
(lambda: number): () => number;
|
||||
}
|
||||
|
||||
export const randomExponential: RandomExponential;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
@@ -19,4 +19,4 @@
|
||||
"index.d.ts",
|
||||
"d3-random-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"max-line-length": [false, 140]
|
||||
}
|
||||
}
|
||||
@@ -165,6 +165,12 @@ svgZoom = svgZoom.translateExtent([[-500, -500], [500, 500]]);
|
||||
let translateExtent: [[number, number], [number, number]];
|
||||
translateExtent = svgZoom.translateExtent();
|
||||
|
||||
// clickDistance() ---------------------------------------------------------
|
||||
|
||||
svgZoom = svgZoom.clickDistance(5);
|
||||
|
||||
const distance: number = svgZoom.clickDistance();
|
||||
|
||||
// duration() --------------------------------------------------------------
|
||||
|
||||
// chainable
|
||||
|
||||
Vendored
+16
-2
@@ -1,9 +1,9 @@
|
||||
// Type definitions for d3JS d3-zoom module 1.1
|
||||
// Type definitions for d3JS d3-zoom module 1.2
|
||||
// Project: https://github.com/d3/d3-zoom/
|
||||
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Last module patch version validated against: 1.1.1
|
||||
// Last module patch version validated against: 1.2.0
|
||||
|
||||
import { ArrayLike, Selection, TransitionLike, ValueFn } from 'd3-selection';
|
||||
import { ZoomView, ZoomInterpolator } from 'd3-interpolate';
|
||||
@@ -461,6 +461,20 @@ export interface ZoomBehavior<ZoomRefElement extends ZoomedElementBaseType, Datu
|
||||
*/
|
||||
translateExtent(extent: [[number, number], [number, number]]): this;
|
||||
|
||||
/**
|
||||
* Return the current click distance threshold, which defaults to zero.
|
||||
*/
|
||||
clickDistance(): number;
|
||||
/**
|
||||
* Set the maximum distance that the mouse can move between mousedown and mouseup that will trigger
|
||||
* a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to
|
||||
* distance from its position on mousedown, the click event follwing mouseup will be suppressed.
|
||||
*
|
||||
* @param distance The distance threshold between mousedown and mouseup measured in client coordinates (event.clientX and event.clientY).
|
||||
* The default is zero.
|
||||
*/
|
||||
clickDistance(distance: number): this;
|
||||
|
||||
/**
|
||||
* Get the duration for zoom transitions on double-click and double-tap in milliseconds.
|
||||
*/
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
|
||||
|
||||
// tslint:disable:no-var only-arrow-functions
|
||||
import jsdiff = require('diff');
|
||||
|
||||
var one = 'beep boop';
|
||||
var other = 'beep boob blah';
|
||||
|
||||
var diff = jsdiff.diffChars(one, other);
|
||||
|
||||
diff.forEach(function (part) {
|
||||
diff.forEach(function(part) {
|
||||
var mark = part.added ? '+' :
|
||||
part.removed ? '-' : ' ';
|
||||
console.log(mark + " " + part.value);
|
||||
@@ -16,11 +14,11 @@ diff.forEach(function (part) {
|
||||
// --------------------------
|
||||
|
||||
class LineDiffWithoutWhitespace extends jsdiff.Diff {
|
||||
tokenize(value:string):any {
|
||||
tokenize(value: string): any {
|
||||
return value.split(/^/m);
|
||||
}
|
||||
|
||||
equals(left:string, right:string):boolean {
|
||||
equals(left: string, right: string): boolean {
|
||||
return left.trim() === right.trim();
|
||||
}
|
||||
}
|
||||
@@ -29,8 +27,8 @@ var obj = new LineDiffWithoutWhitespace(true);
|
||||
var diff = obj.diff(one, other);
|
||||
printDiff(diff);
|
||||
|
||||
function printDiff(diff:jsdiff.IDiffResult[]) {
|
||||
function addLineHeader(decorator:string, str:string) {
|
||||
function printDiff(diff: jsdiff.IDiffResult[]) {
|
||||
function addLineHeader(decorator: string, str: string) {
|
||||
return str.split("\n").map((line, index, array) => {
|
||||
if (index === array.length - 1 && line === "") {
|
||||
return line;
|
||||
@@ -40,7 +38,7 @@ function printDiff(diff:jsdiff.IDiffResult[]) {
|
||||
}).join("\n");
|
||||
}
|
||||
|
||||
diff.forEach((part)=> {
|
||||
diff.forEach((part) => {
|
||||
if (part.added) {
|
||||
console.log(addLineHeader("+", part.value));
|
||||
} else if (part.removed) {
|
||||
|
||||
Vendored
+24
-20
@@ -1,7 +1,8 @@
|
||||
// Type definitions for diff
|
||||
// Type definitions for diff 3.2
|
||||
// Project: https://github.com/kpdecker/jsdiff
|
||||
// Definitions by: vvakame <https://github.com/vvakame/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
export = JsDiff;
|
||||
export as namespace JsDiff;
|
||||
@@ -36,34 +37,37 @@ declare namespace JsDiff {
|
||||
}
|
||||
|
||||
class Diff {
|
||||
ignoreWhitespace:boolean;
|
||||
ignoreWhitespace: boolean;
|
||||
|
||||
constructor(ignoreWhitespace?:boolean);
|
||||
constructor(ignoreWhitespace?: boolean);
|
||||
|
||||
diff(oldString:string, newString:string):IDiffResult[];
|
||||
diff(oldString: string, newString: string): IDiffResult[];
|
||||
|
||||
pushComponent(components:IDiffResult[], value:string, added:boolean, removed:boolean):void;
|
||||
pushComponent(components: IDiffResult[], value: string, added: boolean, removed: boolean): void;
|
||||
|
||||
extractCommon(basePath:IBestPath, newString:string, oldString:string, diagonalPath:number):number;
|
||||
extractCommon(basePath: IBestPath, newString: string, oldString: string, diagonalPath: number): number;
|
||||
|
||||
equals(left:string, right:string):boolean;
|
||||
equals(left: string, right: string): boolean;
|
||||
|
||||
join(left:string, right:string):string;
|
||||
join(left: string, right: string): string;
|
||||
|
||||
tokenize(value:string):any; // return types are string or string[]
|
||||
tokenize(value: string): any; // return types are string or string[]
|
||||
}
|
||||
|
||||
function diffChars(oldStr:string, newStr:string):IDiffResult[];
|
||||
function diffChars(oldStr: string, newStr: string): IDiffResult[];
|
||||
|
||||
function diffWords(oldStr:string, newStr:string):IDiffResult[];
|
||||
function diffWords(oldStr: string, newStr: string): IDiffResult[];
|
||||
|
||||
function diffWordsWithSpace(oldStr:string, newStr:string):IDiffResult[];
|
||||
function diffWordsWithSpace(oldStr: string, newStr: string): IDiffResult[];
|
||||
|
||||
function diffJson(oldObj: Object, newObj: Object): IDiffResult[];
|
||||
function diffJson(oldObj: object, newObj: object): IDiffResult[];
|
||||
|
||||
function diffLines(oldStr:string, newStr:string):IDiffResult[];
|
||||
function diffLines(oldStr: string, newStr: string, options?: {
|
||||
ignoreWhitespace?: boolean,
|
||||
newlineIsToken?: boolean,
|
||||
}): IDiffResult[];
|
||||
|
||||
function diffCss(oldStr:string, newStr:string):IDiffResult[];
|
||||
function diffCss(oldStr: string, newStr: string): IDiffResult[];
|
||||
|
||||
function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string, options?: {context: number}): string;
|
||||
|
||||
@@ -74,14 +78,14 @@ declare namespace JsDiff {
|
||||
function applyPatch(oldStr: string, uniDiff: string | IUniDiff | IUniDiff[]): string;
|
||||
|
||||
function applyPatches(uniDiff: IUniDiff[], options: {
|
||||
loadFile: (index: number, callback: (err: Error, data: string) => void) => void,
|
||||
patched: (index: number, content: string) => void,
|
||||
complete: (err?: Error) => void
|
||||
loadFile(index: number, callback: (err: Error, data: string) => void): void,
|
||||
patched(index: number, content: string): void,
|
||||
complete(err?: Error): void
|
||||
}): void;
|
||||
|
||||
function parsePatch(diffStr: string, options?: {strict: boolean}): IUniDiff[];
|
||||
|
||||
function convertChangesToXML(changes:IDiffResult[]):string;
|
||||
function convertChangesToXML(changes: IDiffResult[]): string;
|
||||
|
||||
function convertChangesToDMP(changes:IDiffResult[]):{0: number; 1:string;}[];
|
||||
function convertChangesToDMP(changes: IDiffResult[]): Array<{0: number; 1: string; }>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"interface-name": false,
|
||||
"export-just-namespace": false
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,25 @@ const docker6 = new Docker({
|
||||
key: 'key'
|
||||
});
|
||||
|
||||
const docker7 = new Docker({
|
||||
Promise
|
||||
});
|
||||
|
||||
async function foo() {
|
||||
const containers = await docker7.listContainers();
|
||||
for (const container of containers) {
|
||||
const foo = await docker7.getContainer(container.Id);
|
||||
const inspect = await foo.inspect();
|
||||
}
|
||||
|
||||
const images = await docker5.listImages();
|
||||
for (const image of images) {
|
||||
const foo = await docker5.getImage(image.Id);
|
||||
const inspect = await foo.inspect();
|
||||
await foo.remove();
|
||||
}
|
||||
}
|
||||
|
||||
const container = docker.getContainer('container-id');
|
||||
container.inspect((err, data) => {
|
||||
// NOOP
|
||||
@@ -47,6 +66,10 @@ docker.listContainers((err, containers) => {
|
||||
});
|
||||
});
|
||||
|
||||
docker.listContainers().then(containers => {
|
||||
return containers.map(container => docker.getContainer(container.Id));
|
||||
});
|
||||
|
||||
docker.buildImage('archive.tar', { t: 'imageName' }, (err, response) => {
|
||||
// NOOP
|
||||
});
|
||||
|
||||
Vendored
+106
-2
@@ -12,69 +12,93 @@ declare namespace Dockerode {
|
||||
interface Container {
|
||||
inspect(options: {}, callback: Callback<ContainerInspectInfo>): void;
|
||||
inspect(callback: Callback<ContainerInspectInfo>): void;
|
||||
inspect(options?: {}): { id: string };
|
||||
inspect(options?: {}): Promise<ContainerInspectInfo>;
|
||||
|
||||
rename(options: {}, callback: Callback<any>): void;
|
||||
rename(options: {}): Promise<any>;
|
||||
|
||||
update(options: {}, callback: Callback<any>): void;
|
||||
update(options: {}): Promise<any>;
|
||||
|
||||
top(options: {}, callback: Callback<any>): void;
|
||||
top(callback: Callback<any>): void;
|
||||
top(options?: {}): Promise<any>;
|
||||
|
||||
changes(callback: Callback<any>): void;
|
||||
changes(): Promise<any>;
|
||||
|
||||
export(callback: Callback<NodeJS.ReadableStream>): void;
|
||||
export(): Promise<NodeJS.ReadableStream>;
|
||||
|
||||
start(options: {}, callback: Callback<any>): void;
|
||||
start(callback: Callback<any>): void;
|
||||
start(options?: {}): Promise<any>;
|
||||
|
||||
pause(options: {}, callback: Callback<any>): void;
|
||||
pause(callback: Callback<any>): void;
|
||||
pause(options?: {}): Promise<any>;
|
||||
|
||||
unpause(options: {}, callback: Callback<any>): void;
|
||||
unpause(callback: Callback<any>): void;
|
||||
unpause(options?: {}): Promise<any>;
|
||||
|
||||
exec(options: {}, callback: Callback<any>): void;
|
||||
exec(options: {}): Promise<any>;
|
||||
|
||||
commit(options: {}, callback: Callback<any>): void;
|
||||
commit(callback: Callback<any>): void;
|
||||
commit(options?: {}): Promise<any>;
|
||||
|
||||
stop(options: {}, callback: Callback<any>): void;
|
||||
stop(callback: Callback<any>): void;
|
||||
stop(options?: {}): Promise<any>;
|
||||
|
||||
restart(options: {}, callback: Callback<any>): void;
|
||||
restart(callback: Callback<any>): void;
|
||||
restart(options?: {}): Promise<any>;
|
||||
|
||||
kill(options: {}, callback: Callback<any>): void;
|
||||
kill(callback: Callback<any>): void;
|
||||
kill(options?: {}): Promise<any>;
|
||||
|
||||
resize(options: {}, callback: Callback<any>): void;
|
||||
resize(callback: Callback<any>): void;
|
||||
resize(options?: {}): Promise<any>;
|
||||
|
||||
wait(callback: Callback<any>): void;
|
||||
wait(): Promise<any>;
|
||||
|
||||
remove(options: {}, callback: Callback<any>): void;
|
||||
remove(callback: Callback<any>): void;
|
||||
remove(options?: {}): Promise<any>;
|
||||
|
||||
/** Deprecated since RAPI v1.20 */
|
||||
copy(options: {}, callback: Callback<any>): void;
|
||||
/** Deprecated since RAPI v1.20 */
|
||||
copy(callback: Callback<any>): void;
|
||||
/** Deprecated since RAPI v1.20 */
|
||||
copy(options?: {}): Promise<any>;
|
||||
|
||||
getArchive(options: {}, callback: Callback<NodeJS.ReadableStream>): void;
|
||||
getArchive(options: {}): Promise<NodeJS.ReadableStream>;
|
||||
|
||||
infoArchive(options: {}, callback: Callback<any>): void;
|
||||
infoArchive(options: {}): Promise<any>;
|
||||
|
||||
/** @param file Filename (will read synchronously), Buffer or stream */
|
||||
putArchive(file: string | Buffer | NodeJS.ReadableStream, options: {}, callback: Callback<NodeJS.WritableStream>): void;
|
||||
putArchive(file: string | Buffer | NodeJS.ReadableStream, options: {}): Promise<NodeJS.ReadWriteStream>;
|
||||
|
||||
logs(options: { stdout?: boolean, stderr?: boolean, follow?: boolean, since?: number, details?: boolean, tail?: number, timestamps?: boolean }, callback: Callback<NodeJS.ReadableStream>): void;
|
||||
logs(options: ContainerLogsOptions, callback: Callback<NodeJS.ReadableStream>): void;
|
||||
logs(callback: Callback<NodeJS.ReadableStream>): void;
|
||||
logs(options?: ContainerLogsOptions): Promise<NodeJS.ReadableStream>;
|
||||
|
||||
stats(options: {}, callback: Callback<any>): void;
|
||||
stats(callback: Callback<any>): void;
|
||||
stats(options?: {}): Promise<any>;
|
||||
|
||||
attach(options: {}, callback: Callback<NodeJS.ReadableStream>): void;
|
||||
attach(options: {}): Promise<NodeJS.ReadableStream>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
@@ -82,19 +106,25 @@ declare namespace Dockerode {
|
||||
|
||||
interface Image {
|
||||
inspect(callback: Callback<ImageInspectInfo>): void;
|
||||
inspect(): Promise<ImageInspectInfo>;
|
||||
|
||||
history(callback: Callback<any>): void;
|
||||
history(): Promise<any>;
|
||||
|
||||
get(callback: Callback<NodeJS.ReadableStream>): void;
|
||||
get(): Promise<NodeJS.ReadableStream>;
|
||||
|
||||
push(options: {}, callback: Callback<NodeJS.ReadableStream>): void;
|
||||
push(callback: Callback<NodeJS.ReadableStream>): void;
|
||||
push(options?: {}): Promise<NodeJS.ReadableStream>;
|
||||
|
||||
tag(options: {}, callback: Callback<any>): void;
|
||||
tag(callback: Callback<any>): void;
|
||||
tag(options?: {}): Promise<any>;
|
||||
|
||||
remove(options: {}, callback: Callback<ImageRemoveInfo>): void;
|
||||
remove(callback: Callback<ImageRemoveInfo>): void;
|
||||
remove(options?: {}): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
@@ -102,9 +132,11 @@ declare namespace Dockerode {
|
||||
|
||||
interface Volume {
|
||||
inspect(callback: Callback<any>): void;
|
||||
inspect(): Promise<any>;
|
||||
|
||||
remove(options: {}, callback: Callback<any>): void;
|
||||
remove(callback: Callback<any>): void;
|
||||
remove(options?: {}): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
name?: string;
|
||||
@@ -112,11 +144,14 @@ declare namespace Dockerode {
|
||||
|
||||
interface Service {
|
||||
inspect(callback: Callback<any>): void;
|
||||
inspect(): Promise<any>;
|
||||
|
||||
remove(options: {}, callback: Callback<any>): void;
|
||||
remove(callback: Callback<any>): void;
|
||||
remove(options?: {}): Promise<any>;
|
||||
|
||||
update(options: {}, callback: Callback<any>): void;
|
||||
update(options: {}): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
@@ -124,6 +159,7 @@ declare namespace Dockerode {
|
||||
|
||||
interface Task {
|
||||
inspect(callback: Callback<any>): void;
|
||||
inspect(): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
@@ -131,6 +167,7 @@ declare namespace Dockerode {
|
||||
|
||||
interface Node {
|
||||
inspect(callback: Callback<any>): void;
|
||||
inspect(): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
@@ -142,38 +179,50 @@ declare namespace Dockerode {
|
||||
remote: any;
|
||||
|
||||
inspect(callback: Callback<PluginInspectInfo>): void;
|
||||
inspect(): Promise<PluginInspectInfo>;
|
||||
|
||||
remove(options: {}, callback: Callback<any>): void;
|
||||
remove(callback: Callback<any>): void;
|
||||
remove(options?: {}): Promise<any>;
|
||||
|
||||
privileges(callback: Callback<any>): void;
|
||||
privileges(): Promise<any>;
|
||||
|
||||
pull(options: {}, callback: Callback<any>): void;
|
||||
pull(options: {}): Promise<any>;
|
||||
|
||||
enable(options: {}, callback: Callback<any>): void;
|
||||
enable(callback: Callback<any>): void;
|
||||
enable(options?: {}): Promise<any>;
|
||||
|
||||
disable(options: {}, callback: Callback<any>): void;
|
||||
disable(callback: Callback<any>): void;
|
||||
disable(options?: {}): Promise<any>;
|
||||
|
||||
push(options: {}, callback: Callback<any>): void;
|
||||
push(callback: Callback<any>): void;
|
||||
push(options?: {}): Promise<any>;
|
||||
|
||||
configure(options: {}, callback: Callback<any>): void;
|
||||
configure(callback: Callback<any>): void;
|
||||
configure(options?: {}): Promise<any>;
|
||||
|
||||
upgrade(auth: any, options: {}, callback: Callback<any>): void;
|
||||
upgrade(auth: any, callback: Callback<any>): void;
|
||||
upgrade(auth: any, options?: {}): Promise<any>;
|
||||
}
|
||||
|
||||
interface Secret {
|
||||
inspect(callback: Callback<SecretInfo>): void;
|
||||
inspect(): Promise<SecretInfo>;
|
||||
|
||||
update(options: {}, callback: Callback<any>): void;
|
||||
update(callback: Callback<any>): void;
|
||||
update(options?: {}): Promise<any>;
|
||||
|
||||
remove(options: {}, callback: Callback<any>): void;
|
||||
remove(callback: Callback<any>): void;
|
||||
remove(options?: {}): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
@@ -181,15 +230,19 @@ declare namespace Dockerode {
|
||||
|
||||
interface Network {
|
||||
inspect(callback: Callback<any>): void;
|
||||
inspect(): Promise<any>;
|
||||
|
||||
remove(options: {}, callback: Callback<any>): void;
|
||||
remove(callback: Callback<any>): void;
|
||||
remove(options?: {}): Promise<any>;
|
||||
|
||||
connect(options: {}, callback: Callback<any>): void;
|
||||
connect(callback: Callback<any>): void;
|
||||
connect(options?: {}): Promise<any>;
|
||||
|
||||
disconnect(options: {}, callback: Callback<any>): void;
|
||||
disconnect(callback: Callback<any>): void;
|
||||
disconnect(options?: {}): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
@@ -197,10 +250,13 @@ declare namespace Dockerode {
|
||||
|
||||
interface Exec {
|
||||
inspect(callback: Callback<any>): void;
|
||||
inspect(): Promise<any>;
|
||||
|
||||
start(options: {}, callback: Callback<any>): void;
|
||||
start(options: {}): Promise<any>;
|
||||
|
||||
resize(options: {}, callback: Callback<any>): void;
|
||||
resize(options: {}): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
@@ -587,6 +643,7 @@ declare namespace Dockerode {
|
||||
key?: string;
|
||||
protocol?: "https" | "http";
|
||||
timeout?: number;
|
||||
Promise?: typeof Promise;
|
||||
}
|
||||
|
||||
interface SecretVersion {
|
||||
@@ -719,6 +776,16 @@ declare namespace Dockerode {
|
||||
interface PruneNetworksInfo {
|
||||
NetworksDeleted: string[];
|
||||
}
|
||||
|
||||
interface ContainerLogsOptions {
|
||||
stdout?: boolean;
|
||||
stderr?: boolean;
|
||||
follow?: boolean;
|
||||
since?: number;
|
||||
details?: boolean;
|
||||
tail?: number;
|
||||
timestamps?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
type Callback<T> = (error?: any, result?: T) => void;
|
||||
@@ -727,20 +794,27 @@ declare class Dockerode {
|
||||
constructor(options?: Dockerode.DockerOptions);
|
||||
|
||||
createContainer(options: Dockerode.ContainerCreateOptions, callback: Callback<Dockerode.Container>): void;
|
||||
createContainer(options: Dockerode.ContainerCreateOptions): Promise<Dockerode.Container>;
|
||||
|
||||
createImage(options: {}, callback: Callback<Dockerode.Image>): void;
|
||||
createImage(auth: any, options: {}, callback: Callback<Dockerode.Image>): void;
|
||||
createImage(options: {}): Promise<Dockerode.Image>;
|
||||
createImage(auth: any, options: {}): Promise<Dockerode.Image>;
|
||||
|
||||
loadImage(file: string, options: {}, callback: Callback<any>): void;
|
||||
loadImage(file: string, callback: Callback<any>): void;
|
||||
loadImage(file: string, options?: {}): Promise<any>;
|
||||
|
||||
importImage(file: string, options: {}, callback: Callback<any>): void;
|
||||
importImage(file: string, callback: Callback<any>): void;
|
||||
importImage(file: string, options?: {}): Promise<any>;
|
||||
|
||||
checkAuth(options: any, callback: Callback<any>): void;
|
||||
checkAuth(options: any): Promise<any>;
|
||||
|
||||
buildImage(file: string | NodeJS.ReadableStream, options: {}, callback: Callback<any>): void;
|
||||
buildImage(file: string | NodeJS.ReadableStream, callback: Callback<any>): void;
|
||||
buildImage(file: string | NodeJS.ReadableStream, options?: {}): Promise<any>;
|
||||
|
||||
getContainer(id: string): Dockerode.Container;
|
||||
|
||||
@@ -764,80 +838,110 @@ declare class Dockerode {
|
||||
|
||||
listContainers(options: {}, callback: Callback<Dockerode.ContainerInfo[]>): void;
|
||||
listContainers(callback: Callback<Dockerode.ContainerInfo[]>): void;
|
||||
listContainers(options?: {}): Promise<Dockerode.ContainerInfo[]>;
|
||||
|
||||
listImages(options: {}, callback: Callback<Dockerode.ImageInfo[]>): void;
|
||||
listImages(callback: Callback<Dockerode.ImageInfo[]>): void;
|
||||
listImages(options?: {}): Promise<Dockerode.ImageInfo[]>;
|
||||
|
||||
listServices(options: {}, callback: Callback<any[]>): void;
|
||||
listServices(callback: Callback<any[]>): void;
|
||||
listServices(options?: {}): Promise<any[]>;
|
||||
|
||||
listNodes(options: {}, callback: Callback<any[]>): void;
|
||||
listNodes(callback: Callback<any[]>): void;
|
||||
listNodes(options?: {}): Promise<any[]>;
|
||||
|
||||
listTasks(options: {}, callback: Callback<any[]>): void;
|
||||
listTasks(callback: Callback<any[]>): void;
|
||||
listTasks(options?: {}): Promise<any[]>;
|
||||
|
||||
listSecrets(options: {}, callback: Callback<Dockerode.SecretInfo[]>): void;
|
||||
listSecrets(callback: Callback<Dockerode.SecretInfo[]>): void;
|
||||
listSecrets(options?: {}): Promise<Dockerode.SecretInfo[]>;
|
||||
|
||||
listPlugins(options: {}, callback: Callback<Dockerode.PluginInfo[]>): void;
|
||||
listPlugins(callback: Callback<Dockerode.PluginInfo[]>): void;
|
||||
listPlugins(options?: {}): Promise<Dockerode.PluginInfo[]>;
|
||||
|
||||
listVolumes(options: {}, callback: Callback<any[]>): void;
|
||||
listVolumes(callback: Callback<any[]>): void;
|
||||
listVolumes(options?: {}): Promise<any[]>;
|
||||
|
||||
listNetworks(options: {}, callback: Callback<any[]>): void;
|
||||
listNetworks(callback: Callback<any[]>): void;
|
||||
listNetworks(options?: {}): Promise<any[]>;
|
||||
|
||||
createSecret(options: {}, callback: Callback<any>): void;
|
||||
createSecret(options: {}): Promise<any>;
|
||||
|
||||
createPlugin(options: {}, callback: Callback<any>): void;
|
||||
createPlugin(options: {}): Promise<any>;
|
||||
|
||||
createVolume(options: {}, callback: Callback<any>): void;
|
||||
createVolume(options: {}): Promise<any>;
|
||||
|
||||
createService(options: {}, callback: Callback<any>): void;
|
||||
createService(options: {}): Promise<any>;
|
||||
|
||||
createNetwork(options: {}, callback: Callback<any>): void;
|
||||
createNetwork(options: {}): Promise<any>;
|
||||
|
||||
searchImages(options: {}, callback: Callback<any>): void;
|
||||
searchImages(options: {}): Promise<any>;
|
||||
|
||||
pruneImages(options: {}, callback: Callback<Dockerode.PruneImagesInfo>): void;
|
||||
pruneImages(callback: Callback<Dockerode.PruneImagesInfo>): void;
|
||||
pruneImages(options?: {}): Promise<Dockerode.PruneImagesInfo>;
|
||||
|
||||
pruneContainers(options: {}, callback: Callback<Dockerode.PruneContainersInfo>): void;
|
||||
pruneContainers(callback: Callback<Dockerode.PruneContainersInfo>): void;
|
||||
pruneContainers(options?: {}): Promise<Dockerode.PruneContainersInfo>;
|
||||
|
||||
pruneVolumes(options: {}, callback: Callback<Dockerode.PruneVolumesInfo>): void;
|
||||
pruneVolumes(callback: Callback<Dockerode.PruneVolumesInfo>): void;
|
||||
pruneVolumes(options?: {}): Promise<Dockerode.PruneVolumesInfo>;
|
||||
|
||||
pruneNetworks(options: {}, callback: Callback<Dockerode.PruneNetworksInfo>): void;
|
||||
pruneNetworks(callback: Callback<Dockerode.PruneNetworksInfo>): void;
|
||||
pruneNetworks(options?: {}): Promise<Dockerode.PruneNetworksInfo>;
|
||||
|
||||
info(callback: Callback<any>): void;
|
||||
info(): Promise<any>;
|
||||
|
||||
version(callback: Callback<any>): void;
|
||||
version(): Promise<any>;
|
||||
|
||||
ping(callback: Callback<any>): void;
|
||||
ping(): Promise<any>;
|
||||
|
||||
getEvents(options: {}, callback: Callback<NodeJS.ReadableStream>): void;
|
||||
getEvents(callback: Callback<NodeJS.ReadableStream>): void;
|
||||
getEvents(options?: {}): Promise<NodeJS.ReadableStream>;
|
||||
|
||||
pull(repoTag: string, options: {}, callback: Callback<any>, auth?: {}): Dockerode.Image;
|
||||
pull(repoTag: string, options: {}, auth?: {}): Promise<any>;
|
||||
|
||||
run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, createOptions: {}, startOptions: {}, callback: Callback<any>): events.EventEmitter;
|
||||
run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, startOptions: {}, callback: Callback<any>): events.EventEmitter;
|
||||
run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, callback: Callback<any>): events.EventEmitter;
|
||||
run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, createOptions: {}, callback: Callback<any>): events.EventEmitter;
|
||||
run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, createOptions?: {}, startOptions?: {}): Promise<any>;
|
||||
|
||||
swarmInit(options: {}, callback: Callback<any>): void;
|
||||
swarmInit(options: {}): Promise<any>;
|
||||
|
||||
swarmJoin(options: {}, callback: Callback<any>): void;
|
||||
swarmJoin(options: {}): Promise<any>;
|
||||
|
||||
swarmLeave(options: {}, callback: Callback<any>): void;
|
||||
swarmLeave(options: {}): Promise<any>;
|
||||
|
||||
swarmUpdate(options: {}, callback: Callback<any>): void;
|
||||
swarmUpdate(options: {}): Promise<any>;
|
||||
|
||||
swarmInspect(callback: Callback<any>): void;
|
||||
swarmInspect(): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
|
||||
Vendored
+29
@@ -1,6 +1,7 @@
|
||||
// Type definitions for Ember.js 2.7
|
||||
// Project: http://emberjs.com/
|
||||
// Definitions by: Jed Mao <https://github.com/jedmao>
|
||||
// bttf <https://github.com/bttf>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="jquery" />
|
||||
@@ -1571,6 +1572,34 @@ declare namespace Ember {
|
||||
@return {Promise}
|
||||
*/
|
||||
finally<V>(callback: (a: T) => V, label?: string): Promise<V, U>;
|
||||
|
||||
static all<Q, R>(promises: GlobalArray<(Q | Thenable<Q, R>)>): Promise<Q[], R>;
|
||||
static race<Q, R>(promises: GlobalArray<Promise<Q, R>>): Promise<Q, R>;
|
||||
|
||||
/**
|
||||
@method resolve
|
||||
@param {Any} value value that the returned promise will be resolved with
|
||||
@param {String} label optional string for identifying the returned promise.
|
||||
Useful for tooling.
|
||||
@return {Promise} a promise that will become fulfilled with the given
|
||||
`value`
|
||||
*/
|
||||
static resolve<Q, R>(object?: Q | Thenable<Q, R>): Promise<Q, R>;
|
||||
|
||||
/**
|
||||
@method cast (Deprecated in favor of resolve
|
||||
@param {Any} value value that the returned promise will be resolved with
|
||||
@param {String} label optional string for identifying the returned promise.
|
||||
Useful for tooling.
|
||||
@return {Promise} a promise that will become fulfilled with the given
|
||||
`value`
|
||||
*/
|
||||
static cast<Q, R>(object: Q | Thenable<Q, R>, label?: string): Promise<Q, R>;
|
||||
|
||||
/**
|
||||
`RSVP.Promise.reject` returns a promise rejected with the passed `reason`.
|
||||
*/
|
||||
static reject(reason?: any): Promise<any, any>;
|
||||
}
|
||||
|
||||
function all(promises: GlobalArray<Promise<any, any>>): Promise<any, any>;
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
|
||||
|
||||
|
||||
/// Module
|
||||
function ModuleTest(): void {
|
||||
Module.environment = "WEB";
|
||||
Module.environment = "NODE";
|
||||
Module.noInitialRun = false;
|
||||
Module.logReadFiles = false;
|
||||
Module.filePackagePrefixURL = "http://www.example.org/";
|
||||
Module.preinitializedWebGLContext = new WebGLRenderingContext();
|
||||
|
||||
let package: ArrayBuffer = Module.getPreloadedPackage("package-name", 100);
|
||||
let exports: WebAssembly.Exports = Module.instantiateWasm(
|
||||
[{name: "func-name", kind: "function"}],
|
||||
(module: WebAssembly.Module) => {}
|
||||
);
|
||||
let memFile: string = Module.locateFile("http://www.example.org/file.mem");
|
||||
Module.onCustomMessage(new MessageEvent("TestType"));
|
||||
|
||||
Module.print = function(text) { alert('stdout: ' + text) };
|
||||
|
||||
var int_sqrt = Module.cwrap('int_sqrt', 'number', ['number'])
|
||||
@@ -16,6 +28,7 @@ function ModuleTest(): void {
|
||||
Module.HEAPU8.set(myTypedArray, buf);
|
||||
Module.ccall('my_function', 'number', ['number'], [buf]);
|
||||
Module._free(buf);
|
||||
Module.destroy({});
|
||||
}
|
||||
|
||||
/// FS
|
||||
|
||||
Vendored
+22
-1
@@ -1,7 +1,11 @@
|
||||
// Type definitions for Emscripten
|
||||
// Project: http://kripken.github.io/emscripten-site/index.html
|
||||
// Definitions by: Kensuke Matsuzaki <https://github.com/zakki>
|
||||
// Periklis Tsirakidis <https://github.com/periklis>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="webassembly-js-api" />
|
||||
|
||||
declare namespace Emscripten {
|
||||
interface FileSystemType {
|
||||
@@ -9,13 +13,30 @@ declare namespace Emscripten {
|
||||
}
|
||||
|
||||
declare namespace Module {
|
||||
type EnvironmentType = "WEB" | "NODE" | "SHELL" | "WORKER";
|
||||
|
||||
function print(str: string): void;
|
||||
function printErr(str: string): void;
|
||||
var arguments: string[];
|
||||
var environment: EnvironmentType;
|
||||
var preInit: { (): void }[];
|
||||
var preRun: { (): void }[];
|
||||
var postRun: { (): void }[];
|
||||
var preinitializedWebGLContext: WebGLRenderingContext;
|
||||
var noInitialRun: boolean;
|
||||
var noExitRuntime: boolean;
|
||||
var logReadFiles: boolean;
|
||||
var filePackagePrefixURL: string;
|
||||
var wasmBinary: ArrayBuffer;
|
||||
|
||||
function destroy(object: object): void;
|
||||
function getPreloadedPackage(remotePackageName: string, remotePackageSize: number): ArrayBuffer;
|
||||
function instantiateWasm(
|
||||
imports: WebAssembly.Imports,
|
||||
successCallback: (module: WebAssembly.Module) => void
|
||||
): WebAssembly.Exports;
|
||||
function locateFile(url: string): string;
|
||||
function onCustomMessage(event: MessageEvent): void;
|
||||
|
||||
var Runtime: any;
|
||||
|
||||
@@ -65,7 +86,7 @@ declare namespace Module {
|
||||
function addOnExit(cb: () => any): void;
|
||||
function addOnPostRun(cb: () => any): void;
|
||||
|
||||
// Tools
|
||||
// Tools
|
||||
function intArrayFromString(stringy: string, dontAddNull?: boolean, length?: number): number[];
|
||||
function intArrayToString(array: number[]): string;
|
||||
function writeStringToMemory(str: string, buffer: number, dontAddNull: boolean): void;
|
||||
|
||||
Vendored
+1
-1
@@ -51,7 +51,7 @@ export class GraphQLSchema {
|
||||
getQueryType(): GraphQLObjectType;
|
||||
getMutationType(): GraphQLObjectType;
|
||||
getSubscriptionType(): GraphQLObjectType;
|
||||
getTypeMap(): GraphQLNamedType;
|
||||
getTypeMap(): { [typeName: string]: GraphQLNamedType };
|
||||
getType(name: string): GraphQLType;
|
||||
getPossibleTypes(abstractType: GraphQLAbstractType): Array<GraphQLObjectType>;
|
||||
|
||||
|
||||
Vendored
+9
-9
@@ -18522,7 +18522,7 @@ declare namespace _ {
|
||||
* @param defaultValue The default value.
|
||||
* @returns Returns the resolved value.
|
||||
*/
|
||||
defaultTo<T>(value: T, defaultValue: T): T;
|
||||
defaultTo<T>(value: T | null | undefined, defaultValue: T): T;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapperBase<T, TWrapper> {
|
||||
@@ -19591,20 +19591,20 @@ declare namespace _ {
|
||||
|
||||
type ListIterator<T, TResult> = (value: T, index: number, collection: List<T>) => TResult;
|
||||
|
||||
type DictionaryIterator<T, TResult> = (value: T, key?: string, collection?: Dictionary<T>) => TResult;
|
||||
type DictionaryIterator<T, TResult> = (value: T, key: string, collection: Dictionary<T>) => TResult;
|
||||
|
||||
type NumericDictionaryIterator<T, TResult> = (value: T, key?: number, collection?: Dictionary<T>) => TResult;
|
||||
type NumericDictionaryIterator<T, TResult> = (value: T, key: number, collection: Dictionary<T>) => TResult;
|
||||
|
||||
type ObjectIterator<T, TResult> = (element: T, key?: string, collection?: any) => TResult;
|
||||
type ObjectIterator<T, TResult> = (element: T, key: string, collection: any) => TResult;
|
||||
|
||||
type StringIterator<TResult> = (char: string, index?: number, string?: string) => TResult;
|
||||
type StringIterator<TResult> = (char: string, index: number, string: string) => TResult;
|
||||
|
||||
type MemoVoidIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey?: any, list?: T[]) => void;
|
||||
type MemoVoidIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => void;
|
||||
|
||||
type MemoIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey?: any, list?: T[]) => TResult;
|
||||
type MemoIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => TResult;
|
||||
|
||||
type MemoVoidArrayIterator<T, TResult> = (acc: TResult, curr: T, index?: number, arr?: T[]) => void;
|
||||
type MemoVoidDictionaryIterator<T, TResult> = (acc: TResult, curr: T, key?: string, dict?: Dictionary<T>) => void;
|
||||
type MemoVoidArrayIterator<T, TResult> = (acc: TResult, curr: T, index: number, arr: T[]) => void;
|
||||
type MemoVoidDictionaryIterator<T, TResult> = (acc: TResult, curr: T, key: string, dict: Dictionary<T>) => void;
|
||||
|
||||
// Common interface between Arrays and jQuery objects
|
||||
interface List<T> {
|
||||
|
||||
+542
-535
File diff suppressed because it is too large
Load Diff
@@ -299,7 +299,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for material-ui v0.17.5
|
||||
// Type definitions for material-ui v0.17.51
|
||||
// Project: https://github.com/callemall/material-ui
|
||||
// Definitions by: Nathan Brown <https://github.com/ngbrown>, Igor Belagorudsky <https://github.com/theigor>, Ali Taheri Moghaddar <https://github.com/alitaheri>, Oliver Herrmann <https://github.com/herrmanno>, Daniel Roth <https://github.com/DaIgeb>, Aurelién Allienne <https://github.com/allienna>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -1019,7 +1019,7 @@ declare namespace __MaterialUI {
|
||||
overlayStyle?: React.CSSProperties;
|
||||
style?: React.CSSProperties;
|
||||
swipeAreaWidth?: number;
|
||||
width?: number;
|
||||
width?: number | string;
|
||||
zDepth?: number;
|
||||
}
|
||||
export class Drawer extends React.Component<DrawerProps, {}> {
|
||||
|
||||
@@ -1662,7 +1662,7 @@ class DrawerOpenRightExample extends React.Component<{}, {open?: boolean}> {
|
||||
label="Toggle Drawer"
|
||||
onTouchTap={this.handleToggle}
|
||||
/>
|
||||
<Drawer width={200} openSecondary={true} open={this.state.open}>
|
||||
<Drawer width="20%" openSecondary={true} open={this.state.open}>
|
||||
<AppBar title="AppBar"/>
|
||||
</Drawer>
|
||||
</div>
|
||||
|
||||
Vendored
+1
-1
@@ -1065,7 +1065,7 @@ declare module "mongoose" {
|
||||
* @param pathsToValidate only validate the given paths
|
||||
* @returns MongooseError if there are errors during validation, or undefined if there is no error.
|
||||
*/
|
||||
validateSync(pathsToValidate: string | string[]): Error;
|
||||
validateSync(pathsToValidate?: string | string[]): Error;
|
||||
|
||||
/** Hash containing current validation errors. */
|
||||
errors: Object;
|
||||
|
||||
Vendored
+6
@@ -1,6 +1,7 @@
|
||||
// Type definitions for node-mysql
|
||||
// Project: https://github.com/felixge/node-mysql
|
||||
// Definitions by: William Johnston <https://github.com/wjohnsto>
|
||||
// Kacper Polak <https://github.com/kacepe>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
///<reference types="node" />
|
||||
@@ -497,6 +498,11 @@ interface IError extends Error {
|
||||
* Boolean, indicating if this error is terminal to the connection object.
|
||||
*/
|
||||
fatal: boolean;
|
||||
|
||||
/**
|
||||
* SQL of failed query
|
||||
*/
|
||||
sql?: string;
|
||||
}
|
||||
|
||||
declare const enum FieldType {
|
||||
|
||||
Vendored
+87
-15
@@ -1265,22 +1265,94 @@ declare module "dns" {
|
||||
family: number;
|
||||
}
|
||||
|
||||
export function lookup(domain: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(domain: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(domain: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void;
|
||||
export function lookup(domain: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void;
|
||||
export function lookup(domain: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void;
|
||||
export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void;
|
||||
export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
|
||||
export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function resolve(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function resolve4(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function resolve6(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function resolveMx(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
|
||||
export function reverse(ip: string, callback: (err: Error, domains: string[]) =>void ): string[];
|
||||
export interface MxRecord {
|
||||
priority: number;
|
||||
exchange: string;
|
||||
}
|
||||
|
||||
export interface NaptrRecord {
|
||||
flags: string;
|
||||
service: string;
|
||||
regexp: string;
|
||||
replacement: string;
|
||||
order: number;
|
||||
preference: number;
|
||||
}
|
||||
|
||||
export interface SoaRecord {
|
||||
nsname: string;
|
||||
hostmaster: string;
|
||||
serial: number;
|
||||
refresh: number;
|
||||
retry: number;
|
||||
expire: number;
|
||||
minttl: number;
|
||||
}
|
||||
|
||||
export interface SrvRecord {
|
||||
priority: number;
|
||||
weight: number;
|
||||
port: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void;
|
||||
|
||||
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
||||
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
|
||||
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
||||
export function setServers(servers: string[]): void;
|
||||
|
||||
//Error codes
|
||||
export var NODATA: string;
|
||||
export var FORMERR: string;
|
||||
export var SERVFAIL: string;
|
||||
export var NOTFOUND: string;
|
||||
export var NOTIMP: string;
|
||||
export var REFUSED: string;
|
||||
export var BADQUERY: string;
|
||||
export var BADNAME: string;
|
||||
export var BADFAMILY: string;
|
||||
export var BADRESP: string;
|
||||
export var CONNREFUSED: string;
|
||||
export var TIMEOUT: string;
|
||||
export var EOF: string;
|
||||
export var FILE: string;
|
||||
export var NOMEM: string;
|
||||
export var DESTRUCTION: string;
|
||||
export var BADSTR: string;
|
||||
export var BADFLAGS: string;
|
||||
export var NONAME: string;
|
||||
export var BADHINTS: string;
|
||||
export var NOTINITIALIZED: string;
|
||||
export var LOADIPHLPAPI: string;
|
||||
export var ADDRGETNETWORKPARAMS: string;
|
||||
export var CANCELLED: string;
|
||||
}
|
||||
|
||||
declare module "net" {
|
||||
|
||||
@@ -1021,4 +1021,25 @@ namespace dns_tests {
|
||||
const _addresses: string | dns.LookupAddress[] = addresses;
|
||||
const _family: number | undefined = family;
|
||||
});
|
||||
|
||||
dns.resolve("nodejs.org", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
dns.resolve("nodejs.org", "A", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
dns.resolve("nodejs.org", "AAAA", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
dns.resolve("nodejs.org", "MX", (err, addresses) => {
|
||||
const _addresses: dns.MxRecord[] = addresses;
|
||||
});
|
||||
|
||||
dns.resolve4("nodejs.org", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
|
||||
dns.resolve6("nodejs.org", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
}
|
||||
|
||||
Vendored
+61
-20
@@ -1807,11 +1807,6 @@ declare module "url" {
|
||||
}
|
||||
|
||||
declare module "dns" {
|
||||
export interface MxRecord {
|
||||
exchange: string,
|
||||
priority: number
|
||||
}
|
||||
|
||||
// Supported getaddrinfo flags.
|
||||
export const ADDRCONFIG: number;
|
||||
export const V4MAPPED: number;
|
||||
@@ -1835,22 +1830,68 @@ declare module "dns" {
|
||||
family: number;
|
||||
}
|
||||
|
||||
export function lookup(domain: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(domain: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(domain: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void;
|
||||
export function lookup(domain: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void;
|
||||
export function lookup(domain: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void;
|
||||
export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void;
|
||||
export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
||||
|
||||
export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) => void): string[];
|
||||
export function resolve(domain: string, callback: (err: Error, addresses: string[]) => void): string[];
|
||||
export function resolve4(domain: string, callback: (err: Error, addresses: string[]) => void): string[];
|
||||
export function resolve6(domain: string, callback: (err: Error, addresses: string[]) => void): string[];
|
||||
export function resolveMx(domain: string, callback: (err: Error, addresses: MxRecord[]) => void): string[];
|
||||
export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) => void): string[];
|
||||
export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) => void): string[];
|
||||
export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) => void): string[];
|
||||
export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) => void): string[];
|
||||
export function reverse(ip: string, callback: (err: Error, domains: string[]) => void): string[];
|
||||
export interface MxRecord {
|
||||
priority: number;
|
||||
exchange: string;
|
||||
}
|
||||
|
||||
export interface NaptrRecord {
|
||||
flags: string;
|
||||
service: string;
|
||||
regexp: string;
|
||||
replacement: string;
|
||||
order: number;
|
||||
preference: number;
|
||||
}
|
||||
|
||||
export interface SoaRecord {
|
||||
nsname: string;
|
||||
hostmaster: string;
|
||||
serial: number;
|
||||
refresh: number;
|
||||
retry: number;
|
||||
expire: number;
|
||||
minttl: number;
|
||||
}
|
||||
|
||||
export interface SrvRecord {
|
||||
priority: number;
|
||||
weight: number;
|
||||
port: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void;
|
||||
|
||||
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
||||
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
|
||||
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
||||
export function setServers(servers: string[]): void;
|
||||
|
||||
//Error codes
|
||||
|
||||
@@ -2091,6 +2091,27 @@ namespace dns_tests {
|
||||
const _addresses: string | dns.LookupAddress[] = addresses;
|
||||
const _family: number | undefined = family;
|
||||
});
|
||||
|
||||
dns.resolve("nodejs.org", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
dns.resolve("nodejs.org", "A", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
dns.resolve("nodejs.org", "AAAA", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
dns.resolve("nodejs.org", "MX", (err, addresses) => {
|
||||
const _addresses: dns.MxRecord[] = addresses;
|
||||
});
|
||||
|
||||
dns.resolve4("nodejs.org", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
|
||||
dns.resolve6("nodejs.org", (err, addresses) => {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
Vendored
-1
@@ -2412,7 +2412,6 @@ declare module OfficeExtension {
|
||||
constructor(context: ClientRequestContext, parentObject: ClientObject, name: string, eventInfo: EventInfo<T>);
|
||||
add(handler: (args: T) => IPromise<any>): EventHandlerResult<T>;
|
||||
remove(handler: (args: T) => IPromise<any>): void;
|
||||
removeAll(): void;
|
||||
}
|
||||
|
||||
export class EventHandlerResult<T> {
|
||||
|
||||
Vendored
+1
@@ -1808,3 +1808,4 @@ declare namespace R {
|
||||
}
|
||||
|
||||
export = R;
|
||||
export as namespace R;
|
||||
|
||||
Vendored
+78
@@ -0,0 +1,78 @@
|
||||
// Type definitions for react-monaco-editor 0.8
|
||||
// Project: https://github.com/superRaytin/react-monaco-editor
|
||||
// Definitions by: Joshua Netterfield <https://github.com/jnetterf>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="monaco-editor" />
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
export interface ReactMonacoEditorProps {
|
||||
/**
|
||||
* Width of editor. Defaults to 100%.
|
||||
*/
|
||||
width?: string | number;
|
||||
|
||||
/**
|
||||
* Height of editor. Defaults to 500.
|
||||
*/
|
||||
height?: string | number;
|
||||
|
||||
/**
|
||||
* Value of the auto created model in the editor.
|
||||
* If you specify value property, the component behaves in controlled mode. Otherwise, it behaves in uncontrolled mode.
|
||||
*/
|
||||
value?: string;
|
||||
|
||||
/**
|
||||
* The initial value of the auto created model in the editor.
|
||||
*/
|
||||
defaultValue?: string;
|
||||
|
||||
/**
|
||||
* The initial language of the auto created model in the editor.
|
||||
*/
|
||||
language?: string;
|
||||
|
||||
/**
|
||||
* Theme to be used for rendering.
|
||||
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
|
||||
* You can create custom themes via `monaco.editor.defineTheme`.
|
||||
*/
|
||||
theme?: string;
|
||||
|
||||
/**
|
||||
* Refer to Monaco interface IEditorOptions.
|
||||
*/
|
||||
options?: monaco.editor.IEditorOptions;
|
||||
|
||||
/**
|
||||
* An event emitted when the editor has been mounted (similar to componentDidMount of React).
|
||||
*/
|
||||
editorDidMount?(editor: monaco.editor.ICodeEditor, monacoModule: typeof monaco): void;
|
||||
|
||||
/**
|
||||
* An event emitted before the editor mounted (similar to componentWillMount of React).
|
||||
*/
|
||||
editorWillMount?(monacoModule: typeof monaco): void;
|
||||
|
||||
/**
|
||||
* An event emitted when the content of the current model has changed.
|
||||
*/
|
||||
onChange?(val: string, ev: monaco.editor.IModelContentChangedEvent2): void;
|
||||
|
||||
/**
|
||||
* Optional, allow to config loader url and relative path of module, refer to require.config.
|
||||
*/
|
||||
requireConfig?: object;
|
||||
|
||||
/**
|
||||
* Optional, allow to pass a different context then the global window onto which the monaco instance will be loaded. Useful if you want to load the editor in an iframe.
|
||||
*/
|
||||
context?: object;
|
||||
}
|
||||
|
||||
export default class ReactMonacoEditor extends React.Component<ReactMonacoEditorProps, void> {
|
||||
editor: monaco.editor.ICodeEditor;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"monaco-editor": "0.8.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
// Adapted from https://github.com/superRaytin/react-monaco-editor/blob/master/examples/index.js
|
||||
|
||||
import * as React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import MonacoEditor from 'react-monaco-editor';
|
||||
|
||||
interface CodeEditorState {
|
||||
code?: string;
|
||||
}
|
||||
|
||||
// Using with webpack
|
||||
class CodeEditor extends React.Component<object, CodeEditorState> {
|
||||
constructor(props: object) {
|
||||
super(props);
|
||||
this.state = {
|
||||
code: '// type your code... \n',
|
||||
};
|
||||
}
|
||||
editor: monaco.editor.ICodeEditor;
|
||||
editorDidMount = (editor: monaco.editor.ICodeEditor) => {
|
||||
console.log('editorDidMount', editor, editor.getValue(), editor.getModel());
|
||||
this.editor = editor;
|
||||
}
|
||||
onChange = (newValue: string, e: monaco.editor.IModelContentChangedEvent2) => {
|
||||
console.log('onChange', newValue, e);
|
||||
this.setState({
|
||||
code: newValue,
|
||||
});
|
||||
}
|
||||
changeEditorValue = () => {
|
||||
if (this.editor) {
|
||||
this.editor.setValue('// code changed! \n');
|
||||
}
|
||||
}
|
||||
changeBySetState = () => {
|
||||
this.setState({code: '// code changed by setState! \n'});
|
||||
}
|
||||
render() {
|
||||
const code = this.state.code;
|
||||
const options = {
|
||||
selectOnLineNumbers: true,
|
||||
roundedSelection: false,
|
||||
readOnly: false,
|
||||
theme: 'vs',
|
||||
cursorStyle: 'line',
|
||||
automaticLayout: false,
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
<button onClick={this.changeEditorValue}>Change value</button>
|
||||
<button onClick={this.changeBySetState}>Change by setState</button>
|
||||
</div>
|
||||
<hr />
|
||||
<MonacoEditor
|
||||
height="500"
|
||||
language="javascript"
|
||||
value={code}
|
||||
options={options}
|
||||
onChange={this.onChange}
|
||||
editorDidMount={this.editorDidMount}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Using with require.config
|
||||
class AnotherEditor extends React.Component<object, CodeEditorState> {
|
||||
constructor(props: object) {
|
||||
super(props);
|
||||
const jsonCode = [
|
||||
'{',
|
||||
' "$schema": "http://myserver/foo-schema.json"',
|
||||
"}"
|
||||
].join('\n');
|
||||
this.state = {
|
||||
code: jsonCode,
|
||||
};
|
||||
}
|
||||
editorWillMount = (monacoModule: typeof monaco) => {
|
||||
monacoModule.languages.json.jsonDefaults.setDiagnosticsOptions({
|
||||
schemas: [{
|
||||
uri: "http://myserver/foo-schema.json",
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
p1: {
|
||||
enum: [ "v1", "v2"]
|
||||
},
|
||||
p2: {
|
||||
$ref: "http://myserver/bar-schema.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
uri: "http://myserver/bar-schema.json",
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
q1: {
|
||||
enum: [ "x1", "x2"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const code = this.state.code;
|
||||
const requireConfig = {
|
||||
url: 'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.1/require.min.js',
|
||||
paths: {
|
||||
vs: 'https://as.alipayobjects.com/g/cicada/monaco-editor-mirror/0.6.1/min/vs'
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<MonacoEditor
|
||||
width="800"
|
||||
height="600"
|
||||
language="json"
|
||||
defaultValue={code}
|
||||
requireConfig={requireConfig}
|
||||
editorWillMount={this.editorWillMount}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class App extends React.Component<any, any> {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<h2>Monaco Editor Sample (controlled mode)</h2>
|
||||
<CodeEditor />
|
||||
<hr />
|
||||
<h2>Another editor (uncontrolled mode)</h2>
|
||||
<AnotherEditor />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
render(
|
||||
<App />,
|
||||
document.getElementById('root')
|
||||
);
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-monaco-editor-tests.tsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+410
@@ -0,0 +1,410 @@
|
||||
// Type definitions for react-native-goby 0.04
|
||||
// Project: https://gitlab.com/MessageDream/react-native-goby
|
||||
// Definitions by: jaydenzhao <https://github.com/MessageDream/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
export type DownloadProgressCallback = (progress: DownloadProgress) => void;
|
||||
export type SyncStatusChangedCallback = (status: Goby.SyncStatus) => void;
|
||||
|
||||
export interface GobyOptions extends SyncOptions {
|
||||
/**
|
||||
* Specifies when you would like to synchronize updates with the Goby server.
|
||||
* Defaults to goby.CheckFrequency.ON_APP_START.
|
||||
*/
|
||||
checkFrequency: Goby.CheckFrequency;
|
||||
}
|
||||
|
||||
export interface DownloadProgress {
|
||||
/**
|
||||
* The total number of bytes expected to be received for this update.
|
||||
*/
|
||||
totalBytes: number;
|
||||
|
||||
/**
|
||||
* The number of bytes downloaded thus far.
|
||||
*/
|
||||
receivedBytes: number;
|
||||
}
|
||||
|
||||
export interface LocalPackage extends Package {
|
||||
/**
|
||||
* Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app.
|
||||
*
|
||||
* @param installMode Indicates when you would like the update changes to take affect for the end-user.
|
||||
* @param minimumBackgroundDuration For resume-based installs, this specifies the number of seconds the app needs to be in the background before forcing a restart. Defaults to 0 if unspecified.
|
||||
*/
|
||||
install(installMode: Goby.InstallMode, minimumBackgroundDuration?: number): Promise<void>;
|
||||
}
|
||||
|
||||
export interface Package {
|
||||
/**
|
||||
* The app binary version that this update is dependent on. This is the value that was
|
||||
* specified via the appStoreVersion parameter when calling the CLI's release command.
|
||||
*/
|
||||
appVersion: string;
|
||||
|
||||
/**
|
||||
* The deployment key that was used to originally download this update.
|
||||
*/
|
||||
deploymentKey: string;
|
||||
|
||||
/**
|
||||
* The description of the update. This is the same value that you specified in the CLI when you released the update.
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* Indicates whether this update has been previously installed but was rolled back.
|
||||
*/
|
||||
failedInstall: boolean;
|
||||
|
||||
/**
|
||||
* Indicates whether this is the first time the update has been run after being installed.
|
||||
*/
|
||||
isFirstRun: boolean;
|
||||
|
||||
/**
|
||||
* Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
|
||||
*/
|
||||
isMandatory: boolean;
|
||||
|
||||
/**
|
||||
* Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart
|
||||
* needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
|
||||
*/
|
||||
isPending: boolean;
|
||||
|
||||
/**
|
||||
* The internal label automatically given to the update by the Goby server. This value uniquely identifies the update within its deployment.
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* The SHA hash value of the update.
|
||||
*/
|
||||
packageHash: string;
|
||||
|
||||
/**
|
||||
* The size of the code contained within the update, in bytes.
|
||||
*/
|
||||
packageSize: number;
|
||||
}
|
||||
|
||||
export interface RemotePackage extends Package {
|
||||
/**
|
||||
* Downloads the available update from the Goby service.
|
||||
*
|
||||
* @param downloadProgressCallback An optional callback that allows tracking the progress of the update while it is being downloaded.
|
||||
*/
|
||||
download(downloadProgressCallback?: DownloadProgressCallback): Promise<LocalPackage>;
|
||||
|
||||
/**
|
||||
* The URL at which the package is available for download.
|
||||
*/
|
||||
downloadUrl: string;
|
||||
}
|
||||
|
||||
export interface SyncOptions {
|
||||
/**
|
||||
* Specifies the deployment key you want to query for an update against. By default, this value is derived from the Info.plist
|
||||
* file (iOS) and MainActivity.java file (Android), but this option allows you to override it from the script-side if you need to
|
||||
* dynamically use a different deployment for a specific call to sync.
|
||||
*/
|
||||
deploymentKey?: string;
|
||||
|
||||
/**
|
||||
* Specifies when you would like to install optional updates (i.e. those that aren't marked as mandatory).
|
||||
* Defaults to goby.InstallMode.ON_NEXT_RESTART.
|
||||
*/
|
||||
installMode?: Goby.InstallMode;
|
||||
|
||||
/**
|
||||
* Specifies when you would like to install updates which are marked as mandatory.
|
||||
* Defaults to goby.InstallMode.IMMEDIATE.
|
||||
*/
|
||||
mandatoryInstallMode?: Goby.InstallMode;
|
||||
|
||||
/**
|
||||
* Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property
|
||||
* only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME`, and can be useful for getting your update in front
|
||||
* of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying the update immediately after a
|
||||
* resume, regardless how long it was in the background.
|
||||
*/
|
||||
minimumBackgroundDuration?: number;
|
||||
|
||||
/**
|
||||
* An "options" object used to determine whether a confirmation dialog should be displayed to the end user when an update is available,
|
||||
* and if so, what strings to use. Defaults to null, which has the effect of disabling the dialog completely. Setting this to any truthy
|
||||
* value will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as
|
||||
* overriding one or more of the default strings.
|
||||
*/
|
||||
updateDialog?: UpdateDialog;
|
||||
}
|
||||
|
||||
export interface UpdateDialog {
|
||||
/**
|
||||
* Indicates whether you would like to append the description of an available release to the
|
||||
* notification message which is displayed to the end user. Defaults to false.
|
||||
*/
|
||||
appendReleaseDescription?: boolean;
|
||||
|
||||
/**
|
||||
* Indicates the string you would like to prefix the release description with, if any, when
|
||||
* displaying the update notification to the end user. Defaults to " Description: "
|
||||
*/
|
||||
descriptionPrefix?: string;
|
||||
|
||||
/**
|
||||
* The text to use for the button the end user must press in order to install a mandatory update. Defaults to "Continue".
|
||||
*/
|
||||
mandatoryContinueButtonLabel?: string;
|
||||
|
||||
/**
|
||||
* The text used as the body of an update notification, when the update is specified as mandatory.
|
||||
* Defaults to "An update is available that must be installed.".
|
||||
*/
|
||||
mandatoryUpdateMessage?: string;
|
||||
|
||||
/**
|
||||
* The text to use for the button the end user can press in order to ignore an optional update that is available. Defaults to "Ignore".
|
||||
*/
|
||||
optionalIgnoreButtonLabel?: string;
|
||||
|
||||
/**
|
||||
* The text to use for the button the end user can press in order to install an optional update. Defaults to "Install".
|
||||
*/
|
||||
optionalInstallButtonLabel?: string;
|
||||
|
||||
/**
|
||||
* The text used as the body of an update notification, when the update is optional. Defaults to "An update is available. Would you like to install it?".
|
||||
*/
|
||||
optionalUpdateMessage?: string;
|
||||
|
||||
/**
|
||||
* The text used as the header of an update notification that is displayed to the end user. Defaults to "Update available".
|
||||
*/
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface StatusReport {
|
||||
/**
|
||||
* Whether the deployment succeeded or failed.
|
||||
*/
|
||||
status: Goby.DeploymentStatus;
|
||||
|
||||
/**
|
||||
* The version of the app that was deployed (for a native app upgrade).
|
||||
*/
|
||||
appVersion?: string;
|
||||
|
||||
/**
|
||||
* Details of the package that was deployed (or attempted to).
|
||||
*/
|
||||
package?: Package;
|
||||
|
||||
/**
|
||||
* Deployment key used when deploying the previous package.
|
||||
*/
|
||||
previousDeploymentKey?: string;
|
||||
|
||||
/**
|
||||
* The label (v#) of the package that was upgraded from.
|
||||
*/
|
||||
previousLabelOrAppVersion?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorates a React Component configuring it to sync for updates with the Goby server.
|
||||
*
|
||||
* @param options Options used to configure the end-user sync and update experience (e.g. when to check for updates?, show an prompt?, install the update immediately?).
|
||||
*/
|
||||
declare function Goby(options?: GobyOptions): Function;
|
||||
|
||||
declare namespace Goby {
|
||||
/**
|
||||
* Represents the default settings that will be used by the sync method if
|
||||
* an update dialog is configured to be displayed.
|
||||
*/
|
||||
var DEFAULT_UPDATE_DIALOG: UpdateDialog;
|
||||
|
||||
/**
|
||||
* Asks the Goby service whether the configured app deployment has an update available.
|
||||
*
|
||||
* @param deploymentKey The deployment key to use to query the Goby server for an update.
|
||||
*/
|
||||
function checkForUpdate(deploymentKey?: string): Promise<RemotePackage>;
|
||||
|
||||
/**
|
||||
* Retrieves the metadata for an installed update (e.g. description, mandatory).
|
||||
*
|
||||
* @param updateState The state of the update you want to retrieve the metadata for. Defaults to UpdateState.RUNNING.
|
||||
*/
|
||||
function getUpdateMetadata(updateState?: UpdateState): Promise<LocalPackage>;
|
||||
|
||||
/**
|
||||
* Notifies the Goby runtime that an installed update is considered successful.
|
||||
*/
|
||||
function notifyAppReady(): Promise<StatusReport>;
|
||||
|
||||
/**
|
||||
* Allow Goby to restart the app.
|
||||
*/
|
||||
function allowRestart(): void;
|
||||
|
||||
/**
|
||||
* Forbid Goby to restart the app.
|
||||
*/
|
||||
function disallowRestart(): void;
|
||||
|
||||
/**
|
||||
* Immediately restarts the app.
|
||||
*
|
||||
* @param onlyIfUpdateIsPending Indicates whether you want the restart to no-op if there isn't currently a pending update.
|
||||
*/
|
||||
function restartApp(onlyIfUpdateIsPending?: boolean): void;
|
||||
|
||||
/**
|
||||
* Allows checking for an update, downloading it and installing it, all with a single call.
|
||||
*
|
||||
* @param options Options used to configure the end-user update experience (e.g. show an prompt?, install the update immediately?).
|
||||
* @param syncStatusChangedCallback An optional callback that allows tracking the status of the sync operation, as opposed to simply checking the resolved state via the returned Promise.
|
||||
* @param downloadProgressCallback An optional callback that allows tracking the progress of an update while it is being downloaded.
|
||||
*/
|
||||
function sync(options?: SyncOptions, syncStatusChangedCallback?: SyncStatusChangedCallback, downloadProgressCallback?: DownloadProgressCallback): Promise<SyncStatus>;
|
||||
|
||||
/**
|
||||
* Indicates when you would like an installed update to actually be applied.
|
||||
*/
|
||||
enum InstallMode {
|
||||
/**
|
||||
* Indicates that you want to install the update and restart the app immediately.
|
||||
*/
|
||||
IMMEDIATE,
|
||||
|
||||
/**
|
||||
* Indicates that you want to install the update, but not forcibly restart the app.
|
||||
*/
|
||||
ON_NEXT_RESTART,
|
||||
|
||||
/**
|
||||
* Indicates that you want to install the update, but don't want to restart the
|
||||
* app until the next time the end user resumes it from the background.
|
||||
*/
|
||||
ON_NEXT_RESUME
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates the current status of a sync operation.
|
||||
*/
|
||||
enum SyncStatus {
|
||||
/**
|
||||
* The Goby server is being queried for an update.
|
||||
*/
|
||||
CHECKING_FOR_UPDATE,
|
||||
|
||||
/**
|
||||
* An update is available, and a confirmation dialog was shown
|
||||
* to the end user. (This is only applicable when the updateDialog is used)
|
||||
*/
|
||||
AWAITING_USER_ACTION,
|
||||
|
||||
/**
|
||||
* An available update is being downloaded from the Goby server.
|
||||
*/
|
||||
DOWNLOADING_PACKAGE,
|
||||
|
||||
/**
|
||||
* An available update was downloaded and is about to be installed.
|
||||
*/
|
||||
INSTALLING_UPDATE,
|
||||
|
||||
/**
|
||||
* The app is up-to-date with the Goby server.
|
||||
*/
|
||||
UP_TO_DATE,
|
||||
|
||||
/**
|
||||
* The app had an optional update which the end user chose to ignore.
|
||||
* (This is only applicable when the updateDialog is used)
|
||||
*/
|
||||
UPDATE_IGNORED,
|
||||
|
||||
/**
|
||||
* An available update has been installed and will be run either immediately after the
|
||||
* syncStatusChangedCallback function returns or the next time the app resumes/restarts,
|
||||
* depending on the InstallMode specified in SyncOptions
|
||||
*/
|
||||
UPDATE_INSTALLED,
|
||||
|
||||
/**
|
||||
* There is an ongoing sync operation running which prevents the current call from being executed.
|
||||
*/
|
||||
SYNC_IN_PROGRESS,
|
||||
|
||||
/**
|
||||
* The sync operation encountered an unknown error.
|
||||
*/
|
||||
UNKNOWN_ERROR
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates the state that an update is currently in.
|
||||
*/
|
||||
enum UpdateState {
|
||||
/**
|
||||
* Indicates that an update represents the
|
||||
* version of the app that is currently running.
|
||||
*/
|
||||
RUNNING,
|
||||
|
||||
/**
|
||||
* Indicates than an update has been installed, but the
|
||||
* app hasn't been restarted yet in order to apply it.
|
||||
*/
|
||||
PENDING,
|
||||
|
||||
/**
|
||||
* Indicates than an update represents the latest available
|
||||
* release, and can be either currently running or pending.
|
||||
*/
|
||||
LATEST
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates the status of a deployment (after installing and restarting).
|
||||
*/
|
||||
enum DeploymentStatus {
|
||||
/**
|
||||
* The deployment failed (and was rolled back).
|
||||
*/
|
||||
FAILED,
|
||||
|
||||
/**
|
||||
* The deployment succeeded.
|
||||
*/
|
||||
SUCCEEDED
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates when you would like to check for (and install) updates from the Goby server.
|
||||
*/
|
||||
enum CheckFrequency {
|
||||
/**
|
||||
* When the app is fully initialized (or more specifically, when the root component is mounted).
|
||||
*/
|
||||
ON_APP_START,
|
||||
|
||||
/**
|
||||
* When the app re-enters the foreground.
|
||||
*/
|
||||
ON_APP_RESUME,
|
||||
|
||||
/**
|
||||
* Don't automatically check for updates, but only do it when goby.sync() is manully called inside app code.
|
||||
*/
|
||||
MANUAL
|
||||
}
|
||||
}
|
||||
|
||||
export default Goby;
|
||||
@@ -0,0 +1,23 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import {
|
||||
View,
|
||||
AppRegistry
|
||||
} from 'react-native';
|
||||
|
||||
import Goby from "react-native-goby";
|
||||
|
||||
class Home extends React.Component<any, any> {
|
||||
render() {
|
||||
return (
|
||||
<View></View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AppRegistry.registerComponent('home', () => Goby({
|
||||
updateDialog: false,
|
||||
checkFrequency: Goby.CheckFrequency.ON_APP_RESUME,
|
||||
installMode: Goby.InstallMode.IMMEDIATE
|
||||
})(Home));
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"jsx": "react",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-native-goby-tests.tsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// Lowercase `object` is available in TypeScript 2.2 only.
|
||||
"ban-types": false,
|
||||
// Below are all TODO
|
||||
"align": false,
|
||||
"array-type": false,
|
||||
"comment-format": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"no-misused-new": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-empty-interface": false,
|
||||
"no-padding": false,
|
||||
"no-var": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-method-signature": false,
|
||||
"semicolon": false,
|
||||
"strict-export-declare-modifiers": false
|
||||
}
|
||||
}
|
||||
Vendored
+30
-6
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-native 0.43
|
||||
// Type definitions for react-native 0.44
|
||||
// Project: https://github.com/facebook/react-native
|
||||
// Definitions by: Eloy Durán <https://github.com/alloy>, Fedor Nezhivoi <https://github.com/gyzerok>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -3123,9 +3123,9 @@ export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS {
|
||||
}
|
||||
|
||||
/*
|
||||
* @see https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageSourcePropType.js
|
||||
*/
|
||||
interface ImageURISource {
|
||||
* @see https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageSourcePropType.js
|
||||
*/
|
||||
export interface ImageURISource {
|
||||
/**
|
||||
* `uri` is a string representing the resource identifier for the image, which
|
||||
* could be an http address, a local file path, or the name of a static image
|
||||
@@ -3435,6 +3435,13 @@ export interface FlatListProperties<ItemT> {
|
||||
*/
|
||||
data: ItemT[] | null;
|
||||
|
||||
/**
|
||||
* A marker property for telling the list to re-render (since it implements PureComponent).
|
||||
* If any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the `data` prop,
|
||||
* stick it here and treat it immutably.
|
||||
*/
|
||||
extraData?: any
|
||||
|
||||
/**
|
||||
* `getItemLayout` is an optional optimization that lets us skip measurement of dynamic
|
||||
* content if you know the height of items a priori. getItemLayout is the most efficient,
|
||||
@@ -3598,6 +3605,13 @@ export interface SectionListProperties<ItemT> extends ScrollViewProperties {
|
||||
*/
|
||||
SectionSeparatorComponent?: React.ComponentClass<any> | null
|
||||
|
||||
/**
|
||||
* A marker property for telling the list to re-render (since it implements PureComponent).
|
||||
* If any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the `data` prop,
|
||||
* stick it here and treat it immutably.
|
||||
*/
|
||||
extraData?: any
|
||||
|
||||
/**
|
||||
* Used to extract a unique key for a given item at the specified index. Key is used for caching
|
||||
* and as the react key to track item re-ordering. The default extractor checks `item.key`, then
|
||||
@@ -5083,6 +5097,11 @@ export interface TabBarItemProperties extends ViewProperties {
|
||||
*/
|
||||
badge?: string | number
|
||||
|
||||
/**
|
||||
* Background color for the badge. Available since iOS 10.
|
||||
*/
|
||||
badgeColor?: string
|
||||
|
||||
/**
|
||||
* A custom icon for the tab. It is ignored when a system icon is defined.
|
||||
*/
|
||||
@@ -5168,6 +5187,11 @@ export interface TabBarIOSProperties extends ViewProperties {
|
||||
* Color of text on unselected tabs
|
||||
*/
|
||||
unselectedTintColor?: string
|
||||
|
||||
/**
|
||||
* Color of unselected tab icons. Available since iOS 10.
|
||||
*/
|
||||
unselectedItemTintColor?: string
|
||||
}
|
||||
|
||||
export interface TabBarIOSStatic extends React.ComponentClass<TabBarIOSProperties> {
|
||||
@@ -5769,7 +5793,7 @@ export interface ScrollViewPropertiesIOS {
|
||||
* This can be used for paginating through children that have lengths smaller than the scroll view.
|
||||
* Used in combination with snapToAlignment.
|
||||
*/
|
||||
snapToInterval?: number[]
|
||||
snapToInterval?: number
|
||||
|
||||
/**
|
||||
* An array of child indices determining which children get docked to the
|
||||
@@ -6273,7 +6297,7 @@ export interface AdSupportIOSStatic {
|
||||
|
||||
interface AlertIOSButton {
|
||||
text: string
|
||||
onPress?: () => void
|
||||
onPress?: (message?: string) => void
|
||||
style?: "default" | "cancel" | "destructive"
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import {
|
||||
ScrollView,
|
||||
ScrollViewProps,
|
||||
RefreshControl,
|
||||
TabBarIOS,
|
||||
} from 'react-native';
|
||||
|
||||
function testDimensions() {
|
||||
@@ -255,3 +256,30 @@ class ScrollerListComponentTest extends React.Component<{}, { dataSource: ListVi
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class TabBarTest extends React.Component<{}, {}> {
|
||||
render() {
|
||||
return (
|
||||
<TabBarIOS
|
||||
barTintColor="darkslateblue"
|
||||
itemPositioning="center"
|
||||
tintColor="white"
|
||||
translucent={ true }
|
||||
unselectedTintColor="black"
|
||||
unselectedItemTintColor="red">
|
||||
<TabBarIOS.Item
|
||||
badge={ 0 }
|
||||
badgeColor="red"
|
||||
icon={{uri: undefined}}
|
||||
selected={ true }
|
||||
onPress={() => {}}
|
||||
renderAsOriginal={ true }
|
||||
selectedIcon={ undefined }
|
||||
systemIcon="history"
|
||||
title="Item 1">
|
||||
</TabBarIOS.Item>
|
||||
</TabBarIOS>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+5
-5
@@ -584,11 +584,11 @@ export interface StackNavigatorScreenOptions {
|
||||
export interface TabNavigatorScreenOptions {
|
||||
title?: string;
|
||||
tabBarVisible?: boolean;
|
||||
tabBarIcon?: React.ReactElement<any>;
|
||||
tabBarLaben?: string
|
||||
|React.ReactElement<any>
|
||||
| ((options: {focused: boolean, tintColor: string}) => React.ReactElement<any>)
|
||||
;
|
||||
tabBarIcon?: React.ReactElement<any>
|
||||
| ((options: { focused: boolean, tintColor: string }) => React.ReactElement<any>);
|
||||
tabBarLabel?: string
|
||||
| React.ReactElement<any>
|
||||
| ((options: { focused: boolean, tintColor: string }) => React.ReactElement<any>);
|
||||
}
|
||||
|
||||
export interface DrawerNavigatorScreenOptions {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { View } from 'react-native';
|
||||
import {
|
||||
addNavigationHelpers,
|
||||
StackNavigator,
|
||||
TabNavigatorScreenOptions
|
||||
} from 'react-navigation';
|
||||
|
||||
const Start = (
|
||||
@@ -28,3 +29,10 @@ const Router = (props: any) => (
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
const tabNavigatorScreenOptions: TabNavigatorScreenOptions = {
|
||||
title: 'title',
|
||||
tabBarVisible: true,
|
||||
tabBarIcon: <View />,
|
||||
tabBarLabel: 'label'
|
||||
}
|
||||
|
||||
Vendored
+10
-9
@@ -12,6 +12,7 @@
|
||||
// Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Huy Nguyen <https://github.com/huy-nguyen>
|
||||
// Jérémy Fauvel <https://github.com/grmiade>
|
||||
// Daniel Roth <https://github.com/DaIgeb>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -36,13 +37,13 @@ export interface MemoryRouterProps {
|
||||
keyLength?: number;
|
||||
}
|
||||
|
||||
export class MemoryRouter extends React.Component<MemoryRouterProps, void> {}
|
||||
export class MemoryRouter extends React.Component<MemoryRouterProps, void> { }
|
||||
|
||||
export interface PromptProps {
|
||||
message: string | ((location: H.Location) => void);
|
||||
when?: boolean;
|
||||
}
|
||||
export class Prompt extends React.Component<PromptProps, void> {}
|
||||
export class Prompt extends React.Component<PromptProps, void> { }
|
||||
|
||||
export interface RedirectProps {
|
||||
to: H.LocationDescriptor;
|
||||
@@ -52,7 +53,7 @@ export interface RedirectProps {
|
||||
exact?: boolean;
|
||||
strict?: boolean;
|
||||
}
|
||||
export class Redirect extends React.Component<RedirectProps, void> {}
|
||||
export class Redirect extends React.Component<RedirectProps, void> { }
|
||||
|
||||
export interface RouteComponentProps<P> {
|
||||
match: match<P>;
|
||||
@@ -69,12 +70,12 @@ export interface RouteProps {
|
||||
exact?: boolean;
|
||||
strict?: boolean;
|
||||
}
|
||||
export class Route extends React.Component<RouteProps, undefined> {}
|
||||
export class Route extends React.Component<RouteProps, {}> { }
|
||||
|
||||
export interface RouterProps {
|
||||
history: any;
|
||||
}
|
||||
export class Router extends React.Component<RouterProps, undefined> {}
|
||||
export class Router extends React.Component<RouterProps, {}> { }
|
||||
|
||||
export interface StaticRouterProps {
|
||||
basename?: string;
|
||||
@@ -82,12 +83,12 @@ export interface StaticRouterProps {
|
||||
context?: object;
|
||||
}
|
||||
|
||||
export class StaticRouter extends React.Component<StaticRouterProps, undefined> {}
|
||||
export class StaticRouter extends React.Component<StaticRouterProps, {}> { }
|
||||
export interface SwitchProps {
|
||||
children?: JSX.Element | JSX.Element[];
|
||||
children?: React.ReactNode;
|
||||
location?: H.Location;
|
||||
}
|
||||
export class Switch extends React.Component<SwitchProps, undefined> {}
|
||||
export class Switch extends React.Component<SwitchProps, {}> { }
|
||||
|
||||
export interface match<P> {
|
||||
params: P;
|
||||
@@ -97,4 +98,4 @@ export interface match<P> {
|
||||
}
|
||||
|
||||
export function matchPath<P>(pathname: string, props: RouteProps): match<P> | null;
|
||||
export function withRouter(component: React.SFC<RouteComponentProps<any>> | React.ComponentClass<RouteComponentProps<any>>): React.ComponentClass<any>;
|
||||
export function withRouter<P>(component: React.SFC<RouteComponentProps<any> & P> | React.ComponentClass<RouteComponentProps<any> & P>): React.ComponentClass<P>;
|
||||
|
||||
@@ -2,12 +2,18 @@ import * as React from 'react';
|
||||
import { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom';
|
||||
|
||||
const Home = () => <h2>Home</h2>;
|
||||
const About = () => <h2>About</h2>;
|
||||
const User = () => <h2>User</h2>;
|
||||
|
||||
const SwitchTest = () => (
|
||||
<BrowserRouter>
|
||||
<Switch>
|
||||
<Redirect exact from="/" to="/home"/>
|
||||
<Route path="/home" component={Home}/>
|
||||
{[
|
||||
<Route path="/user" component={User}/>,
|
||||
<Route path="/about" component={About}/>
|
||||
]}
|
||||
</Switch>
|
||||
</BrowserRouter>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import * as React from 'react';
|
||||
import { withRouter, RouteComponentProps } from 'react-router-dom';
|
||||
|
||||
interface TOwnProps {
|
||||
username: string;
|
||||
}
|
||||
|
||||
const Component = (props: TOwnProps & RouteComponentProps<{}>) => <h2>Welcome {props.username}</h2>;
|
||||
|
||||
const WithRouterComponent = withRouter<TOwnProps>(Component);
|
||||
|
||||
const WithRouterTest = () => (<WithRouterComponent username="John" />);
|
||||
|
||||
export default WithRouterTest;
|
||||
@@ -28,6 +28,7 @@
|
||||
"test/Recursive.tsx",
|
||||
"test/RouteConfig.tsx",
|
||||
"test/Sidebar.tsx",
|
||||
"test/Switch.tsx"
|
||||
"test/Switch.tsx",
|
||||
"test/WithRouter.tsx"
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+13
-1
@@ -3211,7 +3211,7 @@ declare namespace sequelize {
|
||||
* https://github.com/sequelize/sequelize/blob/master/docs/docs/models-usage.md#user-content-manipulating-the-dataset-with-limit-offset-order-and-group
|
||||
*/
|
||||
group?: string | string[] | Object;
|
||||
|
||||
|
||||
/**
|
||||
* Apply DISTINCT(col) for FindAndCount(all)
|
||||
*/
|
||||
@@ -3371,6 +3371,13 @@ declare namespace sequelize {
|
||||
* Defaults to false;
|
||||
*/
|
||||
cascade?: boolean;
|
||||
|
||||
/**
|
||||
* Delete instead of setting deletedAt to current timestamp (only applicable if paranoid is enabled)
|
||||
*
|
||||
* Defaults to false;
|
||||
*/
|
||||
force?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4750,6 +4757,11 @@ declare namespace sequelize {
|
||||
*/
|
||||
fields?: Array<string | { attribute: string, length: number, order: string, collate: string }>;
|
||||
|
||||
/**
|
||||
* Condition for partioal index
|
||||
*/
|
||||
where?: WhereOptions;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -992,6 +992,9 @@ User.bulkCreate( [{ name : 'foo', code : '123' }, { code : '1234' }], { fields :
|
||||
User.bulkCreate( [{ name : 'a', c : 'b' }, { name : 'e', c : 'f' }], { fields : ['e', 'f'], ignoreDuplicates : true } );
|
||||
|
||||
User.truncate();
|
||||
User.truncate( { cascade : true } );
|
||||
User.truncate( { force : true } );
|
||||
User.truncate( { cascade: true, force : true } );
|
||||
|
||||
User.destroy( { where : { client_id : 13 } } ).then( ( a ) => a.toFixed() );
|
||||
User.destroy( { force : true } );
|
||||
@@ -1258,7 +1261,7 @@ s.define( 'UserWithUniqueUsername', {
|
||||
username : { type : Sequelize.STRING, unique : { name : 'user_and_email', msg : 'User and email must be unique' } },
|
||||
email : { type : Sequelize.STRING, unique : 'user_and_email' }
|
||||
} );
|
||||
/* NOTE https://github.com/DefinitelyTyped/DefinitelyTyped/pull/5590
|
||||
|
||||
s.define( 'UserWithUniqueUsername', {
|
||||
user_id : { type : Sequelize.INTEGER },
|
||||
email : { type : Sequelize.STRING }
|
||||
@@ -1266,13 +1269,15 @@ s.define( 'UserWithUniqueUsername', {
|
||||
indexes : [
|
||||
{
|
||||
name : 'user_and_email_index',
|
||||
msg : 'User and email must be unique',
|
||||
unique : true,
|
||||
method : 'BTREE',
|
||||
fields : ['user_id', { attribute : 'email', collate : 'en_US', order : 'DESC', length : 5 }]
|
||||
fields : ['user_id', { attribute : 'email', collate : 'en_US', order : 'DESC', length : 5 }],
|
||||
where : {
|
||||
user_id : { $not: null }
|
||||
}
|
||||
}]
|
||||
} );
|
||||
*/
|
||||
|
||||
s.define( 'TaskBuild', {
|
||||
title : { type : Sequelize.STRING, defaultValue : 'a task!' },
|
||||
foo : { type : Sequelize.INTEGER, defaultValue : 2 },
|
||||
|
||||
Vendored
+16
-10
@@ -1,6 +1,8 @@
|
||||
// Type definitions for WebAssembly v1 (MVP)
|
||||
// Project: https://github.com/winksaville/test-webassembly-js-ts
|
||||
// Definitions by: 01alchemist <https://twitter.com/01alchemist>, Wink Saville <wink@saville.com>
|
||||
// Definitions by: 01alchemist <https://twitter.com/01alchemist>
|
||||
// Wink Saville <wink@saville.com>
|
||||
// Periklis Tsirakidis <https://github.com/periklis>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
@@ -9,21 +11,25 @@
|
||||
* for more information.
|
||||
*/
|
||||
declare namespace WebAssembly {
|
||||
type Imports = Array<{
|
||||
name: string;
|
||||
kind: string;
|
||||
}>;
|
||||
|
||||
type Exports = Array<{
|
||||
module: string;
|
||||
name: string;
|
||||
kind: string;
|
||||
}>;
|
||||
|
||||
/**
|
||||
* WebAssembly.Module
|
||||
*/
|
||||
class Module {
|
||||
constructor(bufferSource: ArrayBuffer | Uint8Array);
|
||||
static customSections(module: Module, sectionName: string): ArrayBuffer[];
|
||||
static exports(module: Module): Array<{
|
||||
name: string;
|
||||
kind: string;
|
||||
}>;
|
||||
static imports(module: Module): Array<{
|
||||
module: string;
|
||||
name: string;
|
||||
kind: string;
|
||||
}>;
|
||||
static exports(module: Module): Imports;
|
||||
static imports(module: Module): Exports;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+1
-1
@@ -85,5 +85,5 @@ declare class XMLElementOrXMLNode {
|
||||
}
|
||||
|
||||
declare namespace xmlbuilder {
|
||||
function create(name: string, xmldec?: Object, doctype?: any, options?: Object): XMLElementOrXMLNode;
|
||||
function create(nameOrObjSpec: string | { [name:string]: Object }, xmldec?: Object, doctype?: any, options?: Object): XMLElementOrXMLNode;
|
||||
}
|
||||
|
||||
@@ -41,3 +41,10 @@ xml('root')
|
||||
.up()
|
||||
.ele('atttest', 'text')
|
||||
.end();
|
||||
|
||||
xml({
|
||||
displayNotification: {
|
||||
level: 'error',
|
||||
message: 'an error occurred'
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user