mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -22,6 +22,7 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [Atom](https://atom.io/) (by [vvakame](https://github.com/vvakame))
|
||||
* [Backbone.js](http://backbonejs.org/) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [Backbone Relational](http://backbonerelational.org/) (by [Eirik Hoem](https://github.com/eirikhm))
|
||||
* [BigInteger](https://github.com/peterolson/BigInteger.js) (by [Ingo Bürk](https://github.com/Airblader))
|
||||
* [BigScreen](http://brad.is/coding/BigScreen/) (by [Douglas Eichelberger](https://github.com/dduugg))
|
||||
* [Bluebird](https://github.com/petkaantonov/bluebird) (by [Bart van der Schoor](https://github.com/Bartvds))
|
||||
* [Bootbox](https://github.com/makeusabrew/bootbox) (by [Vincent Bortone](https://github.com/vbortone/))
|
||||
@@ -155,6 +156,7 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [jQuery.Watermark](http://jquery-watermark.googlecode.com) (by [Anwar Javed](https://github.com/anwarjaved))
|
||||
* [jQuery.base64](https://github.com/yatt/jquery.base64) (by [Shinya Mochizuki](https://github.com/enrapt-mochizuki))
|
||||
* [js-git](https://github.com/creationix/js-git) (by [Bart van der Schoor](https://github.com/Bartvds))
|
||||
* [js-url](https://github.com/websanova/js-url) (by [MIZUNE Pine](https://github.com/pine613))
|
||||
* [js-yaml](https://github.com/nodeca/js-yaml) (by [Bart van der Schoor](https://github.com/Bartvds/))
|
||||
* [jScrollPane](http://jscrollpane.kelvinluck.com) (by [Dániel Tar](https://github.com/qcz))
|
||||
* [JSDeferred](http://cho45.stfuawsc.com/jsdeferred/) (by [Daisuke Mino](https://github.com/minodisk))
|
||||
|
||||
@@ -37,3 +37,5 @@ Here is an updated list of [definitions people have requested](https://github.co
|
||||
This project is licensed under the MIT license.
|
||||
|
||||
Copyrights on the definition files are respective of each contributor listed at the beginning of each definition file.
|
||||
|
||||
[](https://github.com/igrigorik/ga-beacon)
|
||||
@@ -0,0 +1,114 @@
|
||||
/// <reference path="big-integer.d.ts" />
|
||||
|
||||
// constructor tests
|
||||
var noArgument = bigInt(),
|
||||
numberArgument = bigInt( 93 ),
|
||||
stringArgument = bigInt( "75643564363473453456342378564387956906736546456235345" ),
|
||||
bigIntArgument = bigInt( noArgument );
|
||||
|
||||
// method tests
|
||||
var x = bigInt(),
|
||||
isBigInteger: BigInteger,
|
||||
isNumber: number,
|
||||
isBoolean: boolean,
|
||||
isString: string,
|
||||
isDivmod: {
|
||||
quotient: BigInteger;
|
||||
remainder: BigInteger;
|
||||
};
|
||||
|
||||
isBigInteger = x.abs();
|
||||
|
||||
isBigInteger = x.add( 0 );
|
||||
isBigInteger = x.add( x );
|
||||
isBigInteger = x.add( "100" );
|
||||
|
||||
isBigInteger = x.compare( 0 );
|
||||
isBigInteger = x.compare( x );
|
||||
isBigInteger = x.compare( "100" );
|
||||
|
||||
isBigInteger = x.compareAbs( 0 );
|
||||
isBigInteger = x.compareAbs( x );
|
||||
isBigInteger = x.compareAbs( "100" );
|
||||
|
||||
isBigInteger = x.divide( 0 );
|
||||
isBigInteger = x.divide( x );
|
||||
isBigInteger = x.divide( "100" );
|
||||
|
||||
isDivmod = x.divmod( 0 );
|
||||
isDivmod = x.divmod( x );
|
||||
isDivmod = x.divmod( "100" );
|
||||
|
||||
isBoolean = x.equals( 0 );
|
||||
isBoolean = x.equals( x );
|
||||
isBoolean = x.equals( "100" );
|
||||
|
||||
isBoolean = x.greater( 0 );
|
||||
isBoolean = x.greater( x );
|
||||
isBoolean = x.greater( "100" );
|
||||
|
||||
isBoolean = x.greaterOrEquals( 0 );
|
||||
isBoolean = x.greaterOrEquals( x );
|
||||
isBoolean = x.greaterOrEquals( "100" );
|
||||
|
||||
isBoolean = x.isEven();
|
||||
|
||||
isBoolean = x.isNegative();
|
||||
|
||||
isBoolean = x.isOdd();
|
||||
|
||||
isBoolean = x.isPositive();
|
||||
|
||||
isBoolean = x.lesser( 0 );
|
||||
isBoolean = x.lesser( x );
|
||||
isBoolean = x.lesser( "100" );
|
||||
|
||||
isBoolean = x.lesserOrEquals( 0 );
|
||||
isBoolean = x.lesserOrEquals( x );
|
||||
isBoolean = x.lesserOrEquals( "100" );
|
||||
|
||||
isBigInteger = x.minus( 0 );
|
||||
isBigInteger = x.minus( x );
|
||||
isBigInteger = x.minus( "100" );
|
||||
|
||||
isBigInteger = x.mod( 0 );
|
||||
isBigInteger = x.mod( x );
|
||||
isBigInteger = x.mod( "100" );
|
||||
|
||||
isBigInteger = x.multiply( 0 );
|
||||
isBigInteger = x.multiply( x );
|
||||
isBigInteger = x.multiply( "100" );
|
||||
|
||||
isBigInteger = x.next();
|
||||
|
||||
isBoolean = x.notEquals( 0 );
|
||||
isBoolean = x.notEquals( x );
|
||||
isBoolean = x.notEquals( "100" );
|
||||
|
||||
isBigInteger = x.over( 0 );
|
||||
isBigInteger = x.over( x );
|
||||
isBigInteger = x.over( "100" );
|
||||
|
||||
isBigInteger = x.plus( 0 );
|
||||
isBigInteger = x.plus( x );
|
||||
isBigInteger = x.plus( "100" );
|
||||
|
||||
isBigInteger = x.pow( 0 );
|
||||
isBigInteger = x.pow( x );
|
||||
isBigInteger = x.pow( "100" );
|
||||
|
||||
isBigInteger = x.prev();
|
||||
|
||||
isBigInteger = x.subtract( 0 );
|
||||
isBigInteger = x.subtract( x );
|
||||
isBigInteger = x.subtract( "100" );
|
||||
|
||||
isBigInteger = x.times( 0 );
|
||||
isBigInteger = x.times( x );
|
||||
isBigInteger = x.times( "100" );
|
||||
|
||||
isNumber = x.toJSNumber();
|
||||
|
||||
isString = x.toString();
|
||||
|
||||
isNumber = x.valueOf();
|
||||
Vendored
+202
@@ -0,0 +1,202 @@
|
||||
// Type definitions for BigInteger.js
|
||||
// Project: https://github.com/peterolson/BigInteger.js
|
||||
// Definitions by: Ingo Bürk <https://github.com/Airblader>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface BigInteger {
|
||||
/** Returns the absolute value of a bigInt. */
|
||||
abs(): BigInteger;
|
||||
|
||||
/** Performs addition */
|
||||
add( number: number ): BigInteger;
|
||||
/** Performs addition */
|
||||
add( number: BigInteger ): BigInteger;
|
||||
/** Performs addition */
|
||||
add( number: 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** Performs subtraction. */
|
||||
subtract( number: number ): BigInteger;
|
||||
/** Performs subtraction. */
|
||||
subtract( number: BigInteger ): BigInteger;
|
||||
/** Performs subtraction. */
|
||||
subtract( number: string ): BigInteger;
|
||||
|
||||
/** Performs multiplication. */
|
||||
multiply( number: number ): BigInteger;
|
||||
/** Performs multiplication. */
|
||||
multiply( number: BigInteger ): BigInteger;
|
||||
/** Performs multiplication. */
|
||||
multiply( number: 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** Adds one to the number. */
|
||||
next(): BigInteger;
|
||||
|
||||
/** Subtracts one from the number. */
|
||||
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;
|
||||
|
||||
/** 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 };
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** Returns true if the number is even, false otherwise. */
|
||||
isEven(): boolean;
|
||||
|
||||
/** Returns true if the number is odd, false otherwise. */
|
||||
isOdd(): boolean;
|
||||
|
||||
/** Return true if the number is positive, false otherwise. Returns true for 0 and false for -0. */
|
||||
isPositive(): boolean;
|
||||
|
||||
/** Returns true if the number is negative, false otherwise. Returns false for 0 and true for -0. */
|
||||
isNegative(): boolean;
|
||||
|
||||
/**
|
||||
* 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 ): 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: BigInteger ): 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: string ): BigInteger;
|
||||
|
||||
/** Performs a comparison between the absolute value of two numbers. */
|
||||
compareAbs( number: number ): BigInteger;
|
||||
/** Performs a comparison between the absolute value of two numbers. */
|
||||
compareAbs( number: BigInteger ): BigInteger;
|
||||
/** Performs a comparison between the absolute value of two numbers. */
|
||||
compareAbs( number: string ): BigInteger;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range. */
|
||||
toJSNumber(): number;
|
||||
|
||||
/** Converts a bigInt to a string. */
|
||||
toString(): string;
|
||||
|
||||
/** Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion. */
|
||||
valueOf(): number;
|
||||
}
|
||||
|
||||
interface BigIntegerStatic {
|
||||
/** Equivalent to bigInt(1) */
|
||||
one: BigInteger;
|
||||
/** Equivalent to bigInt(0) */
|
||||
zero: BigInteger;
|
||||
/** Equivalent to bigInt(-1) */
|
||||
minusOne: BigInteger;
|
||||
|
||||
/** Equivalent to bigInt(0) */
|
||||
(): BigInteger;
|
||||
/** Parse a Javascript number into a bigInt */
|
||||
( number: number ): BigInteger;
|
||||
/** Parse a string into a bigInt */
|
||||
( string: string ): BigInteger;
|
||||
/** no-op */
|
||||
( bigInt: BigInteger ): BigInteger;
|
||||
}
|
||||
|
||||
declare var bigInt: BigIntegerStatic;
|
||||
|
||||
declare module "big-integer" {
|
||||
export = bigInt;
|
||||
}
|
||||
Vendored
+6
@@ -1293,3 +1293,9 @@ interface IGrunt extends grunt.IConfigComponents, grunt.fail.FailModule, grunt.I
|
||||
*/
|
||||
version: string
|
||||
}
|
||||
|
||||
// NodeJS Support
|
||||
declare module 'grunt' {
|
||||
var grunt: IGrunt;
|
||||
export = grunt;
|
||||
}
|
||||
|
||||
Vendored
+26
-7
@@ -5,13 +5,13 @@
|
||||
|
||||
|
||||
declare function describe(description: string, specDefinitions: () => void): void;
|
||||
declare function ddescribe(description: string, specDefinitions: () => void): void;
|
||||
declare function ddescribe(description: string, specDefinitions: () => void): void;
|
||||
declare function xdescribe(description: string, specDefinitions: () => void): void;
|
||||
|
||||
declare function it(expectation: string, assertion?: () => void): void;
|
||||
declare function it(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
declare function iit(expectation: string, assertion?: () => void): void;
|
||||
declare function iit(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
declare function iit(expectation: string, assertion?: () => void): void;
|
||||
declare function iit(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
declare function xit(expectation: string, assertion?: () => void): void;
|
||||
declare function xit(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
|
||||
@@ -98,13 +98,13 @@ declare module jasmine {
|
||||
addReporter(reporter: Reporter): void;
|
||||
execute(): void;
|
||||
describe(description: string, specDefinitions: () => void): Suite;
|
||||
ddescribe(description: string, specDefinitions: () => void): Suite;
|
||||
ddescribe(description: string, specDefinitions: () => void): Suite;
|
||||
beforeEach(beforeEachFunction: () => void): void;
|
||||
currentRunner(): Runner;
|
||||
afterEach(afterEachFunction: () => void): void;
|
||||
xdescribe(desc: string, specDefinitions: () => void): XSuite;
|
||||
it(description: string, func: () => void): Spec;
|
||||
iit(description: string, func: () => void): Spec;
|
||||
iit(description: string, func: () => void): Spec;
|
||||
xit(desc: string, func: () => void): XSpec;
|
||||
compareRegExps_(a: RegExp, b: RegExp, mismatchKeys: string[], mismatchValues: string[]): boolean;
|
||||
compareObjects_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
|
||||
@@ -354,7 +354,7 @@ declare module jasmine {
|
||||
|
||||
identity: string;
|
||||
and: SpyAnd;
|
||||
calls: any;
|
||||
calls: Calls;
|
||||
mostRecentCall: { args: any[]; };
|
||||
argsForCall: any[];
|
||||
wasCalled: boolean;
|
||||
@@ -367,13 +367,32 @@ declare module jasmine {
|
||||
/** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */
|
||||
returnValue(val: any): void;
|
||||
/** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */
|
||||
callFake(fn: Function): void;
|
||||
callFake(fn: Function): void;
|
||||
/** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */
|
||||
throwError(msg: string): void;
|
||||
/** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */
|
||||
stub(): void;
|
||||
}
|
||||
|
||||
interface Calls {
|
||||
/** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. **/
|
||||
any(): boolean;
|
||||
/** By chaining the spy with calls.count(), will return the number of times the spy was called **/
|
||||
count(): number;
|
||||
/** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index **/
|
||||
argsFor(index: number): any[];
|
||||
/** By chaining the spy with calls.allArgs(), will return the arguments to all calls **/
|
||||
allArgs(): any[];
|
||||
/** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls **/
|
||||
all(): any;
|
||||
/** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call **/
|
||||
mostRecent(): any;
|
||||
/** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call **/
|
||||
first(): any;
|
||||
/** By chaining the spy with calls.reset(), will clears all tracking for a spy **/
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
interface Util {
|
||||
inherit(childClass: Function, parentClass: Function): any;
|
||||
formatException(e: any): any;
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for joi v3.1.0
|
||||
// Type definitions for joi v4.0.0
|
||||
// Project: https://github.com/spumko/joi
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
@@ -1270,6 +1270,125 @@ function test_datepicker() {
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "calculateWeek", myWeekCalc);
|
||||
}
|
||||
|
||||
function changeMonth() {
|
||||
$(".selector").datepicker({ changeMonth: true });
|
||||
|
||||
var changeMonth: boolean = $(".selector").datepicker("option", "changeMonth");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "changeMonth", true);
|
||||
}
|
||||
|
||||
function changeYear() {
|
||||
$(".selector").datepicker({ changeYear: true });
|
||||
|
||||
var changeYear: boolean = $(".selector").datepicker("option", "changeYear");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "changeYear", true);
|
||||
}
|
||||
|
||||
function closeText() {
|
||||
$(".selector").datepicker({ closeText: "Close" });
|
||||
|
||||
var closeText: string = $(".selector").datepicker("option", "closeText");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "closeText", "Close");
|
||||
}
|
||||
|
||||
function constrainInput() {
|
||||
$(".selector").datepicker({ constrainInput: false });
|
||||
|
||||
var constrainInput: boolean = $(".selector").datepicker("option", "constrainInput");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "constrainInput", false);
|
||||
}
|
||||
|
||||
function currentText() {
|
||||
$(".selector").datepicker({ currentText: "Now" });
|
||||
|
||||
var currentText: string = $(".selector").datepicker("option", "currentText");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "currentText", "Now");
|
||||
}
|
||||
|
||||
function dateFormat() {
|
||||
$(".selector").datepicker({ dateFormat: "yy-mm-dd" });
|
||||
|
||||
var dateFormat: string = $(".selector").datepicker("option", "dateFormat");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "dateFormat", "yy-mm-dd");
|
||||
}
|
||||
|
||||
function dayNames() {
|
||||
$(".selector").datepicker({ dayNames: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"] });
|
||||
|
||||
var dayNames: string[] = $(".selector").datepicker("option", "dayNames");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "dayNames", ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"]);
|
||||
}
|
||||
|
||||
function dayNamesMin() {
|
||||
$(".selector").datepicker({ dayNamesMin: ["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"] });
|
||||
|
||||
var dayNamesMin: string[] = $(".selector").datepicker("option", "dayNamesMin");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "dayNamesMin", ["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"]);
|
||||
}
|
||||
|
||||
function dayNamesShort() {
|
||||
$(".selector").datepicker({ dayNamesShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"] });
|
||||
|
||||
var dayNamesShort: string[] = $(".selector").datepicker("option", "dayNamesShort");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "dayNamesShort", ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"]);
|
||||
}
|
||||
|
||||
function defaultDate() {
|
||||
$(".selector").datepicker({ defaultDate: +7 });
|
||||
|
||||
var defaultDate: any = $(".selector").datepicker("option", "defaultDate");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "defaultDate", +7);
|
||||
$set = $(".selector").datepicker("option", "defaultDate", new Date());
|
||||
$set = $(".selector").datepicker("option", "defaultDate", "+1m +7d");
|
||||
}
|
||||
|
||||
function duration() {
|
||||
$(".selector").datepicker({ duration: "slow" });
|
||||
|
||||
var duration: string = $(".selector").datepicker("option", "duration");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "duration", "slow");
|
||||
}
|
||||
|
||||
function firstDay() {
|
||||
$(".selector").datepicker({ firstDay: 1 });
|
||||
|
||||
var firstDay: number = $(".selector").datepicker("option", "firstDay");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "firstDay", 1);
|
||||
}
|
||||
|
||||
function gotoCurrent() {
|
||||
$(".selector").datepicker({ gotoCurrent: true });
|
||||
|
||||
var gotoCurrent: boolean = $(".selector").datepicker("option", "gotoCurrent");
|
||||
|
||||
// setter
|
||||
var $set: JQuery = $(".selector").datepicker("option", "gotoCurrent", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Vendored
+227
-4
@@ -180,7 +180,7 @@ declare module JQueryUI {
|
||||
* Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.
|
||||
* String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today.
|
||||
*/
|
||||
defaultDateType?: any; // Date, number or string
|
||||
defaultDate?: any; // Date, number or string
|
||||
/**
|
||||
* Control the speed at which the datepicker appears, it may be a time in milliseconds or a string representing one of the three predefined speeds ("slow", "normal", "fast").
|
||||
*/
|
||||
@@ -1278,19 +1278,242 @@ interface JQuery {
|
||||
* Get the calculateWeek option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'buttonText'
|
||||
* @param optionName 'calculateWeek'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'calculateWeek'): (date: Date) => string;
|
||||
/**
|
||||
* Set the calculateWeek option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'buttonText'
|
||||
* @param optionName 'calculateWeek'
|
||||
* @param calculateWeekValue A function to calculate the week of the year for a given date. The default implementation uses the ISO 8601 definition: weeks start on a Monday; the first week of the year contains the first Thursday of the year.
|
||||
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'calculateWeek', calculateWeekValue: (date: Date) => string): JQuery;
|
||||
|
||||
/**
|
||||
* Get the changeMonth option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'changeMonth'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'changeMonth'): boolean;
|
||||
/**
|
||||
* Set the changeMonth option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'changeMonth'
|
||||
* @param changeMonthValue Whether the month should be rendered as a dropdown instead of text.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'changeMonth', changeMonthValue: boolean): JQuery;
|
||||
|
||||
/**
|
||||
* Get the changeYear option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'changeYear'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'changeYear'): boolean;
|
||||
/**
|
||||
* Set the changeYear option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'changeYear'
|
||||
* @param changeYearValue Whether the year should be rendered as a dropdown instead of text. Use the yearRange option to control which years are made available for selection.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'changeYear', changeYearValue: boolean): JQuery;
|
||||
|
||||
/**
|
||||
* Get the closeText option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'closeText'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'closeText'): string;
|
||||
/**
|
||||
* Set the closeText option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'closeText'
|
||||
* @param closeTextValue The text to display for the close link. Use the showButtonPanel option to display this button.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'closeText', closeTextValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Get the constrainInput option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'constrainInput'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'constrainInput'): boolean;
|
||||
/**
|
||||
* Set the constrainInput option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'constrainInput'
|
||||
* @param constrainInputValue When true, entry in the input field is constrained to those characters allowed by the current dateFormat option.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'constrainInput', constrainInputValue: boolean): JQuery;
|
||||
|
||||
/**
|
||||
* Get the currentText option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'currentText'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'currentText'): string;
|
||||
/**
|
||||
* Set the currentText option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'currentText'
|
||||
* @param currentTextValue The text to display for the current day link. Use the showButtonPanel option to display this button.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'currentText', currentTextValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Get the dateFormat option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'dateFormat'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'dateFormat'): string;
|
||||
/**
|
||||
* Set the dateFormat option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'dateFormat'
|
||||
* @param dateFormatValue The format for parsed and displayed dates. For a full list of the possible formats see the formatDate function.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'dateFormat', dateFormatValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Get the dayNames option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'dayNames'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'dayNames'): string[];
|
||||
/**
|
||||
* Set the dayNames option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'dayNames'
|
||||
* @param dayNamesValue The list of long day names, starting from Sunday, for use as requested via the dateFormat option.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'dayNames', dayNamesValue: string[]): JQuery;
|
||||
|
||||
/**
|
||||
* Get the dayNamesMin option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'dayNamesMin'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'dayNamesMin'): string[];
|
||||
/**
|
||||
* Set the dayNamesMin option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'dayNamesMin'
|
||||
* @param dayNamesMinValue The list of minimised day names, starting from Sunday, for use as column headers within the datepicker.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'dayNamesMin', dayNamesMinValue: string[]): JQuery;
|
||||
|
||||
/**
|
||||
* Get the dayNamesShort option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'dayNamesShort'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'dayNamesShort'): string[];
|
||||
/**
|
||||
* Set the dayNamesShort option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'dayNamesShort'
|
||||
* @param dayNamesShortValue The list of abbreviated day names, starting from Sunday, for use as requested via the dateFormat option.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'dayNamesShort', dayNamesShortValue: string[]): JQuery;
|
||||
|
||||
/**
|
||||
* Get the defaultDate option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'defaultDate'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'defaultDate'): any;
|
||||
/**
|
||||
* Set the defaultDate option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'defaultDate'
|
||||
* @param defaultDateValue A date object containing the default date.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'defaultDate', defaultDateValue: Date): JQuery;
|
||||
/**
|
||||
* Set the defaultDate option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'defaultDate'
|
||||
* @param defaultDateValue A number of days from today. For example 2 represents two days from today and -1 represents yesterday.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'defaultDate', defaultDateValue: number): JQuery;
|
||||
/**
|
||||
* Set the defaultDate option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'defaultDate'
|
||||
* @param defaultDateValue A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'defaultDate', defaultDateValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Get the duration option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'duration'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'duration'): string;
|
||||
/**
|
||||
* Set the duration option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'duration'
|
||||
* @param durationValue Control the speed at which the datepicker appears, it may be a time in milliseconds or a string representing one of the three predefined speeds ("slow", "normal", "fast").
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'duration', durationValue: string): JQuery;
|
||||
|
||||
/**
|
||||
* Get the firstDay option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'firstDay'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'firstDay'): number;
|
||||
/**
|
||||
* Set the firstDay option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'firstDay'
|
||||
* @param firstDayValue Set the first day of the week: Sunday is 0, Monday is 1, etc.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'firstDay', firstDayValue: number): JQuery;
|
||||
|
||||
/**
|
||||
* Get the gotoCurrent option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'gotoCurrent'
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'gotoCurrent'): boolean;
|
||||
/**
|
||||
* Set the gotoCurrent option, after initialization
|
||||
*
|
||||
* @param methodName 'option'
|
||||
* @param optionName 'gotoCurrent'
|
||||
* @param gotoCurrentValue When true, the current day link moves to the currently selected date instead of today.
|
||||
*/
|
||||
datepicker(methodName: 'option', optionName: 'gotoCurrent', gotoCurrentValue: boolean): JQuery;
|
||||
|
||||
/**
|
||||
* Gets the value currently associated with the specified optionName.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/// <reference path="js-url.d.ts" />
|
||||
|
||||
url();
|
||||
|
||||
url('domain');
|
||||
url(1);
|
||||
|
||||
url('domain', 'test.www.example.com/path/here');
|
||||
url(-1, 'test.www.example.com/path/here');
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for url() v1.8.6
|
||||
// Project: https://github.com/websanova/js-url
|
||||
// Definitions by: MIZUNE Pine <https://github.com/pine613>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface UrlStatic {
|
||||
(): string;
|
||||
(pattern: string): string;
|
||||
(pattern: number): string;
|
||||
(pattern: string, url: string): string;
|
||||
(pattern: number, url: string): string;
|
||||
}
|
||||
|
||||
declare var url: UrlStatic;
|
||||
@@ -75,7 +75,7 @@ function test_basic() {
|
||||
|
||||
$scope.account = account.get({ single: true });
|
||||
|
||||
account.customPOST("messages", { param: "myParam" }, {}, { name: "My Message" })
|
||||
account.customPOST({ name: "My Message" }, "messages", { param: "myParam" }, {})
|
||||
}
|
||||
|
||||
function test_config() {
|
||||
|
||||
Vendored
+2
-2
@@ -60,8 +60,8 @@ interface RestangularCustom {
|
||||
customGET(path: string, params?: any, headers?: any): ng.IPromise<any>;
|
||||
customGETLIST(path: string, params?: any, headers?: any): ng.IPromise<any>;
|
||||
customDELETE(path: string, params?: any, headers?: any): ng.IPromise<any>;
|
||||
customPOST(path: string, params?: any, headers?: any, elem?: any): ng.IPromise<any>;
|
||||
customPUT(path: string, params?: any, headers?: any, elem?: any): ng.IPromise<any>;
|
||||
customPOST(elem?: any, path?: string, params?: any, headers?: any): ng.IPromise<any>;
|
||||
customPUT(elem?: any, path?: string, params?: any, headers?: any): ng.IPromise<any>;
|
||||
customOperation(operation: string, path: string, params?: any, headers?: any, elem?: any): ng.IPromise<any>;
|
||||
addRestangularMethod(name: string, operation: string, path?: string, params?: any, headers?: any, elem?: any): ng.IPromise<any>;
|
||||
}
|
||||
|
||||
+3
-2
@@ -562,7 +562,8 @@ interface UnderscoreStringStaticExports {
|
||||
toBoolean(str: string, trueValues?: any[], falseValues?: any[]): boolean;
|
||||
|
||||
}
|
||||
declare module "underscore.string" {
|
||||
export = UnderscoreStringStatic;
|
||||
declare module 'underscore.string' {
|
||||
var underscoreString: UnderscoreStringStatic;
|
||||
export = underscoreString;
|
||||
}
|
||||
// TODO interface UnderscoreString extends Underscore<string>
|
||||
|
||||
Reference in New Issue
Block a user