mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-07 16:30:12 +08:00
Merge pull request #5590 from borisyankov/tsc-1.6
[WIP] start supporting for TypeScript 1.6.0
This commit is contained in:
@@ -1 +1 @@
|
||||
--experimentalDecorators --target ES5
|
||||
--experimentalDecorators --noImplicitAny --target ES5
|
||||
|
||||
Vendored
+1424
-1422
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./async.d.ts" />
|
||||
|
||||
import async = require("async");
|
||||
|
||||
async.map(["a", "b", "c"], (item, cb) => cb(null, [item.toUpperCase()]), (err, results) => { });
|
||||
async.map(["a", "b", "c"], (item, cb) => cb(null, [item.toUpperCase()]), (err, results) => { });
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/// <reference path="./bowser.d.ts" />
|
||||
|
||||
import Bowser = require('bowser');
|
||||
|
||||
Bowser.msedge === true;
|
||||
Bowser.test(['msie']) === true;
|
||||
Bowser.a === Bowser.c;
|
||||
Bowser.osversion > 10;
|
||||
Bowser.osversion === '10.1A';
|
||||
Bowser.osversion === '10.1A';
|
||||
|
||||
+13
-7
@@ -11,7 +11,7 @@ function test_dataType() {
|
||||
var x = typ.parentEnum === <breeze.core.IEnum> breeze.DataType;
|
||||
var isFalse = breeze.DataType.contains(breeze.DataType.Double);
|
||||
var dt = breeze.DataType.fromName("Decimal");
|
||||
|
||||
|
||||
}
|
||||
|
||||
function test_dataProperty() {
|
||||
@@ -33,7 +33,7 @@ function test_dataService() {
|
||||
var em = new breeze.EntityManager({
|
||||
dataService: ds
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function test_entityAspect() {
|
||||
@@ -69,7 +69,7 @@ function test_entityAspect() {
|
||||
var errorsAdded = validationChangeArgs.added;
|
||||
var errorsCleared = validationChangeArgs.removed;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function test_entityKey() {
|
||||
@@ -132,7 +132,7 @@ function test_entityManager() {
|
||||
serviceName: "breeze/NorthwindIBModel",
|
||||
metadataStore: metadataStore
|
||||
});
|
||||
|
||||
|
||||
return new breeze.QueryOptions({
|
||||
mergeStrategy: null,
|
||||
fetchStrategy: this.fetchStrategy
|
||||
@@ -157,7 +157,7 @@ function test_entityManager() {
|
||||
|
||||
var cust2 = em1.createEntity("Customer", { companyName: "foo" });
|
||||
var cust3 = em1.createEntity("foo", { xxx: 3 }, breeze.EntityState.Added);
|
||||
|
||||
|
||||
em1.attachEntity(cust1, breeze.EntityState.Added);
|
||||
em1.clear();
|
||||
var em2 = em1.createEmptyCopy();
|
||||
@@ -246,7 +246,7 @@ function test_entityManager() {
|
||||
var custType = <breeze.EntityType> em1.metadataStore.getEntityType("Customer");
|
||||
var orderType = <breeze.EntityType> em1.metadataStore.getEntityType("Order");
|
||||
if (em1.hasChanges([custType, orderType])) { };
|
||||
|
||||
|
||||
var bundle = em1.exportEntities();
|
||||
window.localStorage.setItem("myEntityManager", bundle);
|
||||
var bundleFromStorage = window.localStorage.getItem("myEntityManager");
|
||||
@@ -434,7 +434,7 @@ function test_entityState() {
|
||||
return es === breeze.EntityState.Unchanged;
|
||||
var es = anEntity.entityAspect.entityState;
|
||||
return es.isUnchangedOrModified();
|
||||
|
||||
|
||||
return es === breeze.EntityState.Unchanged || es === breeze.EntityState.Modified;
|
||||
}
|
||||
|
||||
@@ -443,12 +443,14 @@ function test_entityType() {
|
||||
var myEntityType: breeze.EntityType;
|
||||
var dataProperty1: breeze.DataProperty, dataProperty2: breeze.DataProperty, navigationProperty1: breeze.DataProperty;
|
||||
var em1: breeze.EntityManager;
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
var entityManager = new breeze.EntityType({
|
||||
metadataStore: myMetadataStore,
|
||||
serviceName: "breeze/NorthwindIBModel",
|
||||
name: "person",
|
||||
namespace: "myAppNamespace"
|
||||
});
|
||||
*/
|
||||
myEntityType.addProperty(dataProperty1);
|
||||
myEntityType.addProperty(dataProperty2);
|
||||
myEntityType.addProperty(navigationProperty1);
|
||||
@@ -759,9 +761,11 @@ function test_validator() {
|
||||
orderType = <breeze.EntityType> em1.metadataStore.getEntityType("Order");
|
||||
var orderDateProperty = orderType.getProperty("OrderDate");
|
||||
orderDateProperty.validators.push(breeze.Validator.date());
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
var v0 = breeze.Validator.maxLength({ maxLength: 5, displayName: "City" });
|
||||
v0.validate("adasdfasdf");
|
||||
var errMessage = v0.getMessage();
|
||||
*/
|
||||
custType = <breeze.EntityType> em1.metadataStore.getEntityType("Customer");
|
||||
var customerIdProperty = custType.getProperty("CustomerID");
|
||||
customerIdProperty.validators.push(breeze.Validator.guid());
|
||||
@@ -788,6 +792,7 @@ function test_validator() {
|
||||
regionProperty.validators.push(breeze.Validator.string());
|
||||
custType = <breeze.EntityType> em1.metadataStore.getEntityType("Customer");
|
||||
regionProperty = custType.getProperty("Region");
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
regionProperty.validators.push(breeze.Validator.stringLength({ minLength: 2, maxLength: 5 }));
|
||||
var validator = breeze.Validator.maxLength({ maxLength: 5, displayName: "City" });
|
||||
var result = validator.validate("asdf");
|
||||
@@ -796,6 +801,7 @@ function test_validator() {
|
||||
var errMsg = result.errorMessage;
|
||||
var context = result.context;
|
||||
var sameValidator = result.validator;
|
||||
*/
|
||||
var valFn = function (v: any) {
|
||||
if (v == null) return true;
|
||||
return (v.substr(0,2) === "US");
|
||||
|
||||
@@ -29,7 +29,7 @@ $ = cheerio.load(html, {
|
||||
normalizeWhitespace: true,
|
||||
xmlMode: true,
|
||||
decodeEntities: true,
|
||||
lowercaseTags: true,
|
||||
lowerCaseTags: true,
|
||||
lowerCaseAttributeNames: true,
|
||||
recognizeCDATA: true,
|
||||
recognizeSelfClosing: true
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./clone.d.ts" />
|
||||
|
||||
import clone = require("clone");
|
||||
|
||||
var original = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../express/express.d.ts"/>
|
||||
/// <reference path="./connect-slashes.d.ts"/>
|
||||
|
||||
import express = require('express');
|
||||
import slashes = require('connect-slashes');
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./contextjs.d.ts" />
|
||||
|
||||
import context = require("contextjs");
|
||||
|
||||
context.init();
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./convert-source-map.d.ts" />
|
||||
|
||||
import convert = require("convert-source-map");
|
||||
|
||||
var json = convert
|
||||
@@ -10,4 +12,4 @@ var modified = convert
|
||||
.toJSON();
|
||||
|
||||
console.log(json);
|
||||
console.log(modified);
|
||||
console.log(modified);
|
||||
|
||||
Vendored
+146
-151
@@ -22,13 +22,13 @@ declare type PropertyKey = string | number | symbol;
|
||||
|
||||
// #############################################################################################
|
||||
// ECMAScript 6: Object & Function
|
||||
// Modules: es6.object.assign, es6.object.is, es6.object.set-prototype-of,
|
||||
// Modules: es6.object.assign, es6.object.is, es6.object.set-prototype-of,
|
||||
// es6.object.to-string, es6.function.name and es6.function.has-instance.
|
||||
// #############################################################################################
|
||||
|
||||
|
||||
interface ObjectConstructor {
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects to copy properties from.
|
||||
@@ -57,10 +57,10 @@ interface Function {
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Determines if a constructor object recognizes an object as one of the
|
||||
/**
|
||||
* Determines if a constructor object recognizes an object as one of the
|
||||
* constructor’s instances.
|
||||
* @param value The object to test.
|
||||
* @param value The object to test.
|
||||
*/
|
||||
[Symbol.hasInstance](value: any): boolean;
|
||||
}
|
||||
@@ -71,30 +71,25 @@ interface Function {
|
||||
// and es6.array.find-index
|
||||
// #############################################################################################
|
||||
|
||||
interface ArrayLike<T> {
|
||||
length: number;
|
||||
[n: number]: T;
|
||||
}
|
||||
|
||||
interface Array<T> {
|
||||
/**
|
||||
* Returns the value of the first element in the array where predicate is true, and undefined
|
||||
/**
|
||||
* Returns the value of the first element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* immediately returns that element value. Otherwise, find returns undefined.
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* predicate. If it is not provided, undefined is used instead.
|
||||
*/
|
||||
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
|
||||
|
||||
/**
|
||||
* Returns the index of the first element in the array where predicate is true, and undefined
|
||||
/**
|
||||
* Returns the index of the first element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* immediately returns that element value. Otherwise, find returns undefined.
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* predicate. If it is not provided, undefined is used instead.
|
||||
*/
|
||||
findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
|
||||
@@ -102,21 +97,21 @@ interface Array<T> {
|
||||
/**
|
||||
* Returns the this object after filling the section identified by start and end with value
|
||||
* @param value value to fill array section with
|
||||
* @param start index to start filling the array at. If start is negative, it is treated as
|
||||
* length+start where length is the length of the array.
|
||||
* @param end index to stop filling the array at. If end is negative, it is treated as
|
||||
* @param start index to start filling the array at. If start is negative, it is treated as
|
||||
* length+start where length is the length of the array.
|
||||
* @param end index to stop filling the array at. If end is negative, it is treated as
|
||||
* length+end.
|
||||
*/
|
||||
fill(value: T, start?: number, end?: number): T[];
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns the this object after copying a section of the array identified by start and end
|
||||
* to the same array starting at position target
|
||||
* @param target If target is negative, it is treated as length+target where length is the
|
||||
* length of the array.
|
||||
* @param start If start is negative, it is treated as length+start. If end is negative, it
|
||||
* @param target If target is negative, it is treated as length+target where length is the
|
||||
* length of the array.
|
||||
* @param start If start is negative, it is treated as length+start. If end is negative, it
|
||||
* is treated as length+end.
|
||||
* @param end If not specified, length of the this object is used as its default value.
|
||||
* @param end If not specified, length of the this object is used as its default value.
|
||||
*/
|
||||
copyWithin(target: number, start: number, end?: number): T[];
|
||||
|
||||
@@ -161,47 +156,47 @@ interface ArrayConstructor {
|
||||
|
||||
// #############################################################################################
|
||||
// ECMAScript 6: String & RegExp
|
||||
// Modules: es6.string.from-code-point, es6.string.raw, es6.string.code-point-at,
|
||||
// es6.string.ends-with, es6.string.includes, es6.string.repeat,
|
||||
// Modules: es6.string.from-code-point, es6.string.raw, es6.string.code-point-at,
|
||||
// es6.string.ends-with, es6.string.includes, es6.string.repeat,
|
||||
// es6.string.starts-with, and es6.regexp
|
||||
// #############################################################################################
|
||||
|
||||
interface String {
|
||||
/**
|
||||
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
|
||||
* value of the UTF-16 encoded code point starting at the string element at position pos in
|
||||
* the String resulting from converting this object to a String.
|
||||
* If there is no element at that position, the result is undefined.
|
||||
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
|
||||
* value of the UTF-16 encoded code point starting at the string element at position pos in
|
||||
* the String resulting from converting this object to a String.
|
||||
* If there is no element at that position, the result is undefined.
|
||||
* If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
|
||||
*/
|
||||
codePointAt(pos: number): number;
|
||||
|
||||
/**
|
||||
* Returns true if searchString appears as a substring of the result of converting this
|
||||
* object to a String, at one or more positions that are
|
||||
* Returns true if searchString appears as a substring of the result of converting this
|
||||
* object to a String, at one or more positions that are
|
||||
* greater than or equal to position; otherwise, returns false.
|
||||
* @param searchString search string
|
||||
* @param searchString search string
|
||||
* @param position If position is undefined, 0 is assumed, so as to search all of the String.
|
||||
*/
|
||||
includes(searchString: string, position?: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* endPosition – length(this). Otherwise returns false.
|
||||
*/
|
||||
endsWith(searchString: string, endPosition?: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns a String value that is made from count copies appended together. If count is 0,
|
||||
* Returns a String value that is made from count copies appended together. If count is 0,
|
||||
* T is the empty String is returned.
|
||||
* @param count number of copies to append
|
||||
*/
|
||||
repeat(count: number): string;
|
||||
|
||||
/**
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* position. Otherwise returns false.
|
||||
*/
|
||||
startsWith(searchString: string, position?: number): boolean;
|
||||
@@ -216,7 +211,7 @@ interface StringConstructor {
|
||||
|
||||
/**
|
||||
* String.raw is intended for use as a tag function of a Tagged Template String. When called
|
||||
* as such the first argument will be a well formed template call site object and the rest
|
||||
* as such the first argument will be a well formed template call site object and the rest
|
||||
* parameter will contain the substitution values.
|
||||
* @param template A well-formed template string call site representation.
|
||||
* @param substitutions A set of substitution values.
|
||||
@@ -248,14 +243,14 @@ interface RegExp {
|
||||
interface NumberConstructor {
|
||||
/**
|
||||
* The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
|
||||
* that is representable as a Number value, which is approximately:
|
||||
* that is representable as a Number value, which is approximately:
|
||||
* 2.2204460492503130808472633361816 x 10−16.
|
||||
*/
|
||||
EPSILON: number;
|
||||
|
||||
/**
|
||||
* Returns true if passed value is finite.
|
||||
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
|
||||
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
|
||||
* number. Only finite values of the type number, result in true.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
@@ -268,7 +263,7 @@ interface NumberConstructor {
|
||||
isInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
|
||||
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
|
||||
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
|
||||
* to a number. Only values of the type number, that are also NaN, result in true.
|
||||
* @param number A numeric value.
|
||||
@@ -281,30 +276,30 @@ interface NumberConstructor {
|
||||
*/
|
||||
isSafeInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* The value of the largest integer n such that n and n + 1 are both exactly representable as
|
||||
* a Number value.
|
||||
/**
|
||||
* The value of the largest integer n such that n and n + 1 are both exactly representable as
|
||||
* a Number value.
|
||||
* The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.
|
||||
*/
|
||||
MAX_SAFE_INTEGER: number;
|
||||
|
||||
/**
|
||||
* The value of the smallest integer n such that n and n − 1 are both exactly representable as
|
||||
* a Number value.
|
||||
/**
|
||||
* The value of the smallest integer n such that n and n − 1 are both exactly representable as
|
||||
* a Number value.
|
||||
* The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
|
||||
*/
|
||||
MIN_SAFE_INTEGER: number;
|
||||
|
||||
/**
|
||||
* Converts a string to a floating-point number.
|
||||
* @param string A string that contains a floating-point number.
|
||||
* Converts a string to a floating-point number.
|
||||
* @param string A string that contains a floating-point number.
|
||||
*/
|
||||
parseFloat(string: string): number;
|
||||
|
||||
/**
|
||||
* Converts A string to an integer.
|
||||
* @param s A string to convert into a number.
|
||||
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
|
||||
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
|
||||
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
||||
* All other strings are considered decimal.
|
||||
*/
|
||||
@@ -350,7 +345,7 @@ interface Math {
|
||||
log1p(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
|
||||
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
|
||||
* the natural logarithms).
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
@@ -436,8 +431,8 @@ interface Symbol {
|
||||
}
|
||||
|
||||
interface SymbolConstructor {
|
||||
/**
|
||||
* A reference to the prototype.
|
||||
/**
|
||||
* A reference to the prototype.
|
||||
*/
|
||||
prototype: Symbol;
|
||||
|
||||
@@ -448,14 +443,14 @@ interface SymbolConstructor {
|
||||
(description?: string|number): symbol;
|
||||
|
||||
/**
|
||||
* Returns a Symbol object from the global symbol registry matching the given key if found.
|
||||
* Returns a Symbol object from the global symbol registry matching the given key if found.
|
||||
* Otherwise, returns a new symbol with this key.
|
||||
* @param key key to search for.
|
||||
*/
|
||||
for(key: string): symbol;
|
||||
|
||||
/**
|
||||
* Returns a key from the global symbol registry matching the given Symbol if found.
|
||||
* Returns a key from the global symbol registry matching the given Symbol if found.
|
||||
* Otherwise, returns a undefined.
|
||||
* @param sym Symbol to find the key for.
|
||||
*/
|
||||
@@ -463,72 +458,72 @@ interface SymbolConstructor {
|
||||
|
||||
// Well-known Symbols
|
||||
|
||||
/**
|
||||
* A method that determines if a constructor object recognizes an object as one of the
|
||||
* constructor’s instances. Called by the semantics of the instanceof operator.
|
||||
/**
|
||||
* A method that determines if a constructor object recognizes an object as one of the
|
||||
* constructor’s instances. Called by the semantics of the instanceof operator.
|
||||
*/
|
||||
hasInstance: symbol;
|
||||
|
||||
/**
|
||||
/**
|
||||
* A Boolean value that if true indicates that an object should flatten to its array elements
|
||||
* by Array.prototype.concat.
|
||||
*/
|
||||
isConcatSpreadable: symbol;
|
||||
|
||||
/**
|
||||
* A method that returns the default iterator for an object. Called by the semantics of the
|
||||
/**
|
||||
* A method that returns the default iterator for an object. Called by the semantics of the
|
||||
* for-of statement.
|
||||
*/
|
||||
iterator: symbol;
|
||||
|
||||
/**
|
||||
* A regular expression method that matches the regular expression against a string. Called
|
||||
* by the String.prototype.match method.
|
||||
* A regular expression method that matches the regular expression against a string. Called
|
||||
* by the String.prototype.match method.
|
||||
*/
|
||||
match: symbol;
|
||||
|
||||
/**
|
||||
* A regular expression method that replaces matched substrings of a string. Called by the
|
||||
/**
|
||||
* A regular expression method that replaces matched substrings of a string. Called by the
|
||||
* String.prototype.replace method.
|
||||
*/
|
||||
replace: symbol;
|
||||
|
||||
/**
|
||||
* A regular expression method that returns the index within a string that matches the
|
||||
* A regular expression method that returns the index within a string that matches the
|
||||
* regular expression. Called by the String.prototype.search method.
|
||||
*/
|
||||
search: symbol;
|
||||
|
||||
/**
|
||||
* A function valued property that is the constructor function that is used to create
|
||||
/**
|
||||
* A function valued property that is the constructor function that is used to create
|
||||
* derived objects.
|
||||
*/
|
||||
species: symbol;
|
||||
|
||||
/**
|
||||
* A regular expression method that splits a string at the indices that match the regular
|
||||
* A regular expression method that splits a string at the indices that match the regular
|
||||
* expression. Called by the String.prototype.split method.
|
||||
*/
|
||||
split: symbol;
|
||||
|
||||
/**
|
||||
/**
|
||||
* A method that converts an object to a corresponding primitive value.Called by the ToPrimitive
|
||||
* abstract operation.
|
||||
*/
|
||||
toPrimitive: symbol;
|
||||
|
||||
/**
|
||||
/**
|
||||
* A String value that is used in the creation of the default string description of an object.
|
||||
* Called by the built-in method Object.prototype.toString.
|
||||
*/
|
||||
toStringTag: symbol;
|
||||
|
||||
/**
|
||||
* An Object whose own property names are property names that are excluded from the with
|
||||
/**
|
||||
* An Object whose own property names are property names that are excluded from the with
|
||||
* environment bindings of the associated objects.
|
||||
*/
|
||||
unscopables: symbol;
|
||||
|
||||
|
||||
/**
|
||||
* Non-standard. Use simple mode for core-js symbols. See https://github.com/zloirock/core-js/#caveats-when-using-symbol-polyfill
|
||||
*/
|
||||
@@ -544,12 +539,12 @@ declare var Symbol: SymbolConstructor;
|
||||
|
||||
interface Object {
|
||||
/**
|
||||
* Determines whether an object has a property with the specified name.
|
||||
* Determines whether an object has a property with the specified name.
|
||||
* @param v A property name.
|
||||
*/
|
||||
hasOwnProperty(v: PropertyKey): boolean;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Determines whether a specified property is enumerable.
|
||||
* @param v A property name.
|
||||
*/
|
||||
@@ -564,17 +559,17 @@ interface ObjectConstructor {
|
||||
getOwnPropertySymbols(o: any): symbol[];
|
||||
|
||||
/**
|
||||
* Gets the own property descriptor of the specified object.
|
||||
* An own property descriptor is one that is defined directly on the object and is not
|
||||
* inherited from the object's prototype.
|
||||
* Gets the own property descriptor of the specified object.
|
||||
* An own property descriptor is one that is defined directly on the object and is not
|
||||
* inherited from the object's prototype.
|
||||
* @param o Object that contains the property.
|
||||
* @param p Name of the property.
|
||||
*/
|
||||
getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
|
||||
|
||||
/**
|
||||
* Adds a property to an object, or modifies attributes of an existing property.
|
||||
* @param o Object on which to add or modify the property. This can be a native JavaScript
|
||||
* Adds a property to an object, or modifies attributes of an existing property.
|
||||
* @param o Object on which to add or modify the property. This can be a native JavaScript
|
||||
* object (that is, a user-defined object or a built in object) or a DOM object.
|
||||
* @param p The property name.
|
||||
* @param attributes Descriptor for the property. It can be for a data property or an accessor
|
||||
@@ -693,17 +688,17 @@ interface Array<T> {
|
||||
/** Iterator */
|
||||
[Symbol.iterator](): IterableIterator<T>;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the array
|
||||
*/
|
||||
entries(): IterableIterator<[number, T]>;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an list of keys in the array
|
||||
*/
|
||||
keys(): IterableIterator<number>;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an list of values in the array
|
||||
*/
|
||||
values(): IterableIterator<T>;
|
||||
@@ -776,21 +771,21 @@ interface Promise<T> {
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
/**
|
||||
* A reference to the prototype.
|
||||
/**
|
||||
* A reference to the prototype.
|
||||
*/
|
||||
prototype: Promise<any>;
|
||||
|
||||
/**
|
||||
* Creates a new Promise.
|
||||
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
|
||||
* a resolve callback used resolve the promise with a value or the result of another promise,
|
||||
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
|
||||
* a resolve callback used resolve the promise with a value or the result of another promise,
|
||||
* and a reject callback used to reject the promise with a provided reason or error.
|
||||
*/
|
||||
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
||||
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
||||
* resolve, or rejected when any Promise is rejected.
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
@@ -798,7 +793,7 @@ interface PromiseConstructor {
|
||||
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
* or rejected.
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
@@ -859,7 +854,7 @@ declare module Reflect {
|
||||
|
||||
// #############################################################################################
|
||||
// ECMAScript 7
|
||||
// Modules: es7.array.includes, es7.string.at, es7.string.lpad, es7.string.rpad,
|
||||
// Modules: es7.array.includes, es7.string.at, es7.string.lpad, es7.string.rpad,
|
||||
// es7.object.to-array, es7.object.get-own-property-descriptors, es7.regexp.escape,
|
||||
// es7.map.to-json, and es7.set.to-json
|
||||
// #############################################################################################
|
||||
@@ -918,14 +913,14 @@ interface ArrayConstructor {
|
||||
*/
|
||||
join<T>(array: ArrayLike<T>, separator?: string): string;
|
||||
/**
|
||||
* Reverses the elements in an Array.
|
||||
* Reverses the elements in an Array.
|
||||
*/
|
||||
reverse<T>(array: ArrayLike<T>): T[];
|
||||
/**
|
||||
* Removes the first element from an array and returns it.
|
||||
*/
|
||||
shift<T>(array: ArrayLike<T>): T;
|
||||
/**
|
||||
/**
|
||||
* Returns a section of an array.
|
||||
* @param start The beginning of the specified portion of the array.
|
||||
* @param end The end of the specified portion of the array.
|
||||
@@ -988,21 +983,21 @@ interface ArrayConstructor {
|
||||
|
||||
/**
|
||||
* Performs the specified action for each element in an array.
|
||||
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
|
||||
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
|
||||
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
||||
*/
|
||||
forEach<T>(array: ArrayLike<T>, callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Calls a defined callback function on each element of an array, and returns an array that contains the results.
|
||||
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
||||
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
||||
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
||||
*/
|
||||
map<T, U>(array: ArrayLike<T>, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
|
||||
|
||||
/**
|
||||
* Returns the elements of an array that meet the condition specified in a callback function.
|
||||
* @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
|
||||
* Returns the elements of an array that meet the condition specified in a callback function.
|
||||
* @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
|
||||
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
||||
*/
|
||||
filter<T>(array: ArrayLike<T>, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
|
||||
@@ -1021,53 +1016,53 @@ interface ArrayConstructor {
|
||||
*/
|
||||
reduce<T>(array: ArrayLike<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
||||
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
||||
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
||||
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
||||
*/
|
||||
reduceRight<T, U>(array: ArrayLike<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
||||
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
||||
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
||||
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
||||
*/
|
||||
reduceRight<T>(array: ArrayLike<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the array
|
||||
*/
|
||||
entries<T>(array: ArrayLike<T>): IterableIterator<[number, T]>;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an list of keys in the array
|
||||
*/
|
||||
keys<T>(array: ArrayLike<T>): IterableIterator<number>;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an list of values in the array
|
||||
*/
|
||||
values<T>(array: ArrayLike<T>): IterableIterator<T>;
|
||||
|
||||
/**
|
||||
* Returns the value of the first element in the array where predicate is true, and undefined
|
||||
/**
|
||||
* Returns the value of the first element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* immediately returns that element value. Otherwise, find returns undefined.
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* predicate. If it is not provided, undefined is used instead.
|
||||
*/
|
||||
find<T>(array: ArrayLike<T>, predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
|
||||
|
||||
/**
|
||||
* Returns the index of the first element in the array where predicate is true, and undefined
|
||||
/**
|
||||
* Returns the index of the first element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* immediately returns that element value. Otherwise, find returns undefined.
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* predicate. If it is not provided, undefined is used instead.
|
||||
*/
|
||||
findIndex<T>(array: ArrayLike<T>, predicate: (value: T) => boolean, thisArg?: any): number;
|
||||
@@ -1075,21 +1070,21 @@ interface ArrayConstructor {
|
||||
/**
|
||||
* Returns the this object after filling the section identified by start and end with value
|
||||
* @param value value to fill array section with
|
||||
* @param start index to start filling the array at. If start is negative, it is treated as
|
||||
* length+start where length is the length of the array.
|
||||
* @param end index to stop filling the array at. If end is negative, it is treated as
|
||||
* @param start index to start filling the array at. If start is negative, it is treated as
|
||||
* length+start where length is the length of the array.
|
||||
* @param end index to stop filling the array at. If end is negative, it is treated as
|
||||
* length+end.
|
||||
*/
|
||||
fill<T>(array: ArrayLike<T>, value: T, start?: number, end?: number): T[];
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns the this object after copying a section of the array identified by start and end
|
||||
* to the same array starting at position target
|
||||
* @param target If target is negative, it is treated as length+target where length is the
|
||||
* length of the array.
|
||||
* @param start If start is negative, it is treated as length+start. If end is negative, it
|
||||
* @param target If target is negative, it is treated as length+target where length is the
|
||||
* length of the array.
|
||||
* @param start If start is negative, it is treated as length+start. If end is negative, it
|
||||
* is treated as length+end.
|
||||
* @param end If not specified, length of the this object is used as its default value.
|
||||
* @param end If not specified, length of the this object is used as its default value.
|
||||
*/
|
||||
copyWithin<T>(array: ArrayLike<T>, target: number, start: number, end?: number): T[];
|
||||
|
||||
@@ -1113,7 +1108,7 @@ interface ObjectConstructor {
|
||||
* Non-standard.
|
||||
*/
|
||||
classof(value: any): string;
|
||||
|
||||
|
||||
/**
|
||||
* Non-standard.
|
||||
*/
|
||||
@@ -1477,13 +1472,13 @@ declare module core {
|
||||
}
|
||||
|
||||
declare module "core-js" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/shim" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/core" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/core/$for" {
|
||||
import $for = core.$for;
|
||||
@@ -2149,10 +2144,10 @@ declare module "core-js/fn/symbol/unscopables" {
|
||||
export = unscopables;
|
||||
}
|
||||
declare module "core-js/es5" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/es6" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/es6/array" {
|
||||
var Array: typeof core.Array;
|
||||
@@ -2211,7 +2206,7 @@ declare module "core-js/es6/weak-set" {
|
||||
export = WeakSet;
|
||||
}
|
||||
declare module "core-js/es7" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/es7/array" {
|
||||
var Array: typeof core.Array;
|
||||
@@ -2238,32 +2233,32 @@ declare module "core-js/es7/string" {
|
||||
export = String;
|
||||
}
|
||||
declare module "core-js/js" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/js/array" {
|
||||
var Array: typeof core.Array;
|
||||
export = Array;
|
||||
}
|
||||
declare module "core-js/web" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/web/dom" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/web/immediate" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/web/timers" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/shim" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/core" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/core/$for" {
|
||||
import $for = core.$for;
|
||||
@@ -2928,10 +2923,10 @@ declare module "core-js/libary/fn/symbol/unscopables" {
|
||||
export = unscopables;
|
||||
}
|
||||
declare module "core-js/libary/es5" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/es6" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/es6/array" {
|
||||
var Array: typeof core.Array;
|
||||
@@ -2990,7 +2985,7 @@ declare module "core-js/libary/es6/weak-set" {
|
||||
export = WeakSet;
|
||||
}
|
||||
declare module "core-js/libary/es7" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/es7/array" {
|
||||
var Array: typeof core.Array;
|
||||
@@ -3017,21 +3012,21 @@ declare module "core-js/libary/es7/string" {
|
||||
export = String;
|
||||
}
|
||||
declare module "core-js/libary/js" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/js/array" {
|
||||
var Array: typeof core.Array;
|
||||
export = Array;
|
||||
}
|
||||
declare module "core-js/libary/web" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/web/dom" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/web/immediate" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
declare module "core-js/libary/web/timers" {
|
||||
export = core;
|
||||
export = core;
|
||||
}
|
||||
|
||||
Vendored
+12
-9
@@ -1869,7 +1869,7 @@ declare module DevExpress.ui {
|
||||
/** A container widget used to arrange inner elements. */
|
||||
export class dxBox extends CollectionWidget {
|
||||
constructor(element: JQuery, options?: dxBoxOptions);
|
||||
constructor(element: Element, options?: dxBoxOptions);
|
||||
constructor(element: Element, options?: dxBoxOptions);
|
||||
}
|
||||
export interface dxResponsiveBoxOptions extends CollectionWidgetOptions {
|
||||
/** Specifies the collection of rows for the grid used to position layout elements. */
|
||||
@@ -3041,7 +3041,7 @@ declare module DevExpress.ui {
|
||||
lookup?: {
|
||||
/** Specifies whether or not a user can nullify values of a lookup column. */
|
||||
allowClearing?: boolean;
|
||||
/**
|
||||
/**
|
||||
* Specifies the data source providing data for a lookup column.
|
||||
*/
|
||||
dataSource?: any;
|
||||
@@ -3076,6 +3076,9 @@ declare module DevExpress.ui {
|
||||
showInColumnChooser?: boolean;
|
||||
/** Specifies the identifier of the column. */
|
||||
name?: string;
|
||||
// NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
text?: string;
|
||||
value?: any;
|
||||
}
|
||||
export interface dxDataGridOptions extends WidgetOptions {
|
||||
/** Specifies whether the outer borders of the grid are visible or not. */
|
||||
@@ -3171,7 +3174,7 @@ declare module DevExpress.ui {
|
||||
cancel?: string;
|
||||
}
|
||||
};
|
||||
/**
|
||||
/**
|
||||
* An array of grid columns.
|
||||
*/
|
||||
columns?: dxDataGridColumn[];
|
||||
@@ -3271,7 +3274,7 @@ declare module DevExpress.ui {
|
||||
autoExpandAll?: boolean;
|
||||
/** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */
|
||||
groupContinuedMessage?: string;
|
||||
/**
|
||||
/**
|
||||
* Specifies the message displayed in a group row when the corresponding group continues on the next page.
|
||||
*/
|
||||
groupContinuesMessage?: string;
|
||||
@@ -3653,7 +3656,7 @@ declare module DevExpress.ui {
|
||||
removeRow(rowIndex: number): void;
|
||||
/** Saves changes made in a grid. */
|
||||
saveEditData(): void;
|
||||
/**
|
||||
/**
|
||||
* Searches grid records by a search string.
|
||||
*/
|
||||
searchByText(text: string): void;
|
||||
@@ -5385,7 +5388,7 @@ declare module DevExpress.viz.charts {
|
||||
/** Specifies whether a single series or multiple series can be selected in the chart. */
|
||||
seriesSelectionMode?: string;
|
||||
/** Specifies how the chart must behave when series point labels overlap. */
|
||||
resolveLabelOverlapping?: string;
|
||||
resolveLabelOverlapping?: string;
|
||||
}
|
||||
export interface Legend extends AdvancedLegend {
|
||||
/** Specifies whether the legend is located outside or inside the chart's plot. */
|
||||
@@ -5580,7 +5583,7 @@ declare module DevExpress.viz.charts {
|
||||
onLegendClick?: any;
|
||||
legendClick?: any;
|
||||
/** Specifies how the chart must behave when series point labels overlap. */
|
||||
resolveLabelOverlapping?: string;
|
||||
resolveLabelOverlapping?: string;
|
||||
}
|
||||
/** A circular chart widget for HTML JS applications. */
|
||||
export class dxPieChart extends BaseChart {
|
||||
@@ -5952,7 +5955,7 @@ declare module DevExpress.viz.rangeSelector {
|
||||
behavior?: {
|
||||
/** Indicates whether or not you can swap sliders. */
|
||||
allowSlidersSwap?: boolean;
|
||||
/**
|
||||
/**
|
||||
Indicates whether or not animation is enabled.
|
||||
*/
|
||||
animationEnabled?: boolean;
|
||||
@@ -6067,7 +6070,7 @@ Indicates whether or not animation is enabled.
|
||||
maxRange?: any;
|
||||
/** Specifies the number of minor ticks between neighboring major ticks. */
|
||||
minorTickCount?: number;
|
||||
/**
|
||||
/**
|
||||
Specifies an interval between minor ticks.
|
||||
*/
|
||||
minorTickInterval?: any;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./dragula.d.ts" />
|
||||
|
||||
import dragula = require("dragula");
|
||||
|
||||
// containers
|
||||
|
||||
Vendored
+59
-64
@@ -12,7 +12,7 @@ interface IteratorResult<T> {
|
||||
|
||||
interface IterableShim<T> {
|
||||
/**
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
*/
|
||||
"_es6-shim iterator_"(): Iterator<T>;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ interface StringConstructor {
|
||||
|
||||
/**
|
||||
* String.raw is intended for use as a tag function of a Tagged Template String. When called
|
||||
* as such the first argument will be a well formed template call site object and the rest
|
||||
* as such the first argument will be a well formed template call site object and the rest
|
||||
* parameter will contain the substitution values.
|
||||
* @param template A well-formed template string call site representation.
|
||||
* @param substitutions A set of substitution values.
|
||||
@@ -49,40 +49,40 @@ interface StringConstructor {
|
||||
|
||||
interface String {
|
||||
/**
|
||||
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
|
||||
* value of the UTF-16 encoded code point starting at the string element at position pos in
|
||||
* the String resulting from converting this object to a String.
|
||||
* If there is no element at that position, the result is undefined.
|
||||
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
|
||||
* value of the UTF-16 encoded code point starting at the string element at position pos in
|
||||
* the String resulting from converting this object to a String.
|
||||
* If there is no element at that position, the result is undefined.
|
||||
* If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
|
||||
*/
|
||||
codePointAt(pos: number): number;
|
||||
|
||||
/**
|
||||
* Returns true if searchString appears as a substring of the result of converting this
|
||||
* object to a String, at one or more positions that are
|
||||
* Returns true if searchString appears as a substring of the result of converting this
|
||||
* object to a String, at one or more positions that are
|
||||
* greater than or equal to position; otherwise, returns false.
|
||||
* @param searchString search string
|
||||
* @param searchString search string
|
||||
* @param position If position is undefined, 0 is assumed, so as to search all of the String.
|
||||
*/
|
||||
includes(searchString: string, position?: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* endPosition – length(this). Otherwise returns false.
|
||||
*/
|
||||
endsWith(searchString: string, endPosition?: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns a String value that is made from count copies appended together. If count is 0,
|
||||
* Returns a String value that is made from count copies appended together. If count is 0,
|
||||
* T is the empty String is returned.
|
||||
* @param count number of copies to append
|
||||
*/
|
||||
repeat(count: number): string;
|
||||
|
||||
/**
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* position. Otherwise returns false.
|
||||
*/
|
||||
startsWith(searchString: string, position?: number): boolean;
|
||||
@@ -130,19 +130,14 @@ interface String {
|
||||
sub(): string;
|
||||
|
||||
/** Returns a <sup> HTML element */
|
||||
sup(): string;
|
||||
sup(): string;
|
||||
|
||||
/**
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
*/
|
||||
"_es6-shim iterator_"(): IterableIteratorShim<string>;
|
||||
}
|
||||
|
||||
interface ArrayLike<T> {
|
||||
length: number;
|
||||
[n: number]: T;
|
||||
}
|
||||
|
||||
interface ArrayConstructor {
|
||||
/**
|
||||
* Creates an array from an array-like object.
|
||||
@@ -180,24 +175,24 @@ interface ArrayConstructor {
|
||||
}
|
||||
|
||||
interface Array<T> {
|
||||
/**
|
||||
* Returns the value of the first element in the array where predicate is true, and undefined
|
||||
/**
|
||||
* Returns the value of the first element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* immediately returns that element value. Otherwise, find returns undefined.
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* predicate. If it is not provided, undefined is used instead.
|
||||
*/
|
||||
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
|
||||
|
||||
/**
|
||||
* Returns the index of the first element in the array where predicate is true, and undefined
|
||||
/**
|
||||
* Returns the index of the first element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* immediately returns that element value. Otherwise, find returns undefined.
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* predicate. If it is not provided, undefined is used instead.
|
||||
*/
|
||||
findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
|
||||
@@ -205,41 +200,41 @@ interface Array<T> {
|
||||
/**
|
||||
* Returns the this object after filling the section identified by start and end with value
|
||||
* @param value value to fill array section with
|
||||
* @param start index to start filling the array at. If start is negative, it is treated as
|
||||
* length+start where length is the length of the array.
|
||||
* @param end index to stop filling the array at. If end is negative, it is treated as
|
||||
* @param start index to start filling the array at. If start is negative, it is treated as
|
||||
* length+start where length is the length of the array.
|
||||
* @param end index to stop filling the array at. If end is negative, it is treated as
|
||||
* length+end.
|
||||
*/
|
||||
fill(value: T, start?: number, end?: number): T[];
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns the this object after copying a section of the array identified by start and end
|
||||
* to the same array starting at position target
|
||||
* @param target If target is negative, it is treated as length+target where length is the
|
||||
* length of the array.
|
||||
* @param start If start is negative, it is treated as length+start. If end is negative, it
|
||||
* @param target If target is negative, it is treated as length+target where length is the
|
||||
* length of the array.
|
||||
* @param start If start is negative, it is treated as length+start. If end is negative, it
|
||||
* is treated as length+end.
|
||||
* @param end If not specified, length of the this object is used as its default value.
|
||||
* @param end If not specified, length of the this object is used as its default value.
|
||||
*/
|
||||
copyWithin(target: number, start: number, end?: number): T[];
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the array
|
||||
*/
|
||||
entries(): IterableIteratorShim<[number, T]>;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an list of keys in the array
|
||||
*/
|
||||
keys(): IterableIteratorShim<number>;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns an list of values in the array
|
||||
*/
|
||||
values(): IterableIteratorShim<T>;
|
||||
|
||||
/**
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
*/
|
||||
"_es6-shim iterator_"(): IterableIteratorShim<T>;
|
||||
}
|
||||
@@ -247,14 +242,14 @@ interface Array<T> {
|
||||
interface NumberConstructor {
|
||||
/**
|
||||
* The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
|
||||
* that is representable as a Number value, which is approximately:
|
||||
* that is representable as a Number value, which is approximately:
|
||||
* 2.2204460492503130808472633361816 x 10−16.
|
||||
*/
|
||||
EPSILON: number;
|
||||
|
||||
/**
|
||||
* Returns true if passed value is finite.
|
||||
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
|
||||
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
|
||||
* number. Only finite values of the type number, result in true.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
@@ -267,7 +262,7 @@ interface NumberConstructor {
|
||||
isInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
|
||||
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
|
||||
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
|
||||
* to a number. Only values of the type number, that are also NaN, result in true.
|
||||
* @param number A numeric value.
|
||||
@@ -280,30 +275,30 @@ interface NumberConstructor {
|
||||
*/
|
||||
isSafeInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* The value of the largest integer n such that n and n + 1 are both exactly representable as
|
||||
* a Number value.
|
||||
/**
|
||||
* The value of the largest integer n such that n and n + 1 are both exactly representable as
|
||||
* a Number value.
|
||||
* The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.
|
||||
*/
|
||||
MAX_SAFE_INTEGER: number;
|
||||
|
||||
/**
|
||||
* The value of the smallest integer n such that n and n − 1 are both exactly representable as
|
||||
* a Number value.
|
||||
/**
|
||||
* The value of the smallest integer n such that n and n − 1 are both exactly representable as
|
||||
* a Number value.
|
||||
* The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
|
||||
*/
|
||||
MIN_SAFE_INTEGER: number;
|
||||
|
||||
/**
|
||||
* Converts a string to a floating-point number.
|
||||
* @param string A string that contains a floating-point number.
|
||||
* Converts a string to a floating-point number.
|
||||
* @param string A string that contains a floating-point number.
|
||||
*/
|
||||
parseFloat(string: string): number;
|
||||
|
||||
/**
|
||||
* Converts A string to an integer.
|
||||
* @param s A string to convert into a number.
|
||||
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
|
||||
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
|
||||
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
||||
* All other strings are considered decimal.
|
||||
*/
|
||||
@@ -312,7 +307,7 @@ interface NumberConstructor {
|
||||
|
||||
interface ObjectConstructor {
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects to copy properties from.
|
||||
@@ -390,7 +385,7 @@ interface Math {
|
||||
log1p(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
|
||||
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
|
||||
* the natural logarithms).
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
@@ -497,21 +492,21 @@ interface Promise<T> {
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
/**
|
||||
* A reference to the prototype.
|
||||
/**
|
||||
* A reference to the prototype.
|
||||
*/
|
||||
prototype: Promise<any>;
|
||||
|
||||
/**
|
||||
* Creates a new Promise.
|
||||
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
|
||||
* a resolve callback used resolve the promise with a value or the result of another promise,
|
||||
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
|
||||
* a resolve callback used resolve the promise with a value or the result of another promise,
|
||||
* and a reject callback used to reject the promise with a provided reason or error.
|
||||
*/
|
||||
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
||||
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
||||
* resolve, or rejected when any Promise is rejected.
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
@@ -519,7 +514,7 @@ interface PromiseConstructor {
|
||||
all<T>(values: IterableShim<T | PromiseLike<T>>): Promise<T[]>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
* or rejected.
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
@@ -670,4 +665,4 @@ declare module "es6-shim" {
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
|
||||
function setPrototypeOf(target: any, proto: any): boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ class AppController {
|
||||
}
|
||||
}
|
||||
|
||||
app.controller("AppController", AppController);
|
||||
app.controller("AppController", AppController);
|
||||
|
||||
Vendored
+3
-3
@@ -6,11 +6,11 @@
|
||||
/// <reference path="../highcharts/highcharts.d.ts" />
|
||||
|
||||
interface HighChartsNGConfig {
|
||||
options: HighchartsChartOptions;
|
||||
options: HighchartsOptions;
|
||||
//The below properties are watched separately for changes.
|
||||
|
||||
//Series object (optional) - a list of series using normal highcharts series options.
|
||||
series?: number[]|[number, number][]| HighchartsDataPoint[];
|
||||
series?: number[]|[number, number][]| HighchartsDataPoint[] | {data:number[];}[];
|
||||
//Title configuration (optional)
|
||||
title?: {
|
||||
text?: string;
|
||||
@@ -40,4 +40,4 @@ interface HighChartsNGConfig {
|
||||
interface HighChartsNGChart extends HighChartsNGConfig {
|
||||
//This is a simple way to access all the Highcharts API that is not currently managed by this directive.
|
||||
getHighcharts(): HighchartsChartObject;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -249,7 +249,7 @@ interface HighchartsCSSObject {
|
||||
fontWeight?: string;
|
||||
left?: string;
|
||||
opacity?: number;
|
||||
padding?: string;
|
||||
padding?: string | number;
|
||||
position?: string;
|
||||
top?: string;
|
||||
}
|
||||
|
||||
Vendored
+9
-4
@@ -22,29 +22,34 @@ declare module i18n {
|
||||
*/
|
||||
directory?: string;
|
||||
|
||||
/**
|
||||
/**
|
||||
* whether to write new locale information to disk
|
||||
* @default true
|
||||
*/
|
||||
updateFiles?: boolean;
|
||||
|
||||
/**
|
||||
/**
|
||||
* What to use as the indentation unit
|
||||
* @default "\t"
|
||||
*/
|
||||
indent?: string;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Setting extension of json files (you might want to set this to '.js' according to webtranslateit)
|
||||
* @default ".json"
|
||||
*/
|
||||
extension?: string;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Enable object notation
|
||||
* @default false
|
||||
*/
|
||||
objectNotation?: boolean;
|
||||
|
||||
/**
|
||||
* json files prefix
|
||||
*/
|
||||
prefix?: string;
|
||||
}
|
||||
export interface TranslateOptions {
|
||||
phrase: string;
|
||||
|
||||
Vendored
+9
@@ -19,6 +19,12 @@ interface IResourceStoreKey {
|
||||
|
||||
interface I18nTranslateOptions extends I18nextOptions {
|
||||
defaultValue?: any; // normally a string
|
||||
// NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
toAdd?: any;
|
||||
child?: any;
|
||||
sprintf?: any;
|
||||
count?: any;
|
||||
context?: any;
|
||||
}
|
||||
|
||||
interface I18nextOptions {
|
||||
@@ -66,6 +72,9 @@ interface I18nextOptions {
|
||||
cookieName?: string; // Default value: 'i18next'
|
||||
|
||||
postProcess?: string; // Default value: undefined
|
||||
|
||||
// NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
replace?: any;
|
||||
}
|
||||
|
||||
interface I18nextStatic {
|
||||
|
||||
@@ -28,7 +28,7 @@ ADocument.inject({ id: 5, author: 'John' });
|
||||
ADocument.inject({ id: 6, author: 'John' });
|
||||
|
||||
// bypass the data store
|
||||
adapter.updateAll(ADocument, { author: 'Johnny' }, { author: 'John' }).then(function (documents) {
|
||||
adapter.updateAll<{ id?: number; author: string; }>(ADocument, { author: 'Johnny' }, { author: 'John' }).then(function (documents) {
|
||||
documents[0]; // { id: 5, author: 'Johnny' }
|
||||
|
||||
// The updated documents have NOT been injected into the data store because we bypassed the data store
|
||||
@@ -37,7 +37,7 @@ adapter.updateAll(ADocument, { author: 'Johnny' }, { author: 'John' }).then(func
|
||||
});
|
||||
|
||||
// Normally you would just go through the data store
|
||||
ADocument.updateAll({ author: 'Johnny' }, { author: 'John' }).then(function (documents) {
|
||||
ADocument.updateAll<{ id?: number; author: string; }>({ author: 'Johnny' }, { author: 'John' }).then(function (documents) {
|
||||
documents[0]; // { id: 5, author: 'Johnny' }
|
||||
|
||||
// the updated documents have been injected into the data store
|
||||
@@ -164,4 +164,4 @@ ADocument.create({ author: 'John' }).then(function (document:any) {
|
||||
|
||||
// the new document has been injected into the data store
|
||||
ADocument.get(document.id); // { id: 5, author: 'John' }
|
||||
});
|
||||
});
|
||||
|
||||
Vendored
+3
-3
@@ -153,7 +153,7 @@ declare module JSData {
|
||||
findAll<T>(params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise<Array<T>>;
|
||||
loadRelations<T>(idOrInstance:string | number | Object, relations:string | Array<string>, options?:DSAdapterOperationConfiguration):JSDataPromise<T>;
|
||||
update<T>(id:string | number, attrs:Object, options?:DSSaveConfiguration):JSDataPromise<T>;
|
||||
updateAll<T>(attrs:Object, params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise<Array<T>>;
|
||||
updateAll<T>(attrs:Object, params?:DSFilterParams & T, options?:DSAdapterOperationConfiguration):JSDataPromise<Array<T>>;
|
||||
reap(resourceNametions?:DSConfiguration):JSDataPromise<any>;
|
||||
refresh<T>(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise<T>;
|
||||
save<T>(id:string | number, options?:DSSaveConfiguration):JSDataPromise<T>;
|
||||
@@ -283,7 +283,7 @@ declare module JSData {
|
||||
|
||||
update<T>(config:DSResourceDefinition<T>, id:string | number, attrs:Object, options?:DSConfiguration):JSDataPromise<T>;
|
||||
|
||||
updateAll<T>(config:DSResourceDefinition<T>, attrs:Object, params?:DSFilterParams, options?:DSConfiguration):JSDataPromise<T>;
|
||||
updateAll<T>(config:DSResourceDefinition<T>, attrs:Object, params?:DSFilterParams & T, options?:DSConfiguration):JSDataPromise<T[]>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,4 +297,4 @@ declare var JSData:{
|
||||
declare module 'js-data' {
|
||||
|
||||
export = JSData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./jsdom.d.ts" />
|
||||
|
||||
import jsdom = require("jsdom");
|
||||
|
||||
jsdom.defaultDocumentFeatures.FetchExternalResources = ["img"];
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./knockout.d.ts" />
|
||||
|
||||
import ko = require("knockout");
|
||||
|
||||
var myArray = ko.observableArray([1, 2, 3]);
|
||||
@@ -6,4 +8,4 @@ class MyViewModel {
|
||||
name = ko.observable("Jeff");
|
||||
}
|
||||
|
||||
ko.applyBindings(new MyViewModel());
|
||||
ko.applyBindings(new MyViewModel());
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/// <reference path="LeapMotionTS.d.ts" />
|
||||
|
||||
import Leap = require('LeapMotionTS');
|
||||
import Leap = require('./LeapMotionTS');
|
||||
|
||||
var controller: Leap.Controller = new Leap.Controller();
|
||||
controller.addEventListener(Leap.LeapEvent.LEAPMOTION_FRAME, (event: Leap.LeapEvent) => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./mailparser.d.ts" />
|
||||
|
||||
import mailparser_mod = require("mailparser");
|
||||
import MailParser = mailparser_mod.MailParser;
|
||||
import ParsedMail = mailparser_mod.ParsedMail;
|
||||
@@ -12,25 +14,25 @@ mailparser.on("headers", function(headers){
|
||||
});
|
||||
|
||||
mailparser.on("end", function(mail){
|
||||
mail; // object structure for parsed e-mail
|
||||
mail; // object structure for parsed e-mail
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Decode a simple e-mail
|
||||
// This example decodes an e-mail from a string
|
||||
|
||||
|
||||
var email = "From: 'Sender Name' <sender@example.com>\r\n"+
|
||||
"To: 'Receiver Name' <receiver@example.com>\r\n"+
|
||||
"Subject: Hello world!\r\n"+
|
||||
"\r\n"+
|
||||
"How are you today?";
|
||||
// setup an event listener when the parsing finishes
|
||||
// setup an event listener when the parsing finishes
|
||||
mailparser.on("end", function(mail_object){
|
||||
console.log("From:", mail_object.from); //[{address:'sender@example.com',name:'Sender Name'}]
|
||||
console.log("Subject:", mail_object.subject); // Hello world!
|
||||
console.log("Text body:", mail_object.text); // How are you today?
|
||||
console.log("From:", mail_object.from); //[{address:'sender@example.com',name:'Sender Name'}]
|
||||
console.log("Subject:", mail_object.subject); // Hello world!
|
||||
console.log("Text body:", mail_object.text); // How are you today?
|
||||
});
|
||||
// send the email source to the parser
|
||||
// send the email source to the parser
|
||||
mailparser.write(email);
|
||||
mailparser.end();
|
||||
|
||||
@@ -42,7 +44,7 @@ import fs = require("fs");
|
||||
mailparser.on("end", function(mail_object){
|
||||
console.log("Subject:", mail_object.subject);
|
||||
});
|
||||
|
||||
|
||||
fs.createReadStream("email.eml").pipe(mailparser);
|
||||
|
||||
|
||||
@@ -63,7 +65,3 @@ mp.on("attachment", function(attachment, mail){
|
||||
var output = fs.createWriteStream(attachment.generatedFileName);
|
||||
attachment.stream.pipe(output);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// These are the examples from the node-mariasql README transposed to TypeScript
|
||||
// https://github.com/mscdex/node-mariasql
|
||||
|
||||
/// <reference path="../node/node-0.10.d.ts" />
|
||||
/// <reference path="./mariasql.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
// Example 1 - SHOW DATABASES
|
||||
import util = require('util');
|
||||
@@ -198,4 +199,4 @@ c.end();
|
||||
Query #3 finished successfully
|
||||
Done with all queries
|
||||
Client closed
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./imap.d.ts" />
|
||||
|
||||
import Imap = require('imap');
|
||||
var inspect = require('util').inspect;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./node-polyglot.d.ts" />
|
||||
|
||||
import Polyglot = require("node-polyglot");
|
||||
|
||||
function instantiatePolyglot(): void {
|
||||
|
||||
Generated
+13
-13
@@ -28,9 +28,9 @@
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.14.0.tgz"
|
||||
},
|
||||
"topo": {
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"from": "topo@>=1.0.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/topo/-/topo-1.0.2.tgz"
|
||||
"resolved": "https://registry.npmjs.org/topo/-/topo-1.0.3.tgz"
|
||||
},
|
||||
"isemail": {
|
||||
"version": "1.1.1",
|
||||
@@ -38,9 +38,9 @@
|
||||
"resolved": "https://registry.npmjs.org/isemail/-/isemail-1.1.1.tgz"
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.10.3",
|
||||
"version": "2.10.6",
|
||||
"from": "moment@>=2.0.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.10.3.tgz"
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.10.6.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -103,9 +103,9 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "2.0.9",
|
||||
"version": "2.0.10",
|
||||
"from": "minimatch@>=2.0.1 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.9.tgz",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
|
||||
"dependencies": {
|
||||
"brace-expansion": {
|
||||
"version": "1.1.0",
|
||||
@@ -170,9 +170,9 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "2.0.9",
|
||||
"version": "2.0.10",
|
||||
"from": "minimatch@>=2.0.1 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.9.tgz",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
|
||||
"dependencies": {
|
||||
"brace-expansion": {
|
||||
"version": "1.1.0",
|
||||
@@ -208,9 +208,9 @@
|
||||
}
|
||||
},
|
||||
"lazy.js": {
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.2",
|
||||
"from": "lazy.js@>=0.4.0 <0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lazy.js/-/lazy.js-0.4.0.tgz"
|
||||
"resolved": "https://registry.npmjs.org/lazy.js/-/lazy.js-0.4.2.tgz"
|
||||
},
|
||||
"manticore": {
|
||||
"version": "0.2.4",
|
||||
@@ -305,9 +305,9 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "1.5.3",
|
||||
"from": "typescript@1.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-1.5.3.tgz"
|
||||
"version": "1.6.0-beta",
|
||||
"from": "typescript@1.6.0-beta",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-1.6.0-beta.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,6 +36,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"definition-tester": "0.2.0",
|
||||
"typescript": "1.5.3"
|
||||
"typescript": "1.6.0-beta"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,14 +12,14 @@ res.errors[0].code;
|
||||
Papa.parse("3,3,3", {
|
||||
delimiter: ';',
|
||||
comments: false,
|
||||
|
||||
|
||||
step: function(results, p) {
|
||||
p.abort();
|
||||
results.data.length;
|
||||
}
|
||||
});
|
||||
|
||||
var file = new File();
|
||||
var file = new File(null, null, null);
|
||||
|
||||
Papa.parse(file, {
|
||||
complete: function(a, b) {
|
||||
@@ -52,4 +52,4 @@ Papa.LocalChunkSize;
|
||||
var parser = new Papa.Parser({})
|
||||
parser.getCharIndex();
|
||||
parser.abort();
|
||||
parser.parse("", 0, false);
|
||||
parser.parse("", 0, false);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./passport-facebook.d.ts" />
|
||||
|
||||
/**
|
||||
* Created by jcabresos on 4/19/2014.
|
||||
*/
|
||||
@@ -22,4 +24,4 @@ passport.use(new facebook.Strategy({
|
||||
done(null, user);
|
||||
});
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./passport-google-oauth.d.ts" />
|
||||
|
||||
/**
|
||||
* Created by jcabresos on 4/19/2014.
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./passport-local.d.ts" />
|
||||
|
||||
/**
|
||||
* Created by Maxime LUCE <https://github.com/SomaticIT>.
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/// <reference path="./passport-strategy.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import passport = require('passport-strategy');
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./passport-twitter.d.ts" />
|
||||
|
||||
/**
|
||||
* Created by jcabresos on 4/19/2014.
|
||||
*/
|
||||
|
||||
@@ -117,7 +117,7 @@ phantom.create((ph) => {
|
||||
var finishedFunc = (result: any) => {
|
||||
ph.exit();
|
||||
};
|
||||
page.evaluate(someFunc, finishedFunc, 'div', {wahtt: 111});
|
||||
page.evaluate<string, {wahtt: number;}, void>(someFunc, finishedFunc, 'div', {wahtt: 111});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -164,5 +164,3 @@ phantom.create((ph) => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ initScene = function() {
|
||||
|
||||
// Materials
|
||||
table_material = Physijs.createMaterial(
|
||||
new THREE.MeshLambertMaterial({ map: THREE.ImageUtils.loadTexture( 'images/wood.jpg' ), ambient: 0xFFFFFF }),
|
||||
new THREE.MeshLambertMaterial({ map: THREE.ImageUtils.loadTexture( 'images/wood.jpg' ) }),
|
||||
.9, // high friction
|
||||
.2 // low restitution
|
||||
);
|
||||
@@ -93,7 +93,7 @@ initScene = function() {
|
||||
table_material.map.repeat.set( 5, 5 );
|
||||
|
||||
block_material = Physijs.createMaterial(
|
||||
new THREE.MeshLambertMaterial({ map: THREE.ImageUtils.loadTexture( 'images/plywood.jpg' ), ambient: 0xFFFFFF }),
|
||||
new THREE.MeshLambertMaterial({ map: THREE.ImageUtils.loadTexture( 'images/plywood.jpg' ) }),
|
||||
.4, // medium friction
|
||||
.4 // medium restitution
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@ var billFaces = <string[]>[];
|
||||
var personGroupId = "uuid.v4()";
|
||||
var personGroupId2 = "uuid.v4()";
|
||||
var billPersonId: string;
|
||||
|
||||
|
||||
describe('Project Oxford Face API Test', function () {
|
||||
afterEach(function() {
|
||||
// delay after each test to prevent throttling
|
||||
@@ -82,7 +82,7 @@ describe('Project Oxford Face API Test', function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('#similar()', function () {
|
||||
it('detects similar faces', function (done) {
|
||||
var detects = <any>[];
|
||||
@@ -148,7 +148,7 @@ describe('Project Oxford Face API Test', function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('#PersonGroup', function () {
|
||||
before(function(done) {
|
||||
this.timeout(5000);
|
||||
@@ -199,7 +199,7 @@ describe('Project Oxford Face API Test', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('updates a PersonGroup', function (done) {
|
||||
client.face.personGroup.update(personGroupId, 'po-node-test-group2', 'test-data2').then(function (response) {
|
||||
assert.ok(true, "void response expected");;
|
||||
@@ -364,7 +364,7 @@ describe('Project Oxford Vision API Test', function () {
|
||||
before(function() {
|
||||
// ensure the output directory exists
|
||||
if(!fs.existsSync('./test/output')){
|
||||
fs.mkdirSync('./test/output', 0766);
|
||||
fs.mkdirSync('./test/output', parseInt("0766", 8));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -417,7 +417,7 @@ describe('Project Oxford Vision API Test', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('creates a thumbnail for a local image', function (done) {
|
||||
this.timeout(10000);
|
||||
client.vision.thumbnail({
|
||||
@@ -449,7 +449,7 @@ describe('Project Oxford Vision API Test', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('runs OCR on a local image', function (done) {
|
||||
this.timeout(10000);
|
||||
client.vision.ocr({
|
||||
@@ -477,4 +477,4 @@ describe('Project Oxford Vision API Test', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./promise-pool.d.ts" />
|
||||
|
||||
import Q = require('q');
|
||||
import promisePool = require('promise-pool');
|
||||
|
||||
@@ -44,4 +46,4 @@ function onProgress(progress: promisePool.IProgress) {
|
||||
progress.fulfilled == 0;
|
||||
progress.total == 0;
|
||||
progress.index == 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,51 +15,51 @@ function testProtoBufJs() {
|
||||
assert.ok("loadProto" in ProtoBuf, "ProtoBuf should contain property loadProto");
|
||||
assert.ok("loadProtoFile" in ProtoBuf, "ProtoBuf should contain property loadProtoFile");
|
||||
assert.ok("newBuilder" in ProtoBuf, "ProtoBuf should contain property newBuilder");
|
||||
|
||||
|
||||
var jsonProto: ProtoBuf.ProtoBuilder = ProtoBuf.loadJson(readFileSync("test.json",
|
||||
{"encoding": "utf8"}));
|
||||
assertIsProtoBuilder(jsonProto, "loadJson");
|
||||
|
||||
|
||||
var jsonFileProto: ProtoBuf.ProtoBuilder = ProtoBuf.loadJsonFile("test.json");
|
||||
assertIsProtoBuilder(jsonFileProto, "loadJsonFile");
|
||||
|
||||
|
||||
ProtoBuf.loadJsonFile("test.json", (error: any, builder: ProtoBuf.ProtoBuilder) => {
|
||||
assertIsProtoBuilder(builder, "loadJsonFile callback");
|
||||
});
|
||||
|
||||
|
||||
var proto: ProtoBuf.ProtoBuilder = ProtoBuf.loadProto(readFileSync("test.proto",
|
||||
{"encoding": "utf8"}));
|
||||
assertIsProtoBuilder(proto, "loadProto");
|
||||
|
||||
|
||||
var protoFile: ProtoBuf.ProtoBuilder = ProtoBuf.loadProtoFile("test.proto");
|
||||
assertIsProtoBuilder(protoFile, "loadProtoFile");
|
||||
|
||||
|
||||
ProtoBuf.loadProtoFile("test.proto", (error: any, builder: ProtoBuf.ProtoBuilder) => {
|
||||
assertIsProtoBuilder(builder, "loadProtoFile callback");
|
||||
});
|
||||
|
||||
|
||||
var newBuilder: ProtoBuf.ProtoBuilder = ProtoBuf.newBuilder();
|
||||
assertIsProtoBuilder(newBuilder, "newBuilder");
|
||||
|
||||
|
||||
assertIsNamespace(protoFile.ns, "protoFile.ns");
|
||||
assertIsNamespace(protoFile.ptr, "protoFile.ptr");
|
||||
|
||||
|
||||
assertIsProtoBuf(protoFile.build(), "protoFile.build()");
|
||||
assertIsProtoBuf(protoFile.result, "protoFile.result");
|
||||
|
||||
|
||||
assertIsProtoBuilder(protoFile.create(), "protoFile.create()");
|
||||
assertIsProtoBuilder(protoFile.define("js"), "protoFile.define()");
|
||||
|
||||
|
||||
assertIsT(protoFile.lookup(), "protoFile.lookup()");
|
||||
}
|
||||
|
||||
function testBuilderJs() {
|
||||
var Builder: ProtoBuf.Builder = ProtoBuf.Builder;
|
||||
assertIsBuilder(Builder, "Builder");
|
||||
|
||||
|
||||
var newBuilder: ProtoBuf.ProtoBuilder = new ProtoBuf.Builder();
|
||||
assertIsProtoBuilder(newBuilder, "new Builder()");
|
||||
|
||||
|
||||
var Message: ProtoBuf.Message = Builder.Message;
|
||||
var Service: ProtoBuf.Service = Builder.Service;
|
||||
}
|
||||
@@ -104,13 +104,13 @@ function assertIsBuilder(b: ProtoBuf.Builder, name: string) {
|
||||
}
|
||||
|
||||
function assertIsProtoBuf(pb: ProtoBuf.ProtoBuf, name: string) {
|
||||
for (var package in pb) {
|
||||
if (pb.hasOwnProperty(package)) {
|
||||
for (var property in pb[package]) {
|
||||
if (typeof pb[package][property] == typeof Object
|
||||
&& pb[package].hasOwnProperty(property)) {
|
||||
assertIsMetaMessage(pb[package][property],
|
||||
name + "." + package + "." + property);
|
||||
for (var pkg in pb) {
|
||||
if (pb.hasOwnProperty(pkg)) {
|
||||
for (var property in pb[pkg]) {
|
||||
if (typeof pb[pkg][property] == typeof Object
|
||||
&& pb[pkg].hasOwnProperty(property)) {
|
||||
assertIsMetaMessage(pb[pkg][property],
|
||||
name + "." + pkg + "." + property);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ function assertIsMetaMessage(mm: ProtoBuf.MetaMessage, name: string) {
|
||||
function assertIsDotProto(dp: ProtoBuf.DotProto, name: string) {
|
||||
assert.ok("Parser" in dp, name + " should contain property Parser");
|
||||
assert.ok("Tokenizer" in dp, name + " should contain property Tokenizer");
|
||||
|
||||
|
||||
assertIsParser(new dp.Parser(readFileSync("test.proto", {"encoding": "utf8"})),
|
||||
name + ".Parser");
|
||||
assertIsTokenizer(new dp.Tokenizer(readFileSync("test.proto", {"encoding": "utf8"})),
|
||||
@@ -138,7 +138,7 @@ function assertIsParser(p: ProtoBuf.Parser, name: string) {
|
||||
assert.ok("tn" in p, name + " should contain property tn");
|
||||
assert.ok("parse" in p, name + " should contain property parse");
|
||||
assert.ok("toString" in p, name + " should contain property toString");
|
||||
|
||||
|
||||
assertIsTokenizer(p.tn, name + ".tn");
|
||||
assertIsMetaProto(p.parse(), name + ".parse()");
|
||||
}
|
||||
@@ -162,7 +162,7 @@ function assertIsMetaProto(mp: ProtoBuf.MetaProto, name: string) {
|
||||
assert.ok("imports" in mp, name + " should contain proeprty imports");
|
||||
assert.ok("options" in mp, name + " should contain proeprty options");
|
||||
assert.ok("services" in mp, name + " should contain proeprty services");
|
||||
|
||||
|
||||
for (var message in mp.messages) {
|
||||
assertIsProtoMessage(mp.messages[message], name + ".messages." + message);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ function assertIsProtoEnum(pe: ProtoBuf.ProtoEnum, name: string) {
|
||||
assert.ok("name" in pe, name + " should contain property name");
|
||||
assert.ok("values" in pe, name + " should contain property values");
|
||||
assert.ok("options" in pe, name + " should contain property options");
|
||||
|
||||
|
||||
assertIsProtoEnumValue(pe.values, name + ".values");
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ function assertIsProtoMessage(pm: ProtoBuf.ProtoMessage, name: string) {
|
||||
assert.ok("messages" in pm, name + " should contain property messages");
|
||||
assert.ok("options" in pm, name + " should contain property options");
|
||||
assert.ok("oneofs" in pm, name + " should contain property oneofs");
|
||||
|
||||
|
||||
for (var f in pm.fields) {
|
||||
assertIsProtoField(pm.fields[f], name + ".fields." + f);
|
||||
}
|
||||
@@ -224,7 +224,7 @@ function assertIsProtoService(ps: ProtoBuf.ProtoService, name: string) {
|
||||
assert.ok("name" in ps, name + " should contain property name");
|
||||
assert.ok("rpc" in ps, name + " should contain property rpc");
|
||||
assert.ok("options" in ps, name + " should contain property options");
|
||||
|
||||
|
||||
for (var rpc in ps.rpc) {
|
||||
assertIsProtoRpcService(ps.rpc[rpc], name + ".rpc." + rpc);
|
||||
}
|
||||
@@ -237,14 +237,14 @@ function assertIsReflect(r: ProtoBuf.Reflect, name: string) {
|
||||
assert.ok("Enum" in r, name + " should contain property Enum");
|
||||
assert.ok("Extension" in r, name + " should contain property Extension");
|
||||
assert.ok("Service" in r, name + " should contain property Service");
|
||||
|
||||
|
||||
assertIsT(new ProtoBuf.Reflect.T(), "new ProtoBuf.Reflect.T()");
|
||||
assertIsNamespace(new ProtoBuf.Reflect.Namespace(), "new ProtoBuf.Reflect.Namespace()");
|
||||
assertIsMessage(new ProtoBuf.Reflect.Message(), "new ProtoBuf.Reflect.Message()");
|
||||
assertIsEnum(new ProtoBuf.Reflect.Enum(), "new ProtoBuf.Reflect.Enum()");
|
||||
assertIsExtension(new ProtoBuf.Reflect.Extension(), "new ProtoBuf.Reflect.Extension()");
|
||||
assertIsService(new ProtoBuf.Reflect.Service(), "new ProtoBuf.Reflect.Service()");
|
||||
|
||||
|
||||
assertIsValue(new ProtoBuf.Reflect.Enum.Value(), "new ProtoBuf.Reflect.Enum.Value()");
|
||||
assertIsOneOf(new ProtoBuf.Reflect.Message.OneOf(), "new ProtoBuf.Reflect.Message.OneOf()");
|
||||
assertIsMethod(new ProtoBuf.Reflect.Service.Method(), "new ProtoBuf.Reflect.Service.Method()");
|
||||
@@ -255,7 +255,7 @@ function assertIsReflect(r: ProtoBuf.Reflect, name: string) {
|
||||
function assertIsT(t: ProtoBuf.ReflectT, name: string) {
|
||||
if (t != null && t != undefined) {
|
||||
assertIsTNoRecursion(t, name);
|
||||
|
||||
|
||||
assertIsProtoBuilder(t.builder, name + ".builder");
|
||||
assertIsTNoRecursion(t.parent, name + ".parent");
|
||||
}
|
||||
@@ -273,9 +273,9 @@ function assertIsTNoRecursion(t: ProtoBuf.ReflectT, name: string) {
|
||||
|
||||
function assertIsNamespace(ns: ProtoBuf.ReflectNamespace, name: string) {
|
||||
assertIsNamespaceNoRecursion(ns, name);
|
||||
|
||||
|
||||
assertIsT(ns, name);
|
||||
|
||||
|
||||
for (var child in ns.children) {
|
||||
assertIsT(ns.children[child], name + ".children." + child);
|
||||
}
|
||||
@@ -308,7 +308,7 @@ function assertIsMessage(m: ProtoBuf.ReflectMessage, name: string) {
|
||||
assert.ok("encode" in m, name + " should contain property encode");
|
||||
assert.ok("calculate" in m, name + " should contain property calculate");
|
||||
assert.ok("decode" in m, name + " should contain property decode");
|
||||
|
||||
|
||||
assertIsNamespace(m, name);
|
||||
}
|
||||
}
|
||||
@@ -316,22 +316,22 @@ function assertIsMessage(m: ProtoBuf.ReflectMessage, name: string) {
|
||||
function assertIsEnum(e: ProtoBuf.ReflectEnum, name: string) {
|
||||
assert.ok("object" in e, name + " should contain property object");
|
||||
assert.ok("build" in e, name + " should contain property build");
|
||||
|
||||
|
||||
assertIsNamespace(e, name);
|
||||
}
|
||||
|
||||
function assertIsExtension(e: ProtoBuf.ReflectExtension, name: string) {
|
||||
assert.ok("field" in e, name + " should contain property field");
|
||||
|
||||
|
||||
assertIsT(e, name);
|
||||
|
||||
|
||||
assertIsField(e.field, name + ".field");
|
||||
}
|
||||
|
||||
function assertIsService(s: ProtoBuf.ReflectService, name: string) {
|
||||
assert.ok("clazz" in s, name + " should contain property clazz");
|
||||
assert.ok("build" in s, name + " should contain property build");
|
||||
|
||||
|
||||
assertIsNamespace(s, name);
|
||||
}
|
||||
|
||||
@@ -355,9 +355,9 @@ function assertIsField(f: ProtoBuf.ReflectField, name: string) {
|
||||
assert.ok("calculate" in f, name + " should contain property calculate");
|
||||
assert.ok("calculateValue" in f, name + " should contain property calculateValue");
|
||||
assert.ok("decode" in f, name + " should contain property decode");
|
||||
|
||||
|
||||
assertIsT(f, name);
|
||||
|
||||
|
||||
assertIsT(f.resolvedType, name + ".resolvedType");
|
||||
assertIsOneOf(f.oneof, name + ".oneof");
|
||||
}
|
||||
@@ -370,15 +370,15 @@ function assertIsWireTuple(wt: ProtoBuf.WireTuple, name: string) {
|
||||
|
||||
function assertIsExtensionField(ef: ProtoBuf.ReflectExtensionField, name: string) {
|
||||
assert.ok("extension" in ef, name + " should contain property extension");
|
||||
|
||||
|
||||
assertIsField(ef, name);
|
||||
|
||||
|
||||
assertIsExtension(ef.extension, name + ".extension");
|
||||
}
|
||||
|
||||
function assertIsOneOf(oo: ProtoBuf.ReflectOneOf, name: string) {
|
||||
assert.ok("fields" in oo, name + " should contain property fields");
|
||||
|
||||
|
||||
for (var f in oo.fields) {
|
||||
assertIsField(oo.fields[f], name + ".fields." + f);
|
||||
}
|
||||
@@ -387,7 +387,7 @@ function assertIsOneOf(oo: ProtoBuf.ReflectOneOf, name: string) {
|
||||
function assertIsValue(v: ProtoBuf.ReflectValue, name: string) {
|
||||
assert.ok("className" in v, name + " should contain property className");
|
||||
assert.ok("id" in v, name + " should contain property id");
|
||||
|
||||
|
||||
assertIsT(v, name);
|
||||
}
|
||||
|
||||
@@ -395,7 +395,7 @@ function assertIsMethod(m: ProtoBuf.ReflectMethod, name: string) {
|
||||
assert.ok("className" in m, name + " should contain property className");
|
||||
assert.ok("options" in m, name + " should contain property options");
|
||||
assert.ok("buildOpt" in m, name + " should contain property buildOpt");
|
||||
|
||||
|
||||
assertIsT(m, name);
|
||||
}
|
||||
|
||||
@@ -405,9 +405,9 @@ function assertIsRPCMethod(rpc: ProtoBuf.ReflectRPCMethod, name: string) {
|
||||
assert.ok("resolvedRequestType" in rpc, name + " should contain property resolvedRequestType");
|
||||
assert.ok("resolvedResponseType" in rpc,
|
||||
name + " should contain property resolvedResponseType");
|
||||
|
||||
|
||||
assertIsMethod(rpc, name);
|
||||
|
||||
|
||||
assertIsMessage(rpc.resolvedRequestType, name + ".resolvedRequestType");
|
||||
assertIsMessage(rpc.resolveResponseType, name + ".resolvedResponsetype");
|
||||
}
|
||||
@@ -415,4 +415,4 @@ function assertIsRPCMethod(rpc: ProtoBuf.ReflectRPCMethod, name: string) {
|
||||
testProtoBufJs();
|
||||
testBuilderJs();
|
||||
testDotProtoJs();
|
||||
testReflectJs();
|
||||
testReflectJs();
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./q-retry.d.ts" />
|
||||
|
||||
import Q = require('q-retry');
|
||||
|
||||
Q
|
||||
@@ -9,7 +11,7 @@ Q
|
||||
return 0;
|
||||
})
|
||||
.retry(num => {
|
||||
num.toFixed;
|
||||
num.toFixed;
|
||||
})
|
||||
.retry(() => {
|
||||
|
||||
@@ -32,8 +34,8 @@ Q
|
||||
limit: 10,
|
||||
interval: 1000,
|
||||
maxInterval: 20000,
|
||||
intervalMultiplier: 1.5
|
||||
intervalMultiplier: 1.5
|
||||
})
|
||||
.then(str => {
|
||||
str.charAt;
|
||||
});
|
||||
});
|
||||
|
||||
+12
-11
@@ -57,9 +57,10 @@ var ClassicComponent: React.ClassicComponentClass<Props> =
|
||||
seconds: this.props.foo
|
||||
};
|
||||
},
|
||||
reset: () => {
|
||||
this.replaceState(this.getInitialState());
|
||||
},
|
||||
// NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
// reset: () => {
|
||||
// this.replaceState(this.getInitialState());
|
||||
// },
|
||||
render: () => {
|
||||
return React.DOM.div(null,
|
||||
React.DOM.input({
|
||||
@@ -71,32 +72,32 @@ var ClassicComponent: React.ClassicComponentClass<Props> =
|
||||
|
||||
class ModernComponent extends React.Component<Props, State>
|
||||
implements React.ChildContextProvider<ChildContext> {
|
||||
|
||||
|
||||
static propTypes: React.ValidationMap<Props> = {
|
||||
foo: React.PropTypes.number
|
||||
}
|
||||
|
||||
|
||||
static contextTypes: React.ValidationMap<Context> = {
|
||||
someValue: React.PropTypes.string
|
||||
}
|
||||
|
||||
|
||||
static childContextTypes: React.ValidationMap<ChildContext> = {
|
||||
someOtherValue: React.PropTypes.string
|
||||
}
|
||||
|
||||
|
||||
context: Context;
|
||||
|
||||
|
||||
getChildContext() {
|
||||
return {
|
||||
someOtherValue: 'foo'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
state = {
|
||||
inputValue: this.context.someValue,
|
||||
seconds: this.props.foo
|
||||
}
|
||||
|
||||
|
||||
reset() {
|
||||
this.setState({
|
||||
inputValue: this.context.someValue,
|
||||
@@ -105,7 +106,7 @@ class ModernComponent extends React.Component<Props, State>
|
||||
}
|
||||
|
||||
private _input: React.HTMLComponent;
|
||||
|
||||
|
||||
render() {
|
||||
return React.DOM.div(null,
|
||||
React.DOM.input({
|
||||
|
||||
+18
-18
@@ -117,24 +117,24 @@ var promiseOrResponse = interceptor({
|
||||
});
|
||||
|
||||
client = rest
|
||||
.wrap(defaultRequest)
|
||||
.wrap(hateoas)
|
||||
.wrap(location)
|
||||
.wrap(mime)
|
||||
.wrap(pathPrefix)
|
||||
.wrap(basicAuth)
|
||||
.wrap(oAuth)
|
||||
.wrap(csrf)
|
||||
.wrap(errorCode)
|
||||
.wrap(retry)
|
||||
.wrap(timeout)
|
||||
.wrap(jsonp)
|
||||
.wrap(xdomain)
|
||||
.wrap(xhr)
|
||||
.wrap(noop)
|
||||
.wrap(fail)
|
||||
.wrap(knownConfig, { prop: 'value' })
|
||||
.wrap(transformedConfig, { prop: 'value' });
|
||||
.wrap<any>(defaultRequest)
|
||||
.wrap<any>(hateoas)
|
||||
.wrap<any>(location)
|
||||
.wrap<any>(mime)
|
||||
.wrap<any>(pathPrefix)
|
||||
.wrap<any>(basicAuth)
|
||||
.wrap<any>(oAuth)
|
||||
.wrap<any>(csrf)
|
||||
.wrap<any>(errorCode)
|
||||
.wrap<any>(retry)
|
||||
.wrap<any>(timeout)
|
||||
.wrap<any>(jsonp)
|
||||
.wrap<any>(xdomain)
|
||||
.wrap<any>(xhr)
|
||||
.wrap<any>(noop)
|
||||
.wrap<any>(fail)
|
||||
.wrap<any>(knownConfig, { prop: 'value' })
|
||||
.wrap<any>(transformedConfig, { prop: 'value' });
|
||||
|
||||
import xhrClient = require('rest/client/xhr');
|
||||
import nodeClient = require('rest/client/node');
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/// <reference path="./rsmq-worker.d.ts" />
|
||||
|
||||
import RSMQWorker = require('rsmq-worker');
|
||||
|
||||
@@ -20,4 +21,3 @@ worker.send('message2', 1, (e: Error, id:string) => {
|
||||
worker.send('message3', () => {});
|
||||
|
||||
worker.stop();
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./seedrandom.d.ts" />
|
||||
|
||||
import seedrandom = require("seedrandom");
|
||||
|
||||
var rng = seedrandom("hello.");
|
||||
|
||||
@@ -212,7 +212,7 @@ interface Link {
|
||||
}
|
||||
|
||||
$('#select-links').selectize({
|
||||
theme: 'links',
|
||||
// NOTE ( https://github.com/borisyankov/DefinitelyTyped/pull/5590 ) theme: 'links',
|
||||
maxItems: null,
|
||||
valueField: 'id',
|
||||
searchField: 'title',
|
||||
@@ -418,4 +418,3 @@ $("#select-car").selectize({
|
||||
plugins: ['optgroup_columns'],
|
||||
openOnFocus: false
|
||||
});
|
||||
|
||||
|
||||
@@ -587,7 +587,9 @@ User.findOne( { where : { name : 'worker' }, include : [User] } );
|
||||
User.findOne( { where : { name : 'Boris' }, include : [User, { model : User, as : 'Photos' }] } );
|
||||
User.findOne( { where : { username : 'someone' }, include : [User] } );
|
||||
User.findOne( { where : { username : 'barfooz' }, raw : true } );
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
User.findOne( { updatedAt : { ne : null } } );
|
||||
*/
|
||||
User.find( { where : { intVal : { gt : 5 } } } );
|
||||
User.find( { where : { intVal : { lte : 5 } } } );
|
||||
|
||||
@@ -639,7 +641,9 @@ User.findOrInitialize( { where : { username : 'foo' }, defaults : { foo : 'asd'
|
||||
|
||||
User.findOrCreate( { where : { a : 'b' }, defaults : { json : { a : { b : 'c' }, d : [1, 2, 3] } } } );
|
||||
User.findOrCreate( { where : { a : 'b' }, defaults : { json : 'a', data : 'b' } } );
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
User.findOrCreate( { where : { a : 'b' }, transaction : t, lock : t.LOCK.UPDATE } );
|
||||
*/
|
||||
User.findOrCreate( { where : { a : 'b' }, logging : function( ) { } } );
|
||||
User.findOrCreate( { where : { username : 'Username' }, defaults : { data : 'some data' }, transaction : t } );
|
||||
User.findOrCreate( { where : { objectId : 'asdasdasd' }, defaults : { username : 'gottlieb' } } );
|
||||
@@ -719,24 +723,32 @@ queryInterface.dropAllTables();
|
||||
queryInterface.showAllTables( { logging : function() { } } );
|
||||
queryInterface.createTable( 'table', { name : Sequelize.STRING }, { logging : function() { } } );
|
||||
queryInterface.createTable( 'skipme', { name : Sequelize.STRING } );
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
queryInterface.dropAllTables( { skip : ['skipme'] } );
|
||||
*/
|
||||
queryInterface.dropTable( 'Group', { logging : function() { } } );
|
||||
queryInterface.addIndex( 'Group', ['username', 'isAdmin'], { logging : function() { } } );
|
||||
queryInterface.showIndex( 'Group', { logging : function() { } } );
|
||||
queryInterface.removeIndex( 'Group', ['username', 'isAdmin'], { logging : function() { } } );
|
||||
queryInterface.showIndex( 'Group' );
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
queryInterface.createTable( 'table', { name : { type : Sequelize.STRING } }, { schema : 'schema' } );
|
||||
*/
|
||||
queryInterface.addIndex( { schema : 'a', tableName : 'c' }, ['d', 'e'], { logging : function() {} }, 'schema_table' );
|
||||
queryInterface.showIndex( { schema : 'schema', tableName : 'table' }, { logging : function() {} } );
|
||||
queryInterface.addIndex( 'Group', ['from'] );
|
||||
queryInterface.describeTable( '_Users', { logging : function() {} } );
|
||||
queryInterface.createTable( 's', { table_id : { type : Sequelize.INTEGER, primaryKey : true, autoIncrement : true } } );
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
queryInterface.insert( null, 'TableWithPK', {}, { raw : true, returning : true, plain : true } );
|
||||
*/
|
||||
queryInterface.createTable( 'SomeTable', { someEnum : Sequelize.ENUM( 'value1', 'value2', 'value3' ) } );
|
||||
queryInterface.createTable( 'SomeTable', { someEnum : { type : Sequelize.ENUM, values : ['b1', 'b2', 'b3'] } } );
|
||||
queryInterface.createTable( 't', { someEnum : { type : Sequelize.ENUM, values : ['c1', 'c2', 'c3'], field : 'd' } } );
|
||||
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
|
||||
queryInterface.createTable( 'User', { name : { type : Sequelize.STRING } }, { schema : 'hero' } );
|
||||
queryInterface.rawSelect( 'User', { schema : 'hero', logging : function() {} }, 'name' );
|
||||
*/
|
||||
queryInterface.renameColumn( '_Users', 'username', 'pseudo', { logging : function() {} } );
|
||||
queryInterface.renameColumn( { schema : 'archive', tableName : 'Users' }, 'username', 'pseudo' );
|
||||
queryInterface.renameColumn( '_Users', 'username', 'pseudo' );
|
||||
@@ -918,6 +930,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/borisyankov/DefinitelyTyped/pull/5590
|
||||
s.define( 'UserWithUniqueUsername', {
|
||||
user_id : { type : Sequelize.INTEGER },
|
||||
email : { type : Sequelize.STRING }
|
||||
@@ -931,7 +944,7 @@ s.define( 'UserWithUniqueUsername', {
|
||||
fields : ['user_id', { attribute : 'email', collate : 'en_US', order : 'DESC', length : 5 }]
|
||||
}]
|
||||
} );
|
||||
|
||||
*/
|
||||
s.define( 'TaskBuild', {
|
||||
title : { type : Sequelize.STRING, defaultValue : 'a task!' },
|
||||
foo : { type : Sequelize.INTEGER, defaultValue : 2 },
|
||||
@@ -1239,49 +1252,3 @@ s.transaction( function() {
|
||||
s.transaction( { isolationLevel : 'SERIALIZABLE' }, function( t ) { return Promise.resolve(); } );
|
||||
s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.SERIALIZABLE }, (t) => Promise.resolve() );
|
||||
s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.READ_COMMITTED }, (t) => Promise.resolve() );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Vendored
+4
-1
@@ -2034,6 +2034,7 @@ declare module "sequelize" {
|
||||
*/
|
||||
logging? : boolean | Function;
|
||||
|
||||
transaction?: Transaction;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2085,6 +2086,9 @@ declare module "sequelize" {
|
||||
*/
|
||||
logging? : boolean | Function;
|
||||
|
||||
silent? : boolean;
|
||||
|
||||
returning? : boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4878,4 +4882,3 @@ declare module "sequelize" {
|
||||
export = sequelize;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import io = require('socket.io-client-0.9');
|
||||
|
||||
var socket = io.connect('http://localhost:80');
|
||||
|
||||
socket.on('connect', function () {
|
||||
console.log('Connected!');
|
||||
socket.emit('event', 'some test data', function () {
|
||||
console.log('Sent some data.');
|
||||
});
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
/// <reference path="socket.io-client-0.9.d.ts"/>
|
||||
|
||||
var socket = io.connect('http://localhost:80');
|
||||
|
||||
socket.on('connect', function () {
|
||||
console.log('Connected!');
|
||||
socket.emit('event', 'some test data', function () {
|
||||
console.log('Sent some data.');
|
||||
});
|
||||
});
|
||||
@@ -1,40 +0,0 @@
|
||||
// Type definitions for socket.io nodejs client
|
||||
// Project: http://socket.io/
|
||||
// Definitions by: Maido Kaara <https://github.com/v3rm0n>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "socket.io-client-0.9" {
|
||||
export = io;
|
||||
}
|
||||
|
||||
declare var io: SocketIOStatic;
|
||||
|
||||
interface SocketIOStatic {
|
||||
connect(host: string, details?: any): SocketIOClient.Socket;
|
||||
}
|
||||
|
||||
declare module SocketIOClient {
|
||||
interface EventEmitter {
|
||||
emit(name: string, ...data: any[]): any;
|
||||
on(ns: string, fn: Function): EventEmitter;
|
||||
addListener(ns: string, fn: Function): EventEmitter;
|
||||
removeListener(ns: string, fn: Function): EventEmitter;
|
||||
removeAllListeners(ns: string): EventEmitter;
|
||||
once(ns: string, fn: Function): EventEmitter;
|
||||
listeners(ns: string): Function[];
|
||||
}
|
||||
|
||||
interface SocketNamespace extends EventEmitter {
|
||||
of(name: string): SocketNamespace;
|
||||
send(data: any, fn: Function): SocketNamespace;
|
||||
emit(name: string): SocketNamespace;
|
||||
}
|
||||
|
||||
interface Socket extends EventEmitter {
|
||||
of(name: string): SocketNamespace;
|
||||
connect(fn: Function): Socket;
|
||||
packet(data: any): Socket;
|
||||
flushBuffer(): void;
|
||||
disconnect(): Socket;
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
/// <reference path="socket.io-client-1.2.0.d.ts"/>
|
||||
|
||||
function testUsingWithNodeHTTPServer() {
|
||||
var socket = io('http://localhost');
|
||||
socket.on('news', function (data: any) {
|
||||
console.log(data);
|
||||
socket.emit('my other event', { my: 'data' });
|
||||
});
|
||||
}
|
||||
|
||||
function testUsingWithExpress() {
|
||||
var socket = io.connect('http://localhost');
|
||||
socket.on('news', function (data: any) {
|
||||
console.log(data);
|
||||
socket.emit('my other event', { my: 'data' });
|
||||
});
|
||||
}
|
||||
|
||||
function testUsingWithTheExpressFramework() {
|
||||
var socket = io.connect('http://localhost');
|
||||
socket.on('news', function (data: any) {
|
||||
console.log(data);
|
||||
socket.emit('my other event', { my: 'data' });
|
||||
});
|
||||
}
|
||||
|
||||
function testRestrictingYourselfToANamespace() {
|
||||
var chat = io.connect('http://localhost/chat')
|
||||
, news = io.connect('http://localhost/news');
|
||||
|
||||
chat.on('connect', function () {
|
||||
chat.emit('hi!');
|
||||
});
|
||||
|
||||
news.on('news', function () {
|
||||
news.emit('woot');
|
||||
});
|
||||
}
|
||||
|
||||
function testSendingAndGettingData() {
|
||||
var socket = io();
|
||||
socket.on('connect', function () {
|
||||
socket.emit('ferret', 'tobi', function (data: any) {
|
||||
console.log(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testUsingItJustAsACrossBrowserWebSocket() {
|
||||
var socket = io('http://localhost/');
|
||||
socket.on('connect', function () {
|
||||
socket.emit('hi');
|
||||
|
||||
socket.on('message', function (msg: any) {
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
// Type definitions for socket.io-client 1.2.0
|
||||
// Project: http://socket.io/
|
||||
// Definitions by: PROGRE <https://github.com/progre/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare var io: SocketIOClientStatic;
|
||||
|
||||
declare module 'socket.io-client' {
|
||||
export = io;
|
||||
}
|
||||
|
||||
interface SocketIOClientStatic {
|
||||
(host: string, details?: any): SocketIOClient.Socket;
|
||||
(details?: any): SocketIOClient.Socket;
|
||||
connect(host: string, details?: any): SocketIOClient.Socket;
|
||||
connect(details?: any): SocketIOClient.Socket;
|
||||
protocol: number;
|
||||
Socket: { new (...args: any[]): SocketIOClient.Socket };
|
||||
Manager: SocketIOClient.ManagerStatic;
|
||||
}
|
||||
|
||||
declare module SocketIOClient {
|
||||
interface Socket {
|
||||
on(event: string, fn: Function): Socket;
|
||||
once(event: string, fn: Function): Socket;
|
||||
off(event?: string, fn?: Function): Socket;
|
||||
emit(event: string, ...args: any[]): Socket;
|
||||
listeners(event: string): Function[];
|
||||
hasListeners(event: string): boolean;
|
||||
connected: boolean;
|
||||
}
|
||||
|
||||
interface ManagerStatic {
|
||||
(url: string, opts: any): SocketIOClient.Manager;
|
||||
new (url: string, opts: any): SocketIOClient.Manager;
|
||||
}
|
||||
|
||||
interface Manager {
|
||||
reconnection(v: boolean): Manager;
|
||||
reconnectionAttempts(v: boolean): Manager;
|
||||
reconnectionDelay(v: boolean): Manager;
|
||||
reconnectionDelayMax(v: boolean): Manager;
|
||||
timeout(v: boolean): Manager;
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import io = require('socket.io-0.9');
|
||||
|
||||
var socketManager = io.listen(80);
|
||||
|
||||
socketManager.sockets.on('connection', socket => {
|
||||
socket.emit('news', { hello: 'world' });
|
||||
socket.on('my other event', data => {
|
||||
console.log(data);
|
||||
});
|
||||
});
|
||||
|
||||
// Storing data Associated to a client.
|
||||
// Server side sample
|
||||
io.listen(80).sockets.on('connection', function (socket) {
|
||||
socket.on('set nickname', function (name) {
|
||||
socket.set('nickname', name, function () { socket.emit('ready'); });
|
||||
});
|
||||
|
||||
socket.on('msg', function () {
|
||||
socket.get('nickname', function (err, name) {
|
||||
console.log('Chat message by ', name);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Vendored
-70
@@ -1,70 +0,0 @@
|
||||
// Type definitions for socket.io
|
||||
// Project: http://socket.io/
|
||||
// Definitions by: William Orr <https://github.com/worr>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
///<reference path='../../node/node.d.ts' />
|
||||
|
||||
declare module "socket.io-0.9" {
|
||||
import http = require('http');
|
||||
|
||||
export function listen(server: http.Server, options: any, fn: Function): SocketManager;
|
||||
export function listen(server: http.Server, fn?: Function): SocketManager;
|
||||
export function listen(port: Number): SocketManager;
|
||||
|
||||
|
||||
interface Socket {
|
||||
id: string;
|
||||
json:any;
|
||||
log: any;
|
||||
volatile: any;
|
||||
broadcast: any;
|
||||
handshake: any;
|
||||
in(room: string): Socket;
|
||||
to(room: string): Socket;
|
||||
join(name: string, fn: Function): Socket;
|
||||
leave(name: string, fn: Function): Socket;
|
||||
set(key: string, value: any, fn: Function): Socket;
|
||||
get(key: string, fn: Function): Socket;
|
||||
has(key: string, fn: Function): Socket;
|
||||
del(key: string, fn: Function): Socket;
|
||||
disconnect(): Socket;
|
||||
send(data: any, fn: Function): Socket;
|
||||
emit(ev: any, ...data:any[]): Socket;
|
||||
on(ns: string, fn: Function): Socket;
|
||||
}
|
||||
|
||||
interface SocketNamespace {
|
||||
clients(room: string): Socket[];
|
||||
log: any;
|
||||
store: any;
|
||||
json: any;
|
||||
volatile: any;
|
||||
in(room: string): SocketNamespace;
|
||||
on(evt: string, fn: (socket: Socket) => void): SocketNamespace;
|
||||
to(room: string): SocketNamespace;
|
||||
except(id: any): SocketNamespace;
|
||||
send(data: any): any;
|
||||
emit(ev: any, ...data:any[]): Socket;
|
||||
socket(sid: any, readable: boolean): Socket;
|
||||
authorization(fn: Function): SocketNamespace;
|
||||
}
|
||||
|
||||
interface SocketManager {
|
||||
get(key: any): any;
|
||||
set(key: any, value: any): SocketManager;
|
||||
enable(key: any): SocketManager;
|
||||
disable(key: any): SocketManager;
|
||||
enabled(key: any): boolean;
|
||||
disabled(key: any): boolean;
|
||||
configure(env: string, fn: Function): SocketManager;
|
||||
configure(fn: Function): SocketManager;
|
||||
of(nsp: string): SocketNamespace;
|
||||
on(ns: string, fn: Function): SocketManager;
|
||||
sockets: SocketNamespace;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
/// <reference path="socket.io-1.2.0.d.ts"/>
|
||||
|
||||
import socketIO = require('socket.io-1.2.0');
|
||||
|
||||
function testUsingWithNodeHTTPServer() {
|
||||
var app = require('http').createServer(handler);
|
||||
var io = socketIO(app);
|
||||
var fs = require('fs');
|
||||
|
||||
app.listen(80);
|
||||
|
||||
function handler(req: any, res: any) {
|
||||
fs.readFile(__dirname + '/index.html',
|
||||
function (err: any, data: any) {
|
||||
if (err) {
|
||||
res.writeHead(500);
|
||||
return res.end('Error loading index.html');
|
||||
}
|
||||
|
||||
res.writeHead(200);
|
||||
res.end(data);
|
||||
});
|
||||
}
|
||||
|
||||
io.on('connection', function (socket) {
|
||||
socket.emit('news', { hello: 'world' });
|
||||
socket.on('my other event', function (data: any) {
|
||||
console.log(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testUsingWithExpress() {
|
||||
var app = require('express')();
|
||||
var server = require('http').Server(app);
|
||||
var io = socketIO(server);
|
||||
|
||||
server.listen(80);
|
||||
|
||||
app.get('/', function (req: any, res: any) {
|
||||
res.sendfile(__dirname + '/index.html');
|
||||
});
|
||||
|
||||
io.on('connection', function (socket) {
|
||||
socket.emit('news', { hello: 'world' });
|
||||
socket.on('my other event', function (data: any) {
|
||||
console.log(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testUsingWithTheExpressFramework() {
|
||||
var app = require('express').createServer();
|
||||
var io = socketIO(app);
|
||||
|
||||
app.listen(80);
|
||||
|
||||
app.get('/', function (req: any, res: any) {
|
||||
res.sendfile(__dirname + '/index.html');
|
||||
});
|
||||
|
||||
io.on('connection', function (socket) {
|
||||
socket.emit('news', { hello: 'world' });
|
||||
socket.on('my other event', function (data: any) {
|
||||
console.log(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testSendingAndReceivingEvents() {
|
||||
var io = socketIO(80);
|
||||
|
||||
io.on('connection', function (socket) {
|
||||
io.emit('this', { will: 'be received by everyone' });
|
||||
|
||||
socket.on('private message', function (from: any, msg: any) {
|
||||
console.log('I received a private message by ', from, ' saying ', msg);
|
||||
});
|
||||
|
||||
socket.on('disconnect', function () {
|
||||
io.sockets.emit('user disconnected');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testRestrictingYourselfToANamespace() {
|
||||
var io = socketIO.listen(80);
|
||||
var chat = io
|
||||
.of('/chat')
|
||||
.on('connection', function (socket) {
|
||||
socket.emit('a message', {
|
||||
that: 'only'
|
||||
, '/chat': 'will get'
|
||||
});
|
||||
chat.emit('a message', {
|
||||
everyone: 'in'
|
||||
, '/chat': 'will get'
|
||||
});
|
||||
});
|
||||
|
||||
var news = io
|
||||
.of('/news')
|
||||
.on('connection', function (socket) {
|
||||
socket.emit('item', { news: 'item' });
|
||||
});
|
||||
}
|
||||
|
||||
function testSendingVolatileMessages() {
|
||||
var io = socketIO.listen(80);
|
||||
|
||||
io.sockets.on('connection', function (socket) {
|
||||
var tweets = setInterval(function () {
|
||||
socket.volatile.emit('bieber tweet', {});
|
||||
}, 100);
|
||||
|
||||
socket.on('disconnect', function () {
|
||||
clearInterval(tweets);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testSendingAndGettingData() {
|
||||
var io = socketIO.listen(80);
|
||||
|
||||
io.sockets.on('connection', function (socket) {
|
||||
socket.on('ferret', function (name: any, fn: any) {
|
||||
fn('woot');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testBroadcastingMessages() {
|
||||
var io = socketIO.listen(80);
|
||||
|
||||
io.sockets.on('connection', function (socket) {
|
||||
socket.broadcast.emit('user connected');
|
||||
});
|
||||
}
|
||||
|
||||
function testUsingItJustAsACrossBrowserWebSocket() {
|
||||
var io = socketIO.listen(80);
|
||||
|
||||
io.sockets.on('connection', function (socket) {
|
||||
socket.on('message', function () { });
|
||||
socket.on('disconnect', function () { });
|
||||
});
|
||||
}
|
||||
-96
@@ -1,96 +0,0 @@
|
||||
// Type definitions for socket.io 1.2.0
|
||||
// Project: http://socket.io/
|
||||
// Definitions by: PROGRE <https://github.com/progre/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path='../../node/node.d.ts' />
|
||||
|
||||
declare module 'socket.io-1.2.0' {
|
||||
var server: SocketIOStatic;
|
||||
|
||||
export = server;
|
||||
}
|
||||
|
||||
interface SocketIOStatic {
|
||||
(): SocketIO.Server;
|
||||
(srv: any, opts?: any): SocketIO.Server;
|
||||
(port: number, opts?: any): SocketIO.Server;
|
||||
(opts: any): SocketIO.Server;
|
||||
|
||||
listen: SocketIOStatic;
|
||||
}
|
||||
|
||||
declare module SocketIO {
|
||||
interface Server {
|
||||
serveClient(v: boolean): Server;
|
||||
path(v: string): Server;
|
||||
adapter(v: any): Server;
|
||||
origins(v: string): Server;
|
||||
sockets: Namespace;
|
||||
attach(srv: any, opts?: any): Server;
|
||||
attach(port: number, opts?: any): Server;
|
||||
listen(srv: any, opts?: any): Server;
|
||||
listen(port: number, opts?: any): Server;
|
||||
bind(srv: any): Server;
|
||||
onconnection(socket: any): Server;
|
||||
of(nsp: string): Namespace;
|
||||
emit(name: string, ...args: any[]): Socket;
|
||||
use(fn: Function): Namespace;
|
||||
|
||||
on(event: 'connection', listener: (socket: Socket) => void): Namespace;
|
||||
on(event: 'connect', listener: (socket: Socket) => void): Namespace;
|
||||
on(event: string, listener: Function): Namespace;
|
||||
}
|
||||
|
||||
interface Namespace extends NodeJS.EventEmitter {
|
||||
name: string;
|
||||
connected: { [id: string]: Socket };
|
||||
use(fn: Function): Namespace;
|
||||
in(room: string): Namespace;
|
||||
|
||||
on(event: 'connection', listener: (socket: Socket) => void): Namespace;
|
||||
on(event: 'connect', listener: (socket: Socket) => void): Namespace;
|
||||
on(event: string, listener: Function): Namespace;
|
||||
}
|
||||
|
||||
interface Socket {
|
||||
rooms: string[];
|
||||
client: Client;
|
||||
conn: any;
|
||||
request: any;
|
||||
id: string;
|
||||
handshake: {
|
||||
headers: any;
|
||||
time: string;
|
||||
address: any;
|
||||
xdomain: boolean;
|
||||
secure: boolean;
|
||||
issued: number;
|
||||
url: string;
|
||||
query: any;
|
||||
};
|
||||
|
||||
emit(name: string, ...args: any[]): Socket;
|
||||
join(name: string, fn?: Function): Socket;
|
||||
leave(name: string, fn?: Function): Socket;
|
||||
to(room: string): Socket;
|
||||
in(room: string): Socket;
|
||||
send(...args: any[]): Socket;
|
||||
write(...args: any[]): Socket;
|
||||
|
||||
on(event: string, listener: Function): Socket;
|
||||
once(event: string, listener: Function): Socket;
|
||||
removeListener(event: string, listener: Function): Socket;
|
||||
removeAllListeners(event: string): Socket;
|
||||
broadcast: Socket;
|
||||
volatile: Socket;
|
||||
connected: boolean;
|
||||
disconnect(close?: boolean): Socket;
|
||||
}
|
||||
|
||||
interface Client {
|
||||
conn: any;
|
||||
request: any;
|
||||
id: string;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./source-map.d.ts" />
|
||||
|
||||
import SourceMap = require('source-map');
|
||||
|
||||
function testSourceMapConsumer() {
|
||||
@@ -162,4 +164,4 @@ function testSourceNode() {
|
||||
result = node.toStringWithSourceMap();
|
||||
result = node.toStringWithSourceMap(sos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./stack-trace.d.ts" />
|
||||
|
||||
import stackTrace = require('stack-trace');
|
||||
|
||||
var currentStackTrace = stackTrace.get();
|
||||
|
||||
Vendored
-155
@@ -1,155 +0,0 @@
|
||||
// Type definitions for stampit
|
||||
// Project: https://github.com/ericelliott/stampit
|
||||
// Definitions by: Vasyl Boroviak <https://github.com/koresar>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare var stampit: stampit.Stampit;
|
||||
|
||||
declare module stampit {
|
||||
interface Stampit {
|
||||
/**
|
||||
* Return a factory (akaStamp) function that will produce new objects using the
|
||||
* prototypes that are passed in or composed.
|
||||
* @param methods A map of method names and bodies for delegation.
|
||||
* @param state A map of property names and values to clone for each new object.
|
||||
* @param enclose A closure (function) used to create private data and privileged methods.
|
||||
* */
|
||||
(methods?:{}, state?:{}, enclose?:{(...encloseArgs:any[]): void}[]):stampit.Stamp;
|
||||
|
||||
/**
|
||||
* Take two or more Stamps and combine them to produce a new Stamp.
|
||||
* Combining overrides properties with last-in priority.
|
||||
* @param stamps Stamps produced by stampit.
|
||||
* @return A new Stamp made of all the given.
|
||||
*/
|
||||
compose(...stamps:Stamp[]): Stamp;
|
||||
|
||||
/**
|
||||
* Take a destination object followed by one or more source objects,
|
||||
* and copy the source object properties to the destination object,
|
||||
* with last in priority overrides.
|
||||
* @param destination An object to copy properties to.
|
||||
* @param source Objects to copy properties from.
|
||||
* @return The destination object.
|
||||
*/
|
||||
mixIn(destination:any, ...source:any[]): any;
|
||||
|
||||
/**
|
||||
* Alias for mixIn.
|
||||
* Take a destination object followed by one or more source objects,
|
||||
* and copy the source object properties to the destination object,
|
||||
* with last in priority overrides.
|
||||
* @param destination An object to copy properties to.
|
||||
* @param source Objects to copy properties from.
|
||||
* @return The destination object.
|
||||
*/
|
||||
extend(destination:any, ...source:any[]): any;
|
||||
|
||||
/**
|
||||
* Check if an object is a Stamp.
|
||||
* @param obj An object to check.
|
||||
* @return true if the object is a Stamp; otherwise - false.
|
||||
*/
|
||||
isStamp(obj:any): boolean;
|
||||
|
||||
/**
|
||||
* Take an old-fashioned JS constructor and return a Stamp
|
||||
* that you can freely compose with other Stamps.
|
||||
* @param Constructor Old-fashioned constructor function.
|
||||
* @return A new Stamp based on the given constructor.
|
||||
*/
|
||||
convertConstructor(Constructor:any): Stamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* A factory function that will produce new objects using the
|
||||
* prototypes that are passed in or composed.
|
||||
*/
|
||||
export interface Stamp {
|
||||
/**
|
||||
* Just like calling stamp() invokes the stamp and returns a new object instance.
|
||||
* @param state Properties you wish to set on the new objects.
|
||||
* @param encloseArgs The remaining arguments are passed to all .enclose() functions.
|
||||
* WARNING Avoid using two different .enclose() functions that expect different arguments.
|
||||
* .enclose() functions that take arguments should not be considered safe to compose
|
||||
* with other .enclose() functions that also take arguments. Taking arguments with
|
||||
* an .enclose() function is an anti-pattern that should be avoided, when possible.
|
||||
* @return A new object composed of the Stamps and prototypes provided.
|
||||
*/
|
||||
(state?:{}, ...encloseArgs:any[]): any;
|
||||
|
||||
/**
|
||||
* Just like calling stamp(), stamp.create() invokes the stamp and returns a new instance.
|
||||
* @param state Properties you wish to set on the new objects.
|
||||
* @param encloseArgs The remaining arguments are passed to all .enclose() functions.
|
||||
* WARNING Avoid using two different .enclose() functions that expect different arguments.
|
||||
* .enclose() functions that take arguments should not be considered safe to compose
|
||||
* with other .enclose() functions that also take arguments. Taking arguments with
|
||||
* an .enclose() function is an anti-pattern that should be avoided, when possible.
|
||||
* @return A new object composed of the Stamps and prototypes provided.
|
||||
*/
|
||||
create(state?:{}, ...encloseArgs:any[]): any;
|
||||
|
||||
/**
|
||||
* An object map containing the fixed prototypes.
|
||||
*/
|
||||
fixed: Fixed;
|
||||
|
||||
/**
|
||||
* Add methods to the methods prototype. Chainable.
|
||||
* @param methods Object(s) containing map of method names and bodies for delegation.
|
||||
* @return Self.
|
||||
*/
|
||||
methods(...methods:{}[]): Stamp;
|
||||
|
||||
/**
|
||||
* Take n objects and add them to the state prototype. Changes `this` object. Chainable.
|
||||
* @param states Object(s) containing map of property names and values to clone for each new object.
|
||||
* @return Self.
|
||||
*/
|
||||
state(...states:{}[]): Stamp;
|
||||
|
||||
/**
|
||||
* Take n functions, an array of functions, or n objects and add the functions to the enclose prototype.
|
||||
* Functions passed into .enclose() are called any time an object is instantiated.
|
||||
* That happens when the stamp function is invoked, or when the .create() method is called.
|
||||
* Changes `this` object. Chainable.
|
||||
* @param functions Closures (functions) used to create private data and privileged methods.
|
||||
* @return Self.
|
||||
*/
|
||||
enclose(...functions:{(...encloseArgs:any[]): void}[]): Stamp;
|
||||
|
||||
/**
|
||||
* Take n functions, an array of functions, or n objects and add the functions to the enclose prototype.
|
||||
* Functions passed into .enclose() are called any time an object is instantiated.
|
||||
* That happens when the stamp function is invoked, or when the .create() method is called.
|
||||
* Changes `this` object. Chainable.
|
||||
* @param methods Function properties of these objects will be treated as closure functions.
|
||||
* @return Self.
|
||||
*/
|
||||
enclose(...methods:{}[]): Stamp;
|
||||
|
||||
/**
|
||||
* Take one or more Stamps and
|
||||
* combine them with `this` to produce and return a new Stamp.
|
||||
* Combining overrides properties with last-in priority.
|
||||
* NOT chainable.
|
||||
* @param stamps Stampit factories, aka Stamps.
|
||||
* @return A new Stamp composed from arguments and `this`.
|
||||
*/
|
||||
compose(...stamps:Stamp[]): Stamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* An object map containing the fixed prototypes.
|
||||
*/
|
||||
interface Fixed {
|
||||
methods: {};
|
||||
state: {};
|
||||
enclose: {(...encloseArgs:any[]): void}[];
|
||||
}
|
||||
}
|
||||
|
||||
declare module "stampit" {
|
||||
export = stampit;
|
||||
}
|
||||
@@ -1,168 +0,0 @@
|
||||
/// <reference path="stampit-1.2.0.d.ts" />
|
||||
|
||||
var a = stampit().enclose(() => {
|
||||
var a = 'a';
|
||||
this.getA = () => {
|
||||
return a;
|
||||
};
|
||||
});
|
||||
a(); // Object -- so far so good.
|
||||
a().getA(); // "a"
|
||||
|
||||
|
||||
var b = stampit().enclose(function () {
|
||||
var a = 'b';
|
||||
this.getB = function () {
|
||||
return a;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
var c = stampit.compose(a, b);
|
||||
var foo = c(); // we won't throw this one away...
|
||||
foo.getA(); // "a"
|
||||
foo.getB(); // "b"
|
||||
|
||||
|
||||
// Some more privileged methods, with some private data.
|
||||
// Use stampit.mixIn() to make this feel declarative:
|
||||
var availability = stampit().enclose(function () {
|
||||
var isOpen = false; // private
|
||||
|
||||
return stampit.mixIn(this, {
|
||||
open: function open() {
|
||||
isOpen = true;
|
||||
return this;
|
||||
},
|
||||
close: function close() {
|
||||
isOpen = false;
|
||||
return this;
|
||||
},
|
||||
isOpen: function isOpenMethod() {
|
||||
return isOpen;
|
||||
}
|
||||
});
|
||||
});
|
||||
// Hre's a mixin with public methods, and some state:
|
||||
var membership = stampit({
|
||||
members: {},
|
||||
add: function (member: any) {
|
||||
this.members[member.name] = member;
|
||||
return this;
|
||||
},
|
||||
getMember: function (name: any) {
|
||||
return this.members[name];
|
||||
}
|
||||
},
|
||||
{
|
||||
members: {}
|
||||
});
|
||||
// Let's set some defaults:
|
||||
var defaults = stampit().state({
|
||||
name: 'The Saloon',
|
||||
specials: 'Whisky, Gin, Tequila'
|
||||
});
|
||||
|
||||
// Classical inheritance has nothing on this. No parent/child coupling. No deep inheritance hierarchies.
|
||||
// Just good, clean code reusability.
|
||||
var bar = stampit.compose(defaults, availability, membership);
|
||||
// Note that you can override state on instantiation:
|
||||
var myBar = bar({name: 'Moe\'s'});
|
||||
// Silly, but proves that everything is as it should be.
|
||||
myBar.add({name: 'Homer' }).open().getMember('Homer');
|
||||
|
||||
|
||||
|
||||
var myStamp = stampit().methods({
|
||||
foo: function () {
|
||||
return 'foo';
|
||||
},
|
||||
methodOverride: function () {
|
||||
return false;
|
||||
}
|
||||
}).methods({
|
||||
bar: function () {
|
||||
return 'bar'
|
||||
},
|
||||
methodOverride: function () {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
myStamp.state({
|
||||
foo: {bar: 'bar'},
|
||||
stateOverride: false
|
||||
}).state({
|
||||
bar: 'bar',
|
||||
stateOverride: true
|
||||
});
|
||||
|
||||
myStamp.enclose(function () {
|
||||
var secret = 'foo';
|
||||
|
||||
this.getSecret = function () {
|
||||
return secret;
|
||||
};
|
||||
}).enclose(function () {
|
||||
this.a = true;
|
||||
}).enclose({
|
||||
bar: function bar() {
|
||||
this.b = true;
|
||||
}
|
||||
}, {
|
||||
baz: function baz() {
|
||||
this.c = true;
|
||||
}
|
||||
});
|
||||
|
||||
var obj = myStamp.create();
|
||||
obj.getSecret && obj.a && obj.b && obj.c; // true
|
||||
|
||||
var newStamp = stampit(null, { defaultNum: 1 }).compose(myStamp);
|
||||
|
||||
|
||||
|
||||
var obj1 = stampit().methods({
|
||||
a: function () { return 'a'; }
|
||||
}, {
|
||||
b: function () { return 'b'; }
|
||||
}).create();
|
||||
|
||||
var obj2 = stampit().state({
|
||||
a: 'a'
|
||||
}, {
|
||||
b: 'b'
|
||||
}).create();
|
||||
|
||||
var obj = defaults.compose(newStamp, membership, availability).create();
|
||||
|
||||
|
||||
|
||||
// The old constructor / class thing...
|
||||
var Constructor = function Constructor() {
|
||||
this.thing = 'initialized';
|
||||
};
|
||||
Constructor.prototype.foo = function foo() { return 'foo'; };
|
||||
|
||||
// The conversion
|
||||
var oldskool = stampit.convertConstructor(Constructor);
|
||||
|
||||
// A new stamp to compose with...
|
||||
var newskool = stampit().methods({
|
||||
bar: function bar() { return 'bar'; }
|
||||
// your methods here...
|
||||
}).enclose(function () {
|
||||
this.baz = 'baz';
|
||||
});
|
||||
|
||||
// Now you can compose those old constructors just like you could
|
||||
// with any other stamp...
|
||||
var myThing = stampit.compose(oldskool, newskool);
|
||||
|
||||
var t = myThing();
|
||||
|
||||
t.thing; // 'initialized',
|
||||
|
||||
t.foo(); // 'foo',
|
||||
|
||||
t.bar(); // 'bar'
|
||||
@@ -1,5 +1,6 @@
|
||||
/// <reference path="stampit.d.ts" />
|
||||
import stampit = require('./stampit.d');
|
||||
|
||||
import stampit = require('stampit');
|
||||
|
||||
var a = stampit().init((options) => {
|
||||
var a = options.args[0];
|
||||
|
||||
Vendored
+3
-1
@@ -294,4 +294,6 @@ declare module stampit {
|
||||
export function convertConstructor(Constructor:any): Stamp;
|
||||
}
|
||||
|
||||
export = stampit;
|
||||
declare module "stampit" {
|
||||
export = stampit;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./through.d.ts" />
|
||||
|
||||
import through = require('through');
|
||||
|
||||
var i = 0;
|
||||
@@ -6,4 +8,4 @@ through(
|
||||
this.queue((i++).toString());
|
||||
}, function () {
|
||||
this.queue(null);
|
||||
}, { autoDestroy: true }).pipe(process.stdout);
|
||||
}, { autoDestroy: true }).pipe(process.stdout);
|
||||
|
||||
@@ -4,7 +4,7 @@ import Promise = require('tspromise');
|
||||
|
||||
var MyFuncFunc = Promise.async((a: boolean, b: number) => {
|
||||
console.log('[a] ' + a);
|
||||
yield(Promise.waitAsync(1000));
|
||||
// NOTE( https://github.com/borisyankov/DefinitelyTyped/pull/5590 ) yield(Promise.waitAsync(1000));
|
||||
console.log('[b]' + b);
|
||||
});
|
||||
|
||||
@@ -18,4 +18,4 @@ Promise.all([Promise.waitAsync(10), Promise.waitAsync(20)]).then(() => {
|
||||
throw (new Error());
|
||||
}).catch((e) => {
|
||||
console.log(e.message);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference path="./uniq.d.ts" />
|
||||
|
||||
import unique = require("uniq");
|
||||
var data = [1, 2, 2, 3, 4, 5, 5, 5, 6];
|
||||
var datastr = ["1", "2", "2", "3", "4", "5", "5", "5", "6"];
|
||||
|
||||
+11
-11
@@ -229,7 +229,7 @@ var dataWrap = function (fn: any) {
|
||||
};
|
||||
|
||||
var realMode = function (n: any) {
|
||||
return n & 07777;
|
||||
return n & parseInt("07777", 8);
|
||||
};
|
||||
|
||||
describe('dest stream', function () {
|
||||
@@ -372,7 +372,7 @@ describe('dest stream', function () {
|
||||
var expectedContents = fs.readFileSync(inputPath);
|
||||
var expectedCwd = __dirname;
|
||||
var expectedBase = path.join(__dirname, "./out-fixtures");
|
||||
var expectedMode = 0655;
|
||||
var expectedMode = parseInt("0655", 8);
|
||||
|
||||
var expectedFile = new File({
|
||||
base: inputBase,
|
||||
@@ -412,7 +412,7 @@ describe('dest stream', function () {
|
||||
var expectedContents = fs.readFileSync(inputPath);
|
||||
var expectedCwd = __dirname;
|
||||
var expectedBase = path.join(__dirname, "./out-fixtures");
|
||||
var expectedMode = 0655;
|
||||
var expectedMode = parseInt("0655", 8);
|
||||
|
||||
var contentStream = through.obj();
|
||||
var expectedFile = new File({
|
||||
@@ -456,7 +456,7 @@ describe('dest stream', function () {
|
||||
var expectedPath = path.join(__dirname, "./out-fixtures/test");
|
||||
var expectedCwd = __dirname;
|
||||
var expectedBase = path.join(__dirname, "./out-fixtures");
|
||||
var expectedMode = 0655;
|
||||
var expectedMode = parseInt("0655", 8);
|
||||
|
||||
var expectedFile = new File({
|
||||
base: inputBase,
|
||||
@@ -555,7 +555,7 @@ var dataWrap = function (fn: any) {
|
||||
};
|
||||
|
||||
var realMode = function (n: any) {
|
||||
return n & 07777;
|
||||
return n & parseInt("07777", 8);
|
||||
};
|
||||
|
||||
describe('symlink stream', function () {
|
||||
@@ -706,7 +706,7 @@ describe('symlink stream', function () {
|
||||
var expectedContents = fs.readFileSync(inputPath);
|
||||
var expectedCwd = __dirname;
|
||||
var expectedBase = path.join(__dirname, './out-fixtures');
|
||||
var expectedMode = 0655;
|
||||
var expectedMode = parseInt("0655", 8);
|
||||
|
||||
var expectedFile = new File({
|
||||
base: inputBase,
|
||||
@@ -746,7 +746,7 @@ describe('symlink stream', function () {
|
||||
var expectedContents = fs.readFileSync(inputPath);
|
||||
var expectedCwd = __dirname;
|
||||
var expectedBase = path.join(__dirname, './out-fixtures');
|
||||
var expectedMode = 0655;
|
||||
var expectedMode = parseInt("0655", 8);
|
||||
|
||||
var contentStream = through.obj();
|
||||
var expectedFile = new File({
|
||||
@@ -790,7 +790,7 @@ describe('symlink stream', function () {
|
||||
var expectedPath = path.join(__dirname, './out-fixtures/wow');
|
||||
var expectedCwd = __dirname;
|
||||
var expectedBase = path.join(__dirname, './out-fixtures');
|
||||
var expectedMode = 0655;
|
||||
var expectedMode = parseInt("0655", 8);
|
||||
|
||||
var expectedFile = new File({
|
||||
base: inputBase,
|
||||
@@ -830,8 +830,8 @@ describe('symlink stream', function () {
|
||||
var inputBase = path.join(__dirname, './fixtures');
|
||||
var inputPath = path.join(__dirname, './fixtures/wow/suchempty');
|
||||
var expectedBase = path.join(__dirname, './out-fixtures/wow');
|
||||
var expectedDirMode = 0755;
|
||||
var expectedFileMode = 0655;
|
||||
var expectedDirMode = parseInt("0755", 8);
|
||||
var expectedFileMode = parseInt("0655", 8);
|
||||
|
||||
var firstFile = new File({
|
||||
base: inputBase,
|
||||
@@ -867,7 +867,7 @@ describe('symlink stream', function () {
|
||||
var expectedContents = fs.readFileSync(inputPath);
|
||||
var expectedCwd = __dirname;
|
||||
var expectedBase = path.join(__dirname, './out-fixtures');
|
||||
var expectedMode = 0722;
|
||||
var expectedMode = parseInt("0722", 8);
|
||||
|
||||
var expectedFile = new File({
|
||||
base: inputBase,
|
||||
|
||||
Vendored
+19
-16
@@ -21,7 +21,7 @@ declare module "vinyl-fs" {
|
||||
cwd?: string;
|
||||
|
||||
/**
|
||||
* Specifies the folder relative to the cwd
|
||||
* Specifies the folder relative to the cwd
|
||||
* This is used to determine the file names when saving in .dest()
|
||||
* Default is where the glob begins
|
||||
*/
|
||||
@@ -34,16 +34,16 @@ declare module "vinyl-fs" {
|
||||
*/
|
||||
buffer?: boolean;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Setting this to false will ignore the contents of the file and disable writing to disk to speed up operations
|
||||
* Defaults to true
|
||||
* Defaults to true
|
||||
*/
|
||||
read?: boolean;
|
||||
|
||||
/** Only find files that have been modified since the time specified */
|
||||
since?: Date|number;
|
||||
|
||||
/** Setting this to true will create a duplex stream, one that passes through items and emits globbed files.
|
||||
/** Setting this to true will create a duplex stream, one that passes through items and emits globbed files.
|
||||
* Defaults to false */
|
||||
passthrough?: boolean;
|
||||
|
||||
@@ -63,7 +63,7 @@ declare module "vinyl-fs" {
|
||||
|
||||
/**
|
||||
* This is just a glob-watcher
|
||||
*
|
||||
*
|
||||
* @param globs Takes a glob string or an array of glob strings as the first argument
|
||||
* Globs are executed in order, so negations should follow positive globs
|
||||
* fs.src(['!b*.js', '*.js']) would not exclude any files, but this would: fs.src(['*.js', '!b*.js'])
|
||||
@@ -72,7 +72,7 @@ declare module "vinyl-fs" {
|
||||
|
||||
/**
|
||||
* This is just a glob-watcher
|
||||
*
|
||||
*
|
||||
* @param globs Takes a glob string or an array of glob strings as the first argument
|
||||
* Globs are executed in order, so negations should follow positive globs
|
||||
* fs.src(['!b*.js', '*.js']) would not exclude any files, but this would: fs.src(['*.js', '!b*.js'])
|
||||
@@ -89,8 +89,8 @@ declare module "vinyl-fs" {
|
||||
* @param folder destination folder
|
||||
*/
|
||||
function dest(folder: string, opt?: {
|
||||
/** Specify the working directory the folder is relative to
|
||||
* Default is process.cwd()
|
||||
/** Specify the working directory the folder is relative to
|
||||
* Default is process.cwd()
|
||||
*/
|
||||
cwd?: string;
|
||||
|
||||
@@ -125,14 +125,17 @@ declare module "vinyl-fs" {
|
||||
* cwd, base, and path will be overwritten to match the folder
|
||||
*/
|
||||
function symlink(folder: string, opts?: {
|
||||
/**
|
||||
* Specify the working directory the folder is relative to
|
||||
/**
|
||||
* Specify the working directory the folder is relative to
|
||||
* Default is process.cwd()
|
||||
*/
|
||||
cwd?: string;
|
||||
|
||||
/**
|
||||
* Specify the mode the directory should be created with
|
||||
/** Specify the mode the directory should be created with. Default is the process mode */
|
||||
mode?: number|string;
|
||||
|
||||
/**
|
||||
* Specify the mode the directory should be created with
|
||||
* Default is the process mode
|
||||
*/
|
||||
dirMode?: number
|
||||
@@ -146,14 +149,14 @@ declare module "vinyl-fs" {
|
||||
*/
|
||||
function symlink(getFolderPath: (File: File) => string, opts?:
|
||||
{
|
||||
/**
|
||||
* Specify the working directory the folder is relative to
|
||||
/**
|
||||
* Specify the working directory the folder is relative to
|
||||
* Default is process.cwd()
|
||||
*/
|
||||
cwd?: string;
|
||||
|
||||
/**
|
||||
* Specify the mode the directory should be created with
|
||||
/**
|
||||
* Specify the mode the directory should be created with
|
||||
* Default is the process mode
|
||||
*/
|
||||
dirMode?: number
|
||||
|
||||
Vendored
-1
@@ -360,5 +360,4 @@ interface Window{
|
||||
RTCIceCandidate: RTCIceCandidate;
|
||||
webkitRTCIceCandidate: webkitRTCIceCandidate;
|
||||
mozRTCIceCandidate: mozRTCIceCandidate;
|
||||
URL: URL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user