This commit is contained in:
Andy Hanson
2016-11-28 11:26:04 -08:00
parent 0a029bc25c
commit 03cf831702
61 changed files with 349 additions and 403 deletions
+4 -4
View File
@@ -36,7 +36,7 @@ export interface TransformOptions {
filenameRelative?: string;
/** A source map object that the output source map will be based on. */
inputSourceMap?: Object;
inputSourceMap?: {};
/**
* This is an object of keys that represent different environments. For example, you may have:
@@ -44,7 +44,7 @@ export interface TransformOptions {
* which will use those options when the enviroment variable `BABEL_ENV` is set to `"production"`.
* If `BABEL_ENV` isn't set then `NODE_ENV` will be used, if it's not set then it defaults to `"development"`.
*/
env?: Object;
env?: {};
/** Retain line numbers - will result in really ugly code. Default: `false` */
retainLines?: boolean;
@@ -65,7 +65,7 @@ export interface TransformOptions {
* A glob, regex, or mixed array of both, matching paths to only compile. Can also be an array of arrays containing
* paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim.
*/
only?: string | RegExp | (string | RegExp)[];
only?: string | RegExp | Array<string | RegExp>;
/** Enable code generation. Default: `true`. */
code?: boolean;
@@ -138,7 +138,7 @@ export interface TransformOptions {
export interface BabelFileResult {
ast?: Node;
code?: string;
map?: Object;
map?: {};
}
export as namespace babel;
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+18 -18
View File
@@ -42,7 +42,7 @@ export interface Node {
export interface ArrayExpression extends Node {
type: "ArrayExpression";
elements: (Expression | SpreadElement)[];
elements: Array<Expression | SpreadElement>;
}
export interface AssignmentExpression extends Node {
@@ -83,7 +83,7 @@ export interface BreakStatement extends Node {
export interface CallExpression extends Node {
type: "CallExpression";
callee: Expression | Super;
arguments: (Expression | SpreadElement)[];
arguments: Array<Expression | SpreadElement>;
}
export interface CatchClause extends Node {
@@ -228,19 +228,19 @@ export interface MemberExpression extends Node {
export interface NewExpression extends Node {
type: "NewExpression";
callee: Expression | Super;
arguments: (Expression | SpreadElement)[];
arguments: Array<Expression | SpreadElement>;
}
export interface Program extends Node {
type: "Program";
sourceType: "script" | "module";
directives?: Directive[];
body: (Statement | ModuleDeclaration)[];
body: Array<Statement | ModuleDeclaration>;
}
export interface ObjectExpression extends Node {
type: "ObjectExpression";
properties: (ObjectProperty | ObjectMethod | SpreadProperty)[];
properties: Array<ObjectProperty | ObjectMethod | SpreadProperty>;
}
export interface ObjectMethod extends Node {
@@ -377,7 +377,7 @@ export interface ArrowFunctionExpression extends Node {
export interface ClassBody extends Node {
type: "ClassBody";
body: (ClassMethod | ClassProperty)[];
body: Array<ClassMethod | ClassProperty>;
}
export interface ClassDeclaration extends Node {
@@ -437,7 +437,7 @@ export interface ForOfStatement extends Node {
export interface ImportDeclaration extends Node {
type: "ImportDeclaration";
specifiers: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[];
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
source: StringLiteral;
}
@@ -493,7 +493,7 @@ export interface AssignmentProperty extends Node {
export interface ObjectPattern extends Node {
type: "ObjectPattern";
properties: (AssignmentProperty | RestProperty)[];
properties: Array<AssignmentProperty | RestProperty>;
typeAnnotation?: TypeAnnotation;
}
@@ -773,7 +773,7 @@ export interface JSXElement extends Node {
type: "JSXElement";
openingElement: JSXOpeningElement;
closingElement: JSXClosingElement;
children: (JSXElement | JSXExpressionContainer | JSXText)[];
children: Array<JSXElement | JSXExpressionContainer | JSXText>;
selfClosing?: boolean;
}
@@ -907,14 +907,14 @@ export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | Mix
export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareTypeAlias | DeclareVariable | InterfaceDeclaration | TypeAlias;
export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText;
export function arrayExpression(elements?: (Expression | SpreadElement)[]): ArrayExpression;
export function arrayExpression(elements?: Array<Expression | SpreadElement>): ArrayExpression;
export function assignmentExpression(operator?: string, left?: LVal, right?: Expression): AssignmentExpression;
export function binaryExpression(operator?: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left?: Expression, right?: Expression): BinaryExpression;
export function directive(value?: DirectiveLiteral): Directive;
export function directiveLiteral(value?: string): DirectiveLiteral;
export function blockStatement(body?: Statement[], directives?: Directive[]): BlockStatement;
export function breakStatement(label?: Identifier): BreakStatement;
export function callExpression(callee?: Expression, _arguments?: (Expression | SpreadElement)[]): CallExpression;
export function callExpression(callee?: Expression, _arguments?: Array<Expression | SpreadElement>): CallExpression;
export function catchClause(param?: Identifier, body?: BlockStatement): CatchClause;
export function conditionalExpression(test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression;
export function continueStatement(label?: Identifier): ContinueStatement;
@@ -937,9 +937,9 @@ export function booleanLiteral(value?: boolean): BooleanLiteral;
export function regExpLiteral(pattern?: string, flags?: string): RegExpLiteral;
export function logicalExpression(operator?: "||" | "&&", left?: Expression, right?: Expression): LogicalExpression;
export function memberExpression(object?: Expression | Super, property?: Expression, computed?: boolean): MemberExpression;
export function newExpression(callee?: Expression | Super, _arguments?: (Expression | SpreadElement)[]): NewExpression;
export function program(body?: (Statement | ModuleDeclaration)[], directives?: Directive[]): Program;
export function objectExpression(properties?: (ObjectProperty | ObjectMethod | SpreadProperty)[]): ObjectExpression;
export function newExpression(callee?: Expression | Super, _arguments?: Array<Expression | SpreadElement>): NewExpression;
export function program(body?: Array<Statement | ModuleDeclaration>, directives?: Directive[]): Program;
export function objectExpression(properties?: Array<ObjectProperty | ObjectMethod | SpreadProperty>): ObjectExpression;
export function objectMethod(kind?: "get" | "set" | "method", key?: Expression, params?: Pattern[], body?: BlockStatement, computed?: boolean): ObjectMethod;
export function objectProperty(key?: Expression, value?: Expression, computed?: boolean, shorthand?: boolean, decorators?: Decorator[]): ObjectProperty;
export function restElement(argument?: LVal, typeAnnotation?: TypeAnnotation): RestElement;
@@ -959,7 +959,7 @@ export function withStatement(object?: Expression, body?: BlockStatement | State
export function assignmentPattern(left?: Identifier, right?: Expression): AssignmentPattern;
export function arrayPattern(elements?: Pattern[], typeAnnotation?: TypeAnnotation): ArrayPattern;
export function arrowFunctionExpression(params?: Pattern[], body?: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression;
export function classBody(body?: (ClassMethod | ClassProperty)[]): ClassBody;
export function classBody(body?: Array<ClassMethod | ClassProperty>): ClassBody;
export function classDeclaration(id?: Identifier, superClass?: Expression, body?: ClassBody, decorators?: Decorator[]): ClassDeclaration;
export function classExpression(id?: Identifier, superClass?: Expression, body?: ClassBody, decorators?: Decorator[]): ClassExpression;
export function exportAllDeclaration(source?: StringLiteral): ExportAllDeclaration;
@@ -967,13 +967,13 @@ export function exportDefaultDeclaration(declaration?: FunctionDeclaration | Cla
export function exportNamedDeclaration(declaration?: Declaration, specifiers?: ExportSpecifier[], source?: StringLiteral): ExportNamedDeclaration;
export function exportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier;
export function forOfStatement(left?: VariableDeclaration | LVal, right?: Expression, body?: Statement): ForOfStatement;
export function importDeclaration(specifiers?: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[], source?: StringLiteral): ImportDeclaration;
export function importDeclaration(specifiers?: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source?: StringLiteral): ImportDeclaration;
export function importDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier;
export function importNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier;
export function importSpecifier(local?: Identifier, imported?: Identifier): ImportSpecifier;
export function metaProperty(meta?: string, property?: string): MetaProperty;
export function classMethod(kind?: "constructor" | "method" | "get" | "set", key?: Expression, params?: Pattern[], body?: BlockStatement, computed?: boolean, _static?: boolean): ClassMethod;
export function objectPattern(properties?: (AssignmentProperty | RestProperty)[], typeAnnotation?: TypeAnnotation): ObjectPattern;
export function objectPattern(properties?: Array<AssignmentProperty | RestProperty>, typeAnnotation?: TypeAnnotation): ObjectPattern;
export function spreadElement(argument?: Expression): SpreadElement;
export function taggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral): TaggedTemplateExpression;
export function templateElement(value?: {cooked?: string; raw?: string}, tail?: boolean): TemplateElement;
@@ -1022,7 +1022,7 @@ export function unionTypeAnnotation(types?: FlowTypeAnnotation[]): UnionTypeAnno
export function voidTypeAnnotation(): VoidTypeAnnotation;
export function jSXAttribute(name?: JSXIdentifier | JSXNamespacedName, value?: JSXElement | StringLiteral | JSXExpressionContainer): JSXAttribute;
export function jSXClosingElement(name?: JSXIdentifier | JSXMemberExpression): JSXClosingElement;
export function jSXElement(openingElement?: JSXOpeningElement, closingElement?: JSXClosingElement, children?: (JSXElement | JSXExpressionContainer | JSXText)[], selfClosing?: boolean): JSXElement;
export function jSXElement(openingElement?: JSXOpeningElement, closingElement?: JSXClosingElement, children?: Array<JSXElement | JSXExpressionContainer | JSXText>, selfClosing?: boolean): JSXElement;
export function jSXEmptyExpression(): JSXEmptyExpression;
export function jSXExpressionContainer(expression?: Expression): JSXExpressionContainer;
export function jSXIdentifier(name?: string): JSXIdentifier;
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+1 -5
View File
@@ -18,11 +18,7 @@ declare namespace BabyParse {
/**
* Unparses javascript data objects and returns a csv string
*/
unparse(data: Object[], config?: UnparseConfig): string;
unparse(data: any[][], config?: UnparseConfig): string;
unparse(data: UnparseObject, config?: UnparseConfig): string;
unparse(data: {}[] | {}[][] | UnparseObject, config?: UnparseConfig): string;
/**
* Read-Only Properties
+4 -8
View File
@@ -64,17 +64,14 @@ interface Static {
* models/collection fetch. This might be useful for debugging and
* testing.
*/
getCache(key: () => string, opts?: GetCacheOptions): Cache;
getCache(key: GetCacheKeyOptions, opts?: GetCacheOptions): Cache;
getCache(key: (() => string) | GetCacheKeyOptions, opts?: GetCacheOptions): Cache;
getCacheKey(key: () => string, opts?: GetCacheOptions): string;
getCacheKey(key: GetCacheKeyOptions, opts?: GetCacheOptions): string;
getCacheKey(key: (() => string) | GetCacheKeyOptions, opts?: GetCacheOptions): string;
/**
* If you want to know when was the last (server) sync of a given key, you can use.
*/
getLastSync(key: () => string, opts?: GetCacheOptions): number;
getLastSync(key: GetCacheKeyOptions, opts?: GetCacheOptions): number;
getLastSync(key: (() => string) | GetCacheKeyOptions, opts?: GetCacheOptions): number;
getLocalStorage(): void;
getLocalStorageKey(): string;
@@ -91,8 +88,7 @@ interface Static {
reset(): void;
setCache(instance: () => string, opts?: SetCacheOptions, attrs?: any): void;
setCache(instance: GetCacheKeyOptions, opts?: SetCacheOptions, attrs?: any): void;
setCache(instance: (() => string) | GetCacheKeyOptions, opts?: SetCacheOptions, attrs?: any): void;
setLocalStorage(...args: any[]): any;
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+2 -2
View File
@@ -221,7 +221,7 @@ declare namespace Backbone {
comparator: string | ((element: TModel) => number | string) | ((compare: TModel, to?: TModel) => number);
add(model: {}|TModel, options?: AddOptions): TModel;
add(models: ({}|TModel)[], options?: AddOptions): TModel[];
add(models: Array<{}|TModel>, options?: AddOptions): TModel[];
at(index: number): TModel;
/**
* Get a model from a collection, specified by an id, a cid, or by passing in a model.
@@ -233,7 +233,7 @@ declare namespace Backbone {
push(model: TModel, options?: AddOptions): TModel;
pop(options?: Silenceable): TModel;
remove(model: {}|TModel, options?: Silenceable): TModel;
remove(models: ({}|TModel)[], options?: Silenceable): TModel[];
remove(models: Array<{}|TModel>, options?: Silenceable): TModel[];
reset(models?: TModel[], options?: Silenceable): TModel[];
set(models?: TModel[], options?: Silenceable): TModel[];
shift(options?: Silenceable): TModel;
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+8 -8
View File
@@ -100,7 +100,7 @@ declare namespace Bacon {
* return [new Bacon.Next(n), new Bacon.Next(() => n), new Bacon.End()];
* });
*/
function fromPromise<E, A, B>(promise: Promise<A>|JQueryXHR, abort: boolean, eventTransformer: (value: A) => (Initial<B>|Next<B>|End<B>|Error<E>)[]): EventStream<E, B>;
function fromPromise<E, A, B>(promise: Promise<A>|JQueryXHR, abort: boolean, eventTransformer: (value: A) => Array<Initial<B>|Next<B>|End<B>|Error<E>>): EventStream<E, B>;
/**
* @function
@@ -266,7 +266,7 @@ declare namespace Bacon {
* @example
* Bacon.fromArray([1, new Bacon.Error("")]);
*/
function fromArray<E, A>(values: (A|Error<E>)[]): EventStream<E, A>;
function fromArray<E, A>(values: Array<A|Error<E>>): EventStream<E, A>;
/**
* @function
@@ -378,7 +378,7 @@ declare namespace Bacon {
* });
* stream.log();
*/
function fromBinder<E, A>(subscribe: (sink: (value: More|NoMore|(A|Initial<A>|Next<A>|End<A>|Error<E>)|(A|Initial<A>|Next<A>|End<A>|Error<E>)[]) => void) => (() => void)): EventStream<E, A>;
function fromBinder<E, A>(subscribe: (sink: (value: More|NoMore|(A|Initial<A>|Next<A>|End<A>|Error<E>)|Array<A|Initial<A>|Next<A>|End<A>|Error<E>>) => void) => (() => void)): EventStream<E, A>;
/**
* @interface
@@ -718,7 +718,7 @@ declare namespace Bacon {
* }
* });
*/
withStateMachine<B, C>(initState: B, f: (state: B, event: Initial<A>|Next<A>|End<A>|Error<E>) => [B, (Initial<C>|Next<C>|End<C>|Error<E>)[]]): EventStream<E, C>;
withStateMachine<B, C>(initState: B, f: (state: B, event: Initial<A>|Next<A>|End<A>|Error<E>) => [B, Array<Initial<C>|Next<C>|End<C>|Error<E>>]): EventStream<E, C>;
/**
* @method
@@ -1345,7 +1345,7 @@ declare namespace Bacon {
* @param {EventStream#new~subscribe} subscribe
* @returns {EventStream<E, A>}
*/
new<E, A>(subscribe: (sink: (value: More|NoMore|(A|Initial<A>|Next<A>|End<A>|Error<E>)|(A|Initial<A>|Next<A>|End<A>|Error<E>)[]) => void) => (() => void)): EventStream<E, A>;
new<E, A>(subscribe: (sink: (value: More|NoMore|(A|Initial<A>|Next<A>|End<A>|Error<E>)|Array<A|Initial<A>|Next<A>|End<A>|Error<E>>) => void) => (() => void)): EventStream<E, A>;
};
/**
@@ -1851,7 +1851,7 @@ declare namespace Bacon {
* @param {(A|Observable<E, A>)[]} streams
* @returns {Property<E, A[]>}
*/
function combineAsArray<E, A>(streams: (A|Observable<E, A>)[]): Property<E, A[]>;
function combineAsArray<E, A>(streams: Array<A|Observable<E, A>>): Property<E, A[]>;
/**
* @function
@@ -1859,7 +1859,7 @@ declare namespace Bacon {
* @param {...(A|Observable<E, A>)} streams
* @returns {Property<E, A[]>}
*/
function combineAsArray<E, A>(...streams: (A|Observable<E, A>)[]): Property<E, A[]>;
function combineAsArray<E, A>(...streams: Array<A|Observable<E, A>>): Property<E, A[]>;
/**
* @callback Property#combineWith~f
@@ -1873,7 +1873,7 @@ declare namespace Bacon {
* @param {...(A|Observable<E, A>)} streams
* @returns {Property<E, B>}
*/
function combineWith<A, B>(f: (...args: A[]) => B, ...streams: (A|Observable<ErrorEvent, A>)[]): Property<ErrorEvent, B>;
function combineWith<A, B>(f: (...args: A[]) => B, ...streams: Array<A|Observable<ErrorEvent, A>>): Property<ErrorEvent, B>;
/**
* @function
+7 -1
View File
@@ -1 +1,7 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false,
"unified-signatures": false
}
}
+2 -2
View File
@@ -47,7 +47,7 @@ declare namespace bard {
* DO NOT USE IF YOU NEED THE REAL ROUTER SERVICES!
* Fall back to `angular.mock.module(...)` or just `module(...)`
*/
function appModule(...fns: (string | Function | Object)[]): () => void;
function appModule(...fns: Array<string | Function | Object>): () => void;
/**
* Assert a failure in mocha, without condition
@@ -59,7 +59,7 @@ declare namespace bard {
* Also adds fakeLogger to the end of the definition
* Use it as you would the ngMocks#module method
*/
function asyncModule(...fns: (string | Function | Object)[]): () => void;
function asyncModule(...fns: Array<string | Function | Object>): () => void;
/**
* Get or set bard debugging flag
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ declare namespace BetterCurryModule {
export interface BetterCurry {
predefine: <T extends Function>(fn: T, args: any[], context?: Object, len?: number, checkArguments?: boolean) => OriginalFunctionReminder<T>;
wrap: <T extends Function>(fn: T, context?: Object, len?: number, checkArguments?: boolean) => OriginalFunctionReminder<T>;
flatten: (...args: (any[]|any)[]) => any[];
flatten: (...args: Array<any[]|any>) => any[];
delegate: <T>(proto: T, target: string) => Delegate<T>;
MAX_OPTIMIZED: number;
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+22 -116
View File
@@ -8,67 +8,31 @@ interface BigInteger {
abs(): BigInteger;
/** Performs addition */
add( number: number ): BigInteger;
/** Performs addition */
add( number: BigInteger ): BigInteger;
/** Performs addition */
add( number: string ): BigInteger;
add( number: number | BigInteger | string ): BigInteger;
/** Alias for the add method. */
plus( number: number ): BigInteger;
/** Alias for the add method. */
plus( number: BigInteger ): BigInteger;
/** Alias for the add method. */
plus( number: string ): BigInteger;
plus( number: number | BigInteger | string ): BigInteger;
/** Alias for the subtract method. */
minus( number: number ): BigInteger;
/** Alias for the subtract method. */
minus( number: BigInteger ): BigInteger;
/** Alias for the subtract method. */
minus( number: string ): BigInteger;
minus( number: number | BigInteger | string ): BigInteger;
/** Performs subtraction. */
subtract( number: number ): BigInteger;
/** Performs subtraction. */
subtract( number: BigInteger ): BigInteger;
/** Performs subtraction. */
subtract( number: string ): BigInteger;
subtract( number: number | BigInteger | string ): BigInteger;
/** Performs multiplication. */
multiply( number: number ): BigInteger;
/** Performs multiplication. */
multiply( number: BigInteger ): BigInteger;
/** Performs multiplication. */
multiply( number: string ): BigInteger;
multiply( number: number | BigInteger | string ): BigInteger;
/** Alias for the multiply method. */
times( number: number ): BigInteger;
/** Alias for the multiply method. */
times( number: BigInteger ): BigInteger;
/** Alias for the multiply method. */
times( number: string ): BigInteger;
times( number: number | BigInteger | string ): BigInteger;
/** Performs integer division, disregarding the remainder. */
divide( number: number ): BigInteger;
/** Performs integer division, disregarding the remainder. */
divide( number: BigInteger ): BigInteger;
/** Performs integer division, disregarding the remainder. */
divide( number: string ): BigInteger;
divide( number: number | BigInteger | string ): BigInteger;
/** Alias for the divide method. */
over( number: number ): BigInteger;
/** Alias for the divide method. */
over( number: BigInteger ): BigInteger;
/** Alias for the divide method. */
over( number: string ): BigInteger;
over( number: number | BigInteger | string ): BigInteger;
/** Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1. */
pow( number: number ): BigInteger;
/** Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1. */
pow( number: BigInteger ): BigInteger;
/** Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1. */
pow( number: string ): BigInteger;
pow( number: number | BigInteger | string ): BigInteger;
/** Adds one to the number. */
next(): BigInteger;
@@ -77,46 +41,22 @@ interface BigInteger {
prev(): BigInteger;
/** Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. */
mod( number: number ): BigInteger;
/** Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. */
mod( number: BigInteger ): BigInteger;
/** Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. */
mod( number: string ): BigInteger;
mod( number: number | BigInteger | string ): BigInteger;
/** Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend. */
divmod( number: number ): { quotient: BigInteger; remainder: BigInteger };
/** Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend. */
divmod( number: BigInteger ): { quotient: BigInteger; remainder: BigInteger };
/** Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend. */
divmod( number: string ): { quotient: BigInteger; remainder: BigInteger };
divmod( number: number | BigInteger | string ): { quotient: BigInteger; remainder: BigInteger };
/** Checks if the first number is greater than the second. */
greater( number: number ): boolean;
/** Checks if the first number is greater than the second. */
greater( number: BigInteger ): boolean;
/** Checks if the first number is greater than the second. */
greater( number: string ): boolean;
greater( number: number | BigInteger | string ): boolean;
/** Checks if the first number is greater than or equal to the second. */
greaterOrEquals( number: number ): boolean;
/** Checks if the first number is greater than or equal to the second. */
greaterOrEquals( number: BigInteger ): boolean;
/** Checks if the first number is greater than or equal to the second. */
greaterOrEquals( number: string ): boolean;
greaterOrEquals( number: number | BigInteger | string ): boolean;
/** Checks if the first number is lesser than the second. */
lesser( number: number ): boolean;
/** Checks if the first number is lesser than the second. */
lesser( number: BigInteger ): boolean;
/** Checks if the first number is lesser than the second. */
lesser( number: string ): boolean;
lesser( number: number | BigInteger | string ): boolean;
/** Checks if the first number is less than or equal to the second. */
lesserOrEquals( number: number ): boolean;
/** Checks if the first number is less than or equal to the second. */
lesserOrEquals( number: BigInteger ): boolean;
/** Checks if the first number is less than or equal to the second. */
lesserOrEquals( number: string ): boolean;
lesserOrEquals( number: number | BigInteger | string ): boolean;
/** Returns true if the number is even, false otherwise. */
isEven(): boolean;
@@ -134,62 +74,28 @@ interface BigInteger {
* Performs a comparison between two numbers. If the numbers are equal, it returns 0.
* If the first number is greater, it returns 1. If the first number is lesser, it returns -1.
*/
compare( number: number ): number;
/**
* Performs a comparison between two numbers. If the numbers are equal, it returns 0.
* If the first number is greater, it returns 1. If the first number is lesser, it returns -1.
*/
compare( number: BigInteger ): number;
/**
* Performs a comparison between two numbers. If the numbers are equal, it returns 0.
* If the first number is greater, it returns 1. If the first number is lesser, it returns -1.
*/
compare( number: string ): number;
compare( number: number | BigInteger | string ): number;
/** Performs a comparison between the absolute value of two numbers. */
compareAbs( number: number ): number;
/** Performs a comparison between the absolute value of two numbers. */
compareAbs( number: BigInteger ): number;
/** Performs a comparison between the absolute value of two numbers. */
compareAbs( number: string ): number;
compareAbs( number: number | BigInteger | string ): number;
/** Checks if two numbers are equal. */
equals( number: number ): boolean;
/** Checks if two numbers are equal. */
equals( number: BigInteger ): boolean;
/** Checks if two numbers are equal. */
equals( number: string ): boolean;
equals( number: number | BigInteger | string ): boolean;
/** Checks if two numbers are not equal. */
notEquals( number: number ): boolean;
/** Checks if two numbers are not equal. */
notEquals( number: BigInteger ): boolean;
/** Checks if two numbers are not equal. */
notEquals( number: string ): boolean;
notEquals( number: number | BigInteger | string ): boolean;
/** Performs the bitwise AND operation. */
and( number: number ): BigInteger;
/** Performs the bitwise AND operation. */
and( number: BigInteger ): BigInteger;
/** Performs the bitwise AND operation. */
and( number: string ): BigInteger;
and( number: number | BigInteger | string ): BigInteger;
/** Performs the bitwise NOT operation. */
not(): BigInteger;
/** Performs the bitwise OR operation. */
or( number: number ): BigInteger;
/** Performs the bitwise OR operation. */
or( number: BigInteger ): BigInteger;
/** Performs the bitwise OR operation. */
or( number: string ): BigInteger;
or( number: number | BigInteger | string ): BigInteger;
/** Performs the bitwise XOR operation. */
xor( number: number ): BigInteger;
/** Performs the bitwise XOR operation. */
xor( number: BigInteger ): BigInteger;
/** Performs the bitwise XOR operation. */
xor( number: string ): BigInteger;
xor( number: number | BigInteger | string ): BigInteger;
/** Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range. */
toJSNumber(): number;
+4 -15
View File
@@ -80,15 +80,10 @@ declare namespace BigJsLibrary {
@param exp integer, -1e+6 to 1e+6 inclusive */
pow(exp: number): BigJS;
/** Returns a Big number whose value is the value of this Big number rounded to a whole number. */
round(): BigJS;
/** Returns a Big number whose value is the value of this Big number rounded using rounding mode rm to a maximum of dp decimal places.
@param dp Number of decimal places (0 to 1e+6 inclusive). If dp is omitted or is null or undefined, the return value is n rounded to a whole number. */
round(dp: number): BigJS;
/** Returns a Big number whose value is the value of this Big number rounded using rounding mode rm to a maximum of dp decimal places.
@param dp Number of decimal places (0 to 1e+6 inclusive). If dp is omitted or is null or undefined, the return value is n rounded to a whole number.
@param rm Rounding mode. If rm is omitted or is null or undefined, the current Big.RM setting is used. */
round(dp: number, rm: RoundingMode): BigJS;
round(dp?: number, rm?: RoundingMode): BigJS;
/** Returns a Big number whose value is the square root of this Big number. */
sqrt(): BigJS;
@@ -96,23 +91,17 @@ declare namespace BigJsLibrary {
/** Returns a Big number whose value is the value of this Big number times n. */
times(n: BigNumberInputType): BigJS;
/** Returns a string representing the value of this Big number in exponential notation to a fixed number of decimal places dp. */
toExponential(): string;
/** Returns a string representing the value of this Big number in exponential notation to a fixed number of decimal places dp.
@param dp Number of decimal places (0 to 1e+6 inclusive). If dp is omitted, or is null or undefined, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly. */
toExponential(dp: number): string;
toExponential(dp?: number): string;
/** Returns a string representing the value of this Big number in normal notation to a fixed number of decimal places dp. */
toFixed(): string;
/** Returns a string representing the value of this Big number in normal notation to a fixed number of decimal places dp.
@param dp Number of decimal places (0 to 1e+6 inclusive). If dp is omitted, or is null or undefined, then the return value is simply the value in normal notation. This is also unlike Number.prototype.toFixed, which returns the value to zero decimal places. */
toFixed(dp: number): string;
toFixed(dp?: number): string;
/** Returns a string representing the value of this Big number to the specified number of significant digits sd. */
toPrecision(): string;
/** Returns a string representing the value of this Big number to the specified number of significant digits sd.
@param sd significant digits. If sd is omitted, or is null or undefined, then the return value is the same as .toString(). */
toPrecision(sd: number /** number of significant digits (0 to 1e+6 inclusive) */): string;
toPrecision(sd?: number /** number of significant digits (0 to 1e+6 inclusive) */): string;
/** Returns a string representing the value of this Big number. */
toString(): string;
+1 -1
View File
@@ -3,5 +3,5 @@
// Definitions by: Steve Jenkins <https://github.com/skysteve>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function ponyBind(fn: Function, that: any, ...args: Array<any>): Function;
declare function ponyBind(fn: Function, that: any, ...args: any[]): Function;
export = ponyBind;
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+7 -1
View File
@@ -1 +1,7 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false,
"unified-signatures": false
}
}
+25 -83
View File
@@ -15,14 +15,10 @@ interface BlocksStatic {
* and renders the html result to the specified HTMLElement if not specified
* uses document.body by default.
*
* @param model The model that will be used to query the DOM.
*/
query(model: any): void;
/**
* @param model The model that will be used to query the DOM.
* @param element Optional element on which to execute the query.
*/
query(model: any, element: HTMLElement): void;
query(model: any, element?: HTMLElement): void;
/**
* Copies properties from all provided objects into the first object parameter
@@ -104,26 +100,18 @@ interface BlocksStatic {
/**
* Converts an integer or string to a unit. If the value could not be parsed to a number it is not converted
*
* @param value The value to be converted to the specified unit
*/
toUnit(value: any): any;
/**
* @param value The value to be converted to the specified unit
* @param unit Optionally provide a unit to convert to. Default value is 'px'
*/
toUnit(value: any, unit: string): any;
toUnit(value: any, unit?: string): any;
/**
* Clones value. If deepClone is set to true the value will be cloned recursively
*
* @param value Value/object to be cloned
*/
clone(value: any): any;
/**
* @param value Value/object to be cloned
* @param deepClone By default false
*/
clone(value: any, deepClone: boolean): any;
clone(value: any, deepClone?: boolean): any;
/**
* Determines if the specified value is a HTML elements collection.
@@ -178,16 +166,11 @@ interface BlocksStatic {
/**
* Determines if two values are deeply equal. Set deepEqual to false to stop recusively equality checking
*
* @param a The first object to be campared
* @param b The second object to be compared
*/
equals(a: any, b: any): boolean;
/**
* @param a The first object to be campared
* @param b The second object to be compared
* @param deepEqual Determines if the equality check will recursively check all child properties
*/
equals(a: any, b: any, deepEqual: boolean): boolean;
equals(a: any, b: any, deepEqual?: boolean): boolean;
/**
* Gets the context for a particular element. Searches all parents until it finds the context.
@@ -220,32 +203,27 @@ interface BlocksStatic {
route(route: string): BlocksStatic;
optional(param: string): BlocksStatic;
optional(param: string, defaultValue: any): BlocksStatic;
optional(param: string, defaultValue?: any): BlocksStatic;
range(start: number, end: number): BlocksStatic;
/**
* Creates the server which will automatically handle server-side rendering.
*/
server(): { express(): any };
/**
*
* @param options Overrides default jsblocks options
*/
server(options: Server): { express(): any };
server(options?: Server): { express(): any };
/**
* Make observable property. You can specify initial value in parentheses.
*/
observable(): BlocksObservable;
observable(value: any[]): BlocksArray;
observable(value: any): BlocksObservable;
observable(value?: any): BlocksObservable;
/**
* Use blocks.Application and its MVC(Model-View-Collection) structure to create better architecture and maintainability for your application.
*/
Application(): App;
Application(options: { history: string }): App;
Application(options?: { history: string }): App;
}
/////////////////////////////////////////
@@ -305,22 +283,14 @@ interface BlocksArray extends BlocksObservable {
/**
* Adds values to the end of the observable array
*
* @param value The values that will be added to the end of the array
*/
add(value: any): BlocksArray;
/**
* @param value The values that will be added to the end of the array
* @param index Optional index specifying where to insert the value
*/
add(value: any, index: number): BlocksArray;
add(value: any, index?: number): BlocksArray;
/**
* Adds the values from the provided array(s) to the end of the collection
*
* @param value The array that will be added to the end of the array
*/
addMany(value: any[]): BlocksArray;
/**
* @param value The array that will be added to the end of the array
* @param index Optional position where the array of values to be inserted
*/
@@ -345,40 +315,26 @@ interface BlocksArray extends BlocksObservable {
/**
* Removes an item from the observable array
*
* @param value The value that will be removed or a callback function which returns true or false to determine if the value should be removed
*/
remove(value: any): BlocksArray;
/**
* @param value The value that will be removed or a callback function which returns true or false to determine if the value should be removed
* @param thisArg Optional this context for the callback
*/
remove(value: any, thisArg: Function): BlocksArray;
remove(value: any, thisArg?: Function): BlocksArray;
/**
* Removes an item at the specified index
*
* @param index The index location of the item that will be removed
*/
removeAt(index: number): BlocksArray;
/**
* @param index The index location of the item that will be removed
* @param count Optional parameter that if specified will remove the next items starting from the specified index
*/
removeAt(index: number, count: number): BlocksArray;
removeAt(index: number, count?: number): BlocksArray;
/**
* Removes all items from the observable array and optionally filter which items to be removed by providing a callback
*/
removeAll(): BlocksArray;
/**
* @param callback Optional callback function which filters which items to be removed. Returning a truthy value will remove the item and vice versa
*/
removeAll(callback: Function): BlocksArray;
/**
*
* @param callback Optional callback function which filters which items to be removed. Returning a truthy value will remove the item and vice versa
* @param thisArg Optional this context for the callback function
*/
removeAll(callback: Function, thisArg: any): BlocksArray;
removeAll(callback?: Function, thisArg?: any): BlocksArray;
/**
* The concat() method is used to join two or more arrays
@@ -390,24 +346,18 @@ interface BlocksArray extends BlocksObservable {
/**
* The slice() method returns the selected elements in an array, as a new array object
*
* @param start An integer that specifies where to start the selection (The first element has an index of 0)
*/
slice(start: number): any[];
/**
* @param start An integer that specifies where to start the selection (The first element has an index of 0)
* @param end An integer that specifies where to end the selection. If omitted, all elements from the start position and to the end of the array will be selected.
* Use negative numbers to select from the end of an array
*/
slice(start: number, end: number): any[];
slice(start: number, end?: number): any[];
/**
* The join() method joins the elements of an array into a string, and returns the string
*/
join(): string;
/**
*
* @param separator The separator to be used. If omitted, the elements are separated with a comma
*/
join(seperator: string): string;
join(seperator?: string): string;
/**
* The pop() method removes the last element of a observable array, and returns that element
@@ -433,12 +383,10 @@ interface BlocksArray extends BlocksObservable {
/**
* Sorts the elements of an array
*/
sort(): any[];
/**
*
* @param sortfunction A function that defines the sort order
*/
sort(sortfunction: Function): any[];
sort(sortfunction?: Function): any[];
/**
* Adds and/or removes elements from the observable array
@@ -466,12 +414,10 @@ interface App extends Extendable<App> {
/**
* Creates an application property for a Model.
*/
Property(): any;
/**
*
* @param options Configuration options for property
*/
Property(options: PropertyPrototype): any;
Property(options?: PropertyPrototype): any;
/**
* Defines a view that will be part of the Application.
@@ -593,12 +539,10 @@ interface Model {
/**
* Fires a request to the server to populate the Model based on the read URL specified
*/
read(): Model;
/**
*
* @param params The parameters Object that will be used to populate the Model from the specified options.read URL. If the URL does not contain parameters
*/
read(params: Object): Model;
read(params?: Object): Model;
/**
* Synchronizes the changes with the server by sending requests to the provided URL's
@@ -659,12 +603,10 @@ interface Collection extends Extendable<Collection> {
/**
* Fires a request to the server to populate the Model based on the read URL specified
*/
read(): Collection;
/**
*
* @param params The parameters Object that will be used to populate the Collection from the specified options.read URL. If the URL does not contain parameters
*/
read(params: Object): Collection;
read(params?: Object): Collection;
/**
* Clear all changes made to the collection
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+5 -5
View File
@@ -439,7 +439,7 @@ declare class Bluebird<R> implements Bluebird.Thenable<R>, Bluebird.Inspection<R
static all<T1, T2>(values: [Bluebird.Thenable<T1> | T1, Bluebird.Thenable<T2> | T2]): Bluebird<[T1, T2]>;
static all<T1>(values: [Bluebird.Thenable<T1> | T1]): Bluebird<[T1]>;
// array with values
static all<R>(values: Bluebird.Thenable<(Bluebird.Thenable<R> | R)[]> | (Bluebird.Thenable<R> | R)[]): Bluebird<R[]>;
static all<R>(values: Bluebird.Thenable<Array<Bluebird.Thenable<R> | R>> | Array<Bluebird.Thenable<R> | R>): Bluebird<R[]>;
/**
* Like ``Promise.all`` but for object properties instead of array items. Returns a promise that is fulfilled when all the properties of the object are fulfilled. The promise's fulfillment value is an object with fulfillment values at respective keys to the original object. If any promise in the object rejects, the returned promise is rejected with the rejection reason.
@@ -457,14 +457,14 @@ declare class Bluebird<R> implements Bluebird.Thenable<R>, Bluebird.Inspection<R
/**
* Like `Promise.some()`, with 1 as `count`. However, if the promise fulfills, the fulfillment value is not an array of 1 but the value directly.
*/
static any<R>(values: Bluebird.Thenable<(Bluebird.Thenable<R> | R)[]> | (Bluebird.Thenable<R> | R)[]): Bluebird<R>;
static any<R>(values: Bluebird.Thenable<Array<Bluebird.Thenable<R> | R>> | Array<Bluebird.Thenable<R> | R>): Bluebird<R>;
/**
* Given an array, or a promise of an array, which contains promises (or a mix of promises and values) return a promise that is fulfilled or rejected as soon as a promise in the array is fulfilled or rejected with the respective rejection reason or fulfillment value.
*
* **Note** If you pass empty array or a sparse array with no values, or a promise/thenable for such, it will be forever pending.
*/
static race<R>(values: Bluebird.Thenable<(Bluebird.Thenable<R> | R)[]> | (Bluebird.Thenable<R> | R)[]): Bluebird<R>;
static race<R>(values: Bluebird.Thenable<Array<Bluebird.Thenable<R> | R>> | Array<Bluebird.Thenable<R> | R>): Bluebird<R>;
/**
* Initiate a competetive race between multiple promises or values (values will become immediately fulfilled promises). When `count` amount of promises have been fulfilled, the returned promise is fulfilled with an array that contains the fulfillment values of the winners in order of resolution.
@@ -499,7 +499,7 @@ declare class Bluebird<R> implements Bluebird.Thenable<R>, Bluebird.Inspection<R
// variadic array
/** @deprecated use .all instead */
static join<R>(...values: (R | Bluebird.Thenable<R>)[]): Bluebird<R[]>;
static join<R>(...values: Array<R | Bluebird.Thenable<R>>): Bluebird<R[]>;
/**
* Map an array, or a promise of an array, which contains a promises (or a mix of promises and values) with the given `mapper` function with the signature `(item, index, arrayLength)` where `item` is the resolved value of a respective promise in the input array. If any promise in the input array is rejected the returned promise is rejected as well.
@@ -577,7 +577,7 @@ declare class Bluebird<R> implements Bluebird.Thenable<R>, Bluebird.Inspection<R
*
* If any promise in the input array is rejected or any promise returned by the iterator function is rejected, the result will be rejected as well.
*/
static mapSeries<R, U>(values: (R | Bluebird.Thenable<R>)[] | Bluebird.Thenable<(R | Bluebird.Thenable<R>)[]>, iterator: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable<U>): Bluebird<U[]>;
static mapSeries<R, U>(values: Array<R | Bluebird.Thenable<R>> | Bluebird.Thenable<Array<R | Bluebird.Thenable<R>>>, iterator: (item: R, index: number, arrayLength: number) => U | Bluebird.Thenable<U>): Bluebird<U[]>;
/**
* A meta method used to specify the disposer method that cleans up a resource when using `Promise.using`.
+7 -1
View File
@@ -1 +1,7 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false,
"unified-signatures": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+2 -2
View File
@@ -264,13 +264,13 @@ declare namespace Bookshelf {
}
interface LoadOptions extends SyncOptions {
withRelated: (string | WithRelatedQuery)[];
withRelated: Array<string | WithRelatedQuery>;
}
interface FetchOptions extends SyncOptions {
require?: boolean;
columns?: string | string[];
withRelated?: (string | WithRelatedQuery)[];
withRelated?: Array<string | WithRelatedQuery>;
}
interface WithRelatedQuery {
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+2 -4
View File
@@ -55,10 +55,8 @@ interface DatepickerEventObject extends JQueryEventObject {
}
interface JQuery {
datepicker(): JQuery;
datepicker(methodName: string): any;
datepicker(methodName: string, params: any): any;
datepicker(options: DatepickerOptions): JQuery;
datepicker(methodName: string, params?: any): any;
datepicker(options?: DatepickerOptions): JQuery;
off(events: "changeDate", selector?: string, handler?: (eventObject: DatepickerEventObject) => any): JQuery;
off(events: "changeDate", handler: (eventObject: DatepickerEventObject) => any): JQuery;
+2 -2
View File
@@ -159,7 +159,7 @@ declare namespace BootstrapFileInput {
Note:
You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped).
*/
allowedFileTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[];
allowedFileTypes?: Array<"image" | "html" | "text" | "video" | "audio" | "flash" | "object">;
/**
the list of allowed file extensions for upload.
This by default is set to null which means the plugin supports all file extensions for upload.
@@ -175,7 +175,7 @@ declare namespace BootstrapFileInput {
To disable this behavior, you can remove object from the list of allowedPreviewTypes OR fine tune it through allowedPreviewMimeTypes.
To disable content preview for all file-types and show the previewIcon instead as a thumbnail, set this to null, empty, or false.
*/
allowedPreviewTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[];
allowedPreviewTypes?: Array<"image" | "html" | "text" | "video" | "audio" | "flash" | "object">;
/**
the list of allowed mime types for preview.
This is set to null by default which means all possible mime types are allowed.
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+17 -18
View File
@@ -14,19 +14,19 @@ declare namespace BootstrapMaxlength {
/**
* The top position of the counter (Number of pixels, or a px or percent string)
*/
top?: Number | string;
top?: number | string;
/**
* The right position of the counter (Number of pixels, or a px or percent string)
*/
right?: Number | string;
right?: number | string;
/**
* The bottom position of the counter (Number of pixels, or a px or percent string)
*/
bottom?: Number | string;
bottom?: number | string;
/**
* The left position of the counter (Number of pixels, or a px or percent string)
*/
left?: Number | string;
left?: number | string;
/**
* The positioning to use. For example 'relative', 'absolute'
*/
@@ -37,12 +37,12 @@ declare namespace BootstrapMaxlength {
* Representation of the current input position
*/
interface PositionParam {
top: Number;
right: Number;
bottom: Number;
left: Number;
width: Number;
height: Number;
top: number;
right: number;
bottom: number;
left: number;
width: number;
height: number;
}
export interface Options {
@@ -50,12 +50,12 @@ declare namespace BootstrapMaxlength {
* If true the threshold will be ignored and the remaining length indication will be always showing up while typing or on focus on the input
* @default false
*/
alwaysShow?: Boolean;
alwaysShow?: boolean;
/**
* This is a number indicating how many chars are left to start displaying the indications
* @default 10
*/
threshold?: Number;
threshold?: number;
/**
* It's the class of the element with the indicator. By default is the bootstrap "label label-success" but can be changed to anything you'd like.
* @default 'label label-success'
@@ -85,12 +85,12 @@ declare namespace BootstrapMaxlength {
* If false, will display just the number of typed characters, e.g. will not display the max length.
* @default true
*/
showMaxLength?: Boolean;
showMaxLength?: boolean;
/**
* If false, will display just the remaining length, e.g. will display remaining lenght instead of number of typed characters.
* @default true
*/
showCharsTyped?: Boolean;
showCharsTyped?: boolean;
/**
* Is a string, define where to output the counter.
* Options: bottom, left, top, right, bottom-right, top-right, top-left, bottom-left and centered-right
@@ -110,7 +110,7 @@ declare namespace BootstrapMaxlength {
* Function example: function(currentText, maxLength) { return '' + Math.ceil(currentText.length / 160) + ' SMS Message(s)'; }
* @default null
*/
message?: string | ((currentText: string, maxLength: Number) => string);
message?: string | ((currentText: string, maxLength: number) => string);
/**
* If true the input will count using utf8 bytesize/encoding. For example: the '�' character is counted as two characters.
* @default false
@@ -151,8 +151,7 @@ declare namespace BootstrapMaxlength {
interface JQuery {
/** Apply the maxlength plugin on the selected elemens */
maxlength(options?: BootstrapMaxlength.Options): JQuery;
on(events: 'maxlength.shown', handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
on(events: 'maxlength.hidden', handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
trigger(eventType: 'maxlength.reposition', extraParameters?: any[]|Object): JQuery;
on(events: 'maxlength.shown' | 'maxlength.hidden', handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
trigger(eventType: 'maxlength.reposition', extraParameters?: any[]|{}): JQuery;
}
+1 -2
View File
@@ -9,8 +9,7 @@ interface JQueryStatic {
notify(message: string): NotifyReturn;
notify(opts: NotifyOptions, settings?: NotifySettings): NotifyReturn;
notifyDefaults(settings: NotifySettings): void;
notifyClose(): void;
notifyClose(command: string): void;
notifyClose(command?: string): void;
}
interface NotifyOptions {
+3 -8
View File
@@ -49,8 +49,7 @@ declare namespace BootstrapSwitch {
destroy(): JQuery;
state(): boolean;
state(value: any): JQuery;
state(value: any, skip: boolean): JQuery;
state(value: any, skip?: boolean): JQuery;
toggleState(skip?: boolean): JQuery;
radioAllOff(): boolean;
radioAllOff(state: boolean): JQuery;
@@ -60,7 +59,6 @@ declare namespace BootstrapSwitch {
animate(state: boolean): JQuery;
disabled(): boolean;
disabled(state: boolean): JQuery;
toggleDisabled(): JQuery;
readonly(): boolean;
readonly(state: boolean): JQuery;
toggleReadOnly(): JQuery;
@@ -82,11 +80,8 @@ declare namespace BootstrapSwitch {
}
interface JQuery {
bootstrapSwitch(): JQuery;
bootstrapSwitch(options: BootstrapSwitch.BootstrapSwitchOptions): JQuery;
bootstrapSwitch(method: string): JQuery;
bootstrapSwitch(method: string, param: any): JQuery;
bootstrapSwitch(method: string, param1: any, param2: any): JQuery;
bootstrapSwitch(options?: BootstrapSwitch.BootstrapSwitchOptions): JQuery;
bootstrapSwitch(method: string, param1?: any, param2?: any): JQuery;
off(events: "init.bootstrapSwitch", selector?: string, handler?: (eventobject: BootstrapSwitch.BootstrapSwitchEventObject) => any): JQuery;
off(events: "init.bootstrapSwitch", handler?: (eventobject: BootstrapSwitch.BootstrapSwitchEventObject) => any): JQuery;
+2 -7
View File
@@ -118,13 +118,8 @@ interface TouchSpinOptions {
interface JQuery {
/**
* Initialize TouchSpin
*/
TouchSpin(): JQuery;
/**
* Inialize TouchSpin with options
* Inialize TouchSpin
* @param options a TouchSpinOptions object with one or more options
*/
TouchSpin(options: TouchSpinOptions): JQuery;
TouchSpin(options?: TouchSpinOptions): JQuery;
}
+3 -5
View File
@@ -5,7 +5,7 @@
/// <reference types="jquery"/>
interface TimeickerOptions {
interface TimepickerOptions {
defaultTime?: string;
disableFocus?: boolean;
isOpen?: boolean;
@@ -20,8 +20,6 @@ interface TimeickerOptions {
}
interface JQuery {
timepicker(): JQuery;
timepicker(methodName: string): JQuery;
timepicker(methodName: string, params: any): JQuery;
timepicker(options: TimeickerOptions): JQuery;
timepicker(methodName?: string, params?: any): JQuery;
timepicker(options: TimepickerOptions): JQuery;
}
@@ -43,8 +43,8 @@ export interface DatetimepickerOptions {
collapse?: boolean;
language?: string;
defaultDate?: moment.Moment | Date | string;
disabledDates?: (moment.Moment | Date | string)[];
enabledDates?: (moment.Moment | Date | string)[];
disabledDates?: Array<moment.Moment | Date | string>;
enabledDates?: Array<moment.Moment | Date | string>;
icons?: DatetimepickerIcons;
useStrict?: boolean;
direction?: string;
@@ -77,8 +77,7 @@ export interface Datetimepicker {
declare global {
interface JQuery {
datetimepicker(): JQuery;
datetimepicker(options: DatetimepickerOptions): JQuery;
datetimepicker(options?: DatetimepickerOptions): JQuery;
off(events: "dp.change", selector?: string, handler?: (eventobject: DatetimepickerChangeEventObject) => any): JQuery;
off(events: "dp.change", handler: (eventobject: DatetimepickerChangeEventObject) => any): JQuery;
+4 -4
View File
@@ -113,7 +113,7 @@ export interface Datetimepicker {
* Also calling this function removes the configuration of options.enabledDates if such exist.
* Note: These values are matched with Day granularity.
*/
disabledDates(dates: boolean | (string | Date | moment.Moment)[]): void;
disabledDates(dates: boolean | Array<string | Date | moment.Moment>): void;
/**Returns the options.disabledHours option.
* NOTES: probably should be: disabledHours(): boolean | number[]; see: DatetimepickerOptions
*/
@@ -140,7 +140,7 @@ export interface Datetimepicker {
* Also calling this function removes the configuration of options.disabledDates if such exist.
* Note: These values are matched with Day granularity.
*/
enabledDates(dates: boolean | (string | Date | moment.Moment)[]): void;
enabledDates(dates: boolean | Array<string | Date | moment.Moment>): void;
/**Returns the options.enabledHours option.
* NOTES: probably should be: enabledHours(): boolean | number[]; see: DatetimepickerOptions
*/
@@ -334,7 +334,7 @@ export interface DatetimepickerOptions {
* eg disabledDates = ["2010-10-10"]; -> disabledDated will be { "2010-01-01": true }
* https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1499
*/
disabledDates?: boolean | (moment.Moment | Date | string)[] | any;
disabledDates?: boolean | Array<moment.Moment | Date | string> | any;
/**Will allow or disallow hour selections (much like disabledTimeIntervals) but will affect all days
* @default: false
* IMPORTANT! The getter returns an Object NOT an Array, with keys being the hours, values being true.
@@ -353,7 +353,7 @@ export interface DatetimepickerOptions {
* eg enabledDates = ["2010-10-10"]; -> enabledDated will be { "2010-01-01": true }
* https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1499
*/
enabledDates?: boolean | (moment.Moment | Date | string)[] | any;
enabledDates?: boolean | Array<moment.Moment | Date | string> | any;
/**Will allow or disallow hour selections (much like disabledTimeIntervals) but will affect all days
* @default: false
* IMPORTANT! The getter returns an Object NOT an Array, with keys being the hours, values being true.
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+5 -10
View File
@@ -84,18 +84,15 @@ interface TransitionEventNames {
}
interface JQuery {
modal(options?: ModalOptions): JQuery;
modal(options?: ModalOptionsBackdropString): JQuery;
modal(options?: ModalOptions | ModalOptionsBackdropString): JQuery;
modal(command: string): JQuery;
dropdown(): JQuery;
dropdown(command: string): JQuery;
dropdown(command?: string): JQuery;
scrollspy(command: string): JQuery;
scrollspy(options?: ScrollSpyOptions): JQuery;
tab(): JQuery;
tab(command: string): JQuery;
tab(command?: string): JQuery;
tooltip(options?: TooltipOptions): JQuery;
tooltip(command: string): JQuery;
@@ -103,11 +100,9 @@ interface JQuery {
popover(options?: PopoverOptions): JQuery;
popover(command: string): JQuery;
alert(): JQuery;
alert(command: string): JQuery;
alert(command?: string): JQuery;
button(): JQuery;
button(command: string): JQuery;
button(command?: string): JQuery;
collapse(options?: CollapseOptions): JQuery;
collapse(command: string): JQuery;
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+3 -8
View File
@@ -1102,12 +1102,8 @@ declare namespace breeze.config {
declare namespace breeze.promises {
export interface IPromise<T> {
then<U>(onFulfill: (value: T) => U, onReject?: (reason: any) => U): IPromise<U>;
then<U>(onFulfill: (value: T) => IPromise<U>, onReject?: (reason: any) => U): IPromise<U>;
then<U>(onFulfill: (value: T) => U, onReject?: (reason: any) => IPromise<U>): IPromise<U>;
then<U>(onFulfill: (value: T) => IPromise<U>, onReject?: (reason: any) => IPromise<U>): IPromise<U>;
catch<U>(onRejected: (reason: any) => U): IPromise<U>;
catch<U>(onRejected: (reason: any) => IPromise<U>): IPromise<U>;
then<U>(onFulfill: (value: T) => U | IPromise<U>, onReject?: (reason: any) => U | IPromise<U>): IPromise<U>;
catch<U>(onRejected: (reason: any) => U | IPromise<U>): IPromise<U>;
finally(finallyCallback: () => any): IPromise<T>;
}
@@ -1120,8 +1116,7 @@ declare namespace breeze.promises {
export interface IPromiseService {
defer<T>(): IDeferred<T>;
reject(reason?: any): IPromise<any>;
resolve<T>(object: T): IPromise<T>;
resolve<T>(object: IPromise<T>): IPromise<T>;
resolve<T>(object: T | IPromise<T>): IPromise<T>;
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+4 -16
View File
@@ -28,7 +28,7 @@ declare namespace browserSync {
* patterns.
* Default: false
*/
files?: string | (string | FileCallback)[];
files?: string | Array<string | FileCallback>;
/**
* File watching options that get passed along to Chokidar. Check their docs for available options
* Default: undefined
@@ -243,7 +243,7 @@ declare namespace browserSync {
* Note: requires at least version 1.6.2
*/
socket?: SocketOptions;
middleware?: MiddlewareHandler | PerRouteMiddleware | (MiddlewareHandler | PerRouteMiddleware)[];
middleware?: MiddlewareHandler | PerRouteMiddleware | Array<MiddlewareHandler | PerRouteMiddleware>;
}
interface Hash<T> {
@@ -278,7 +278,7 @@ declare namespace browserSync {
*/
routes?: Hash<string>;
/** configure custom middleware */
middleware?: (MiddlewareHandler | PerRouteMiddleware)[];
middleware?: Array<MiddlewareHandler | PerRouteMiddleware>;
}
interface ProxyOptions {
@@ -359,24 +359,12 @@ declare namespace browserSync {
* depending on your use-case.
*/
init(config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance;
/**
* Reload the browser
* The reload method will inform all browsers about changed files and will either cause the browser
* to refresh, or inject the files where possible.
*/
reload(): void;
/**
* Reload a single file
* The reload method will inform all browsers about changed files and will either cause the browser
* to refresh, or inject the files where possible.
*/
reload(file: string): void;
/**
* Reload multiple files
* The reload method will inform all browsers about changed files and will either cause the browser
* to refresh, or inject the files where possible.
*/
reload(files: string[]): void;
reload(files?: string | string[]): void;
/**
* The reload method will inform all browsers about changed files and will either cause the browser
* to refresh, or inject the files where possible.
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+4 -8
View File
@@ -93,8 +93,7 @@ interface BrowserifyObject extends NodeJS.EventEmitter {
* Add an entry file from file that will be executed when the bundle loads.
* If file is an array, each item in file will be added as an entry file.
*/
add(file: InputFile[], opts?: FileOptions): BrowserifyObject;
add(file: InputFile, opts?: FileOptions): BrowserifyObject;
add(file: InputFile | InputFile[], opts?: FileOptions): BrowserifyObject;
/**
* Make file available from outside the bundle with require(file).
* The file param is anything that can be resolved by require.resolve().
@@ -113,8 +112,7 @@ interface BrowserifyObject extends NodeJS.EventEmitter {
* If file is an array, each item in file will be externalized.
* If file is another bundle, that bundle's contents will be read and excluded from the current bundle as the bundle in file gets bundled.
*/
external(file: string[], opts?: { basedir?: string }): BrowserifyObject;
external(file: string, opts?: { basedir?: string }): BrowserifyObject;
external(file: string | string[], opts?: { basedir?: string }): BrowserifyObject;
external(file: BrowserifyObject): BrowserifyObject;
/**
* Prevent the module name or file at file from showing up in the output bundle.
@@ -131,14 +129,12 @@ interface BrowserifyObject extends NodeJS.EventEmitter {
* If tr is a function, it will be called with tr(file) and it should return a through-stream that takes the raw file contents and produces the transformed source.
* If tr is a string, it should be a module name or file path of a transform module
*/
transform<T extends { basedir?: string }>(tr: string, opts?: T): BrowserifyObject;
transform<T extends { basedir?: string }>(tr: (file: string, opts: T) => NodeJS.ReadWriteStream, opts?: T): BrowserifyObject;
transform<T extends { basedir?: string }>(tr: string | ((file: string, opts: T) => NodeJS.ReadWriteStream), opts?: T): BrowserifyObject;
/**
* Register a plugin with opts. Plugins can be a string module name or a function the same as transforms.
* plugin(b, opts) is called with the Browserify instance b.
*/
plugin<T extends { basedir?: string }>(plugin: string, opts?: T): BrowserifyObject;
plugin<T extends { basedir?: string }>(plugin: (b: BrowserifyObject, opts: T) => any, opts?: T): BrowserifyObject;
plugin<T extends { basedir?: string }>(plugin: string | ((b: BrowserifyObject, opts: T) => any), opts?: T): BrowserifyObject;
/**
* Reset the pipeline back to a normal state. This function is called automatically when bundle() is called multiple times.
* This function triggers a 'reset' event.
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+1 -4
View File
@@ -42,10 +42,7 @@ declare namespace busboy {
filename: string,
encoding: string,
mimetype: string) => void): this;
on(event: 'finish', callback: () => void): this;
on(event: 'partsLimit', callback: () => void): this;
on(event: 'filesLimit', callback: () => void): this;
on(event: 'fieldsLimit', callback: () => void): this;
on(event: 'finish' | 'partsLimit' | 'filesLimit' | 'fieldsLimit', callback: () => void): this;
on(event: string, listener: Function): this;
}
+6 -1
View File
@@ -1 +1,6 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
+1 -1
View File
@@ -139,7 +139,7 @@ declare class ByteBuffer {
/**
* Concatenates multiple ByteBuffers into one.
*/
static concat( buffers: (ByteBuffer | ArrayBuffer | Uint8Array | string)[], encoding?: string | boolean, litteEndian?: boolean, noAssert?: boolean ): ByteBuffer;
static concat( buffers: Array<ByteBuffer | ArrayBuffer | Uint8Array | string>, encoding?: string | boolean, litteEndian?: boolean, noAssert?: boolean ): ByteBuffer;
/**
* Decodes a base64 encoded string to a ByteBuffer.