mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-17 07:20:23 +00:00
Merge branch 'types-2.0' of https://github.com/DefinitelyTyped/DefinitelyTyped into types-2.0
This commit is contained in:
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for accepts
|
||||
// Type definitions for accepts 1.3
|
||||
// Project: https://github.com/jshttp/accepts
|
||||
// Definitions by: Stefan Reichel <https://github.com/bomret>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
/// <reference types="angular" />
|
||||
|
||||
var myApp = angular.module('testModule');
|
||||
|
||||
|
||||
Vendored
+4
-6
@@ -3,23 +3,21 @@
|
||||
// Definitions by: Marcin Biegała <https://github.com/Biegal>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="angular" />
|
||||
|
||||
/**
|
||||
* SpinnerService
|
||||
* SpinnerService
|
||||
* see https://github.com/urish/angular-spinner
|
||||
*/
|
||||
interface ISpinnerService {
|
||||
declare interface ISpinnerService {
|
||||
/**
|
||||
* Start selected spinner
|
||||
*
|
||||
*
|
||||
* @param spinner key
|
||||
*/
|
||||
spin(key: string): void;
|
||||
|
||||
/**
|
||||
* Stop selected spinner
|
||||
*
|
||||
*
|
||||
* @param spinner key
|
||||
*/
|
||||
stop(key: string): void;
|
||||
|
||||
@@ -10,6 +10,10 @@ namespace Analytics {
|
||||
$analyticsProvider.withAutoBase(true);
|
||||
$analyticsProvider.developerMode(true);
|
||||
|
||||
$analyticsProvider.trackExceptions(true);
|
||||
$analyticsProvider.trackRoutes(true);
|
||||
$analyticsProvider.trackStates(true);
|
||||
|
||||
$analyticsProvider.registerEventTrack((action: string, properties?: any) => {
|
||||
console.log(action);
|
||||
});
|
||||
@@ -19,5 +23,16 @@ namespace Analytics {
|
||||
});
|
||||
|
||||
$analyticsProvider.settings.pageTracking.basePath = "/my/base/path";
|
||||
}]);
|
||||
}])
|
||||
.run(($analytics: angulartics.IAnalyticsService) => {
|
||||
let isOptedOut = $analytics.getOptOut();
|
||||
|
||||
$analytics.eventTrack('eventName', { label: 'test' });
|
||||
$analytics.pageTrack('/');
|
||||
$analytics.setAlias('alias');
|
||||
$analytics.setOptOut(false);
|
||||
$analytics.setUsername('username');
|
||||
$analytics.setUserProperties({ id: 1 });
|
||||
$analytics.setSuperProperties({ role: 'admin' });
|
||||
});
|
||||
}
|
||||
|
||||
Vendored
+10
-5
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Angulartics v0.20.2
|
||||
// Type definitions for Angulartics v1.3.0
|
||||
// Project: http://luisfarzati.github.io/angulartics/
|
||||
// Definitions by: Steven Fan <https://github.com/stevenfan>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -12,8 +12,10 @@ declare namespace angulartics {
|
||||
|
||||
interface IAnalyticsService {
|
||||
eventTrack(eventName: string, properties?: any): any;
|
||||
getOptOut(): boolean;
|
||||
pageTrack(path:string, location?:angular.ILocationService): any;
|
||||
setAlias(alias: string): any;
|
||||
setOptOut(value: boolean): void;
|
||||
setUsername(username: string): any;
|
||||
setUserProperties(properties: any): any;
|
||||
setSuperProperties(properties: any): any;
|
||||
@@ -26,13 +28,16 @@ declare namespace angulartics {
|
||||
withBase(value: boolean): void;
|
||||
withAutoBase(value: boolean): void;
|
||||
developerMode(value: boolean): void;
|
||||
trackExceptions(value: boolean): void;
|
||||
trackRoutes(value: boolean): void;
|
||||
trackStates(value: boolean): void;
|
||||
|
||||
registerPageTrack(callback:(path:string, location?:angular.ILocationService) => any): void;
|
||||
registerEventTrack(callback: (eventName: string, properties?: any) => any): void;
|
||||
registerSetAlias(callback: (alias: string) => any): void
|
||||
registerSetUsername(callback: (username: string) => any): void
|
||||
registerSetUserProperties(callback: (userProperties: any) => any): void
|
||||
registerSetSuperProperties(callback: (superProperties: any) => any): void
|
||||
registerSetAlias(callback: (alias: string) => any): void;
|
||||
registerSetUsername(callback: (username: string) => any): void;
|
||||
registerSetUserProperties(callback: (userProperties: any) => any): void;
|
||||
registerSetSuperProperties(callback: (superProperties: any) => any): void;
|
||||
|
||||
settings: {
|
||||
pageTracking: {
|
||||
|
||||
Vendored
+2
-1
@@ -22,7 +22,7 @@ interface Auth0Static {
|
||||
logout(query: string): void;
|
||||
getConnections(callback?: Function): void;
|
||||
refreshToken(refreshToken: string, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void;
|
||||
getDelegationToken(targetClientId: string, id_token: string, options: any, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void;
|
||||
getDelegationToken(options: any, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void;
|
||||
getProfile(id_token: string, callback?: Function): Auth0UserProfile;
|
||||
getSSOData(withActiveDirectories: any, callback?: Function): void;
|
||||
parseHash(hash: string): Auth0DecodedHash;
|
||||
@@ -96,6 +96,7 @@ interface Auth0PopupOptions {
|
||||
|
||||
interface Auth0LoginOptions {
|
||||
auto_login?: boolean;
|
||||
responseType?: string;
|
||||
connection?: string;
|
||||
email?: string;
|
||||
username?: string;
|
||||
|
||||
Vendored
+26
-4
@@ -5,9 +5,12 @@
|
||||
|
||||
/// <reference types="jquery"/>
|
||||
|
||||
interface TimeickerOptions {
|
||||
defaultTime?: string;
|
||||
interface TimepickerOptions {
|
||||
defaultTime?: string|boolean;
|
||||
disableFocus?: boolean;
|
||||
disableMousewheel?: boolean;
|
||||
explicitMode?: boolean;
|
||||
icons?: TimepickerIconOptions;
|
||||
isOpen?: boolean;
|
||||
minuteStep?: number;
|
||||
modalBackdrop?: boolean;
|
||||
@@ -15,13 +18,32 @@ interface TimeickerOptions {
|
||||
showSeconds?: boolean;
|
||||
showInputs?: boolean;
|
||||
showMeridian?: boolean;
|
||||
template?: string;
|
||||
template?: string|boolean;
|
||||
appendWidgetTo?: string;
|
||||
maxHours?: number;
|
||||
snapToStep?: boolean;
|
||||
}
|
||||
|
||||
interface TimepickerIconOptions {
|
||||
up?: string;
|
||||
down?: string;
|
||||
}
|
||||
|
||||
interface TimepickerTime {
|
||||
value?: string;
|
||||
hours?: number;
|
||||
minutes?: number;
|
||||
seconds?: number;
|
||||
meridian?: string;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
timepicker(): JQuery;
|
||||
timepicker(methodName: string): JQuery;
|
||||
timepicker(methodName: string, params: any): JQuery;
|
||||
timepicker(options: TimeickerOptions): JQuery;
|
||||
timepicker(options: TimepickerOptions): JQuery;
|
||||
}
|
||||
|
||||
interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject {
|
||||
time?: TimepickerTime;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -293,7 +293,7 @@ declare module ej {
|
||||
changeSetContent?: string;
|
||||
batchChangeSetContentType?: string;
|
||||
}
|
||||
|
||||
|
||||
class WebApiAdaptor extends ej.ODataAdaptor {
|
||||
constructor();
|
||||
insert(dm: ej.DataManager, data: Object, tableName?: string): { url: string; type: string; data: Object; }
|
||||
|
||||
Vendored
+5
-5
@@ -2350,7 +2350,7 @@ declare module elasticjs {
|
||||
Sets the distance unit. Valid values are:
|
||||
in, yd, ft, km, NM, mm, cm, mi, and m.
|
||||
*/
|
||||
unit(unit: Number): GeoDistanceAggregation;
|
||||
unit(unit: string): GeoDistanceAggregation;
|
||||
|
||||
}
|
||||
|
||||
@@ -2485,7 +2485,7 @@ declare module elasticjs {
|
||||
Sets the distance unit. Valid values are "mi" for miles or "km"
|
||||
for kilometers. Defaults to "km".
|
||||
*/
|
||||
unit(unit: Number): GeoDistanceFacet;
|
||||
unit(unit: string): GeoDistanceFacet;
|
||||
|
||||
/*
|
||||
Allows you to specify a different value field to aggrerate over.
|
||||
@@ -2582,7 +2582,7 @@ declare module elasticjs {
|
||||
Sets the distance unit. Valid values are "mi" for miles or "km"
|
||||
for kilometers. Defaults to "km".
|
||||
*/
|
||||
unit(unit: Number): GeoDistanceFilter;
|
||||
unit(unit: string): GeoDistanceFilter;
|
||||
|
||||
}
|
||||
|
||||
@@ -2706,7 +2706,7 @@ declare module elasticjs {
|
||||
Sets the distance unit. Valid values are "mi" for miles or "km"
|
||||
for kilometers. Defaults to "km".
|
||||
*/
|
||||
unit(unit: Number): GeoDistanceRangeFilter;
|
||||
unit(unit: string): GeoDistanceRangeFilter;
|
||||
|
||||
}
|
||||
|
||||
@@ -7413,7 +7413,7 @@ declare module elasticjs {
|
||||
|
||||
Valid during sort types: geo distance
|
||||
*/
|
||||
unit(unit: Number): Sort;
|
||||
unit(unit: string): Sort;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
@@ -103,6 +103,8 @@ declare namespace gapi.auth2 {
|
||||
export interface BasicProfile {
|
||||
getId(): string;
|
||||
getName(): string;
|
||||
getGivenName(): string;
|
||||
getFamilyName(): string;
|
||||
getImageUrl(): string;
|
||||
getEmail(): string;
|
||||
}
|
||||
|
||||
Vendored
+3
-2
@@ -44,7 +44,7 @@ declare type TweenConfig = {
|
||||
autoCSS?: boolean;
|
||||
callbackScope?: Object;
|
||||
}
|
||||
|
||||
|
||||
//com.greensock.core
|
||||
declare class Animation {
|
||||
static ticker: IDispatcher;
|
||||
@@ -185,8 +185,9 @@ declare class TimelineMax extends TimelineLite {
|
||||
getActive(nested?: boolean, tweens?: boolean, timelines?: boolean): Tween | Timeline[];
|
||||
getLabelAfter(time: number): string;
|
||||
getLabelBefore(time: number): string;
|
||||
getLabelsArray(): any[];
|
||||
getLabelsArray(): {name: string; time: number;}[];
|
||||
removeCallback(callback: Function, timeOrLabel?: any): TimelineMax;
|
||||
removePause(position: any): TimelineMax;
|
||||
repeat(): number;
|
||||
repeat(value: number): TimelineMax;
|
||||
repeatDelay(): number;
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for halogen
|
||||
// Type definitions for halogen 0.2
|
||||
// Project: https://github.com/yuanyan/halogen
|
||||
// Definitions by: Vincent Rouffiat <https://github.com/steller>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
Vendored
+45
-45
@@ -32,9 +32,9 @@ export interface AccelerometerMMA7361Option extends AccelerometerGeneralOption {
|
||||
|
||||
export declare class Accelerometer {
|
||||
constructor(option: AccelerometerGeneralOption | AccelerometerAnalogOption | AccelerometerMPU6050Option | AccelerometerMMA7361Option);
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "change", cb: () => void): void;
|
||||
on(event: "data", cb: (freq: any) => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "change", cb: () => void): this;
|
||||
on(event: "data", cb: (freq: any) => void): this;
|
||||
hasAxis(name: string): void;
|
||||
enable(): void;
|
||||
disable(): void;
|
||||
@@ -71,12 +71,12 @@ export interface ButtonOptions {
|
||||
|
||||
export declare class Button {
|
||||
constructor(pin: number | string | ButtonOptions);
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "hold", cb: (holdTime: number) => void): void;
|
||||
on(event: "down", cb: () => void): void;
|
||||
on(event: "press", cb: () => void): void;
|
||||
on(event: "up", cb: () => void): void;
|
||||
on(event: "release", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "hold", cb: (holdTime: number) => void): this;
|
||||
on(event: "down", cb: () => void): this;
|
||||
on(event: "press", cb: () => void): this;
|
||||
on(event: "up", cb: () => void): this;
|
||||
on(event: "release", cb: () => void): this;
|
||||
}
|
||||
|
||||
export interface BoardOptions {
|
||||
@@ -91,9 +91,9 @@ export interface Repl {
|
||||
|
||||
export declare class Board {
|
||||
constructor(option?: BoardOptions);
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "ready", cb: () => void): void;
|
||||
on(event: "connect", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "ready", cb: () => void): this;
|
||||
on(event: "connect", cb: () => void): this;
|
||||
pinMode(pin: number, mode: number): void;
|
||||
analogWrite(pin: number, value: number): void;
|
||||
analogRead(pin: number, cb: (item: number) => void): void;
|
||||
@@ -170,9 +170,9 @@ export interface IMUMPU6050Option extends IMUGeneralOption {
|
||||
|
||||
export declare class IMU {
|
||||
constructor(option: IMUGeneralOption | IMUMPU6050Option);
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "change", cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "change", cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
}
|
||||
|
||||
export declare module IR {
|
||||
@@ -182,11 +182,11 @@ export declare module IR {
|
||||
|
||||
export class Motion {
|
||||
constructor(option: number | MotionOption);
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: "motionstart", cb: () => void): void;
|
||||
on(event: "motionend", cb: () => void): void;
|
||||
on(event: "calibrated", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
on(event: "motionstart", cb: () => void): this;
|
||||
on(event: "motionend", cb: () => void): this;
|
||||
on(event: "calibrated", cb: () => void): this;
|
||||
}
|
||||
|
||||
export interface PloximityOption {
|
||||
@@ -196,9 +196,9 @@ export declare module IR {
|
||||
|
||||
export class Proximity {
|
||||
constructor(option: number | PloximityOption);
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: "change", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
on(event: "change", cb: () => void): this;
|
||||
}
|
||||
|
||||
export interface ArrayOption {
|
||||
@@ -220,10 +220,10 @@ export declare module IR {
|
||||
calibrate(): void;
|
||||
calibrateUntil(predicate: () => void): void;
|
||||
loadCalibration(option: LoadCalibrationOption): void;
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: "calibratedData", cb: (data: any) => void): void;
|
||||
on(event: "line", cb: (data: any) => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
on(event: "calibratedData", cb: (data: any) => void): this;
|
||||
on(event: "line", cb: (data: any) => void): this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,10 +234,10 @@ export interface JoystickOption {
|
||||
|
||||
export declare class Joystick {
|
||||
constructor(option: JoystickOption);
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: "change", cb: () => void): void;
|
||||
on(event: "axismove", cb: (error: Error, date: Date) => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
on(event: "change", cb: () => void): this;
|
||||
on(event: "axismove", cb: (error: Error, date: Date) => void): this;
|
||||
|
||||
axis: Array<number>;
|
||||
raw: Array<number>;
|
||||
@@ -468,9 +468,9 @@ export declare class Sensor {
|
||||
scale(): Sensor;
|
||||
booleanAt(barrier: number): boolean;
|
||||
within(range: Array<number>, cb: () => void): void;
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: "change", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
on(event: "change", cb: () => void): this;
|
||||
}
|
||||
|
||||
export interface ServoGeneralOption {
|
||||
@@ -505,8 +505,8 @@ export declare class Servo {
|
||||
stop(): void;
|
||||
cw(speed: number): void;
|
||||
ccw(speed: number): void;
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "move:complete", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "move:complete", cb: () => void): this;
|
||||
}
|
||||
|
||||
export interface ShiftRegisterOption {
|
||||
@@ -529,9 +529,9 @@ export declare class Sonar {
|
||||
constructor(option: number | string | SonarOption);
|
||||
within(range: Array<number>, cb: () => void): void;
|
||||
within(range: Array<number>, unit: string, cb: () => void): void;
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: "change", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
on(event: "change", cb: () => void): this;
|
||||
}
|
||||
|
||||
export interface StepperOption {
|
||||
@@ -568,9 +568,9 @@ export declare class Stepper {
|
||||
|
||||
within(range: Array<number>, cb: () => void): void;
|
||||
within(range: Array<number>, unit: string, cb: () => void): void;
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: "change", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
on(event: "change", cb: () => void): this;
|
||||
}
|
||||
|
||||
export interface TemperatureOption {
|
||||
@@ -582,7 +582,7 @@ export interface TemperatureOption {
|
||||
|
||||
export declare class Temperature {
|
||||
constructor(option: TemperatureOption);
|
||||
on(event: string, cb: () => void): void;
|
||||
on(event: "data", cb: (data: any) => void): void;
|
||||
on(event: "change", cb: () => void): void;
|
||||
on(event: string, cb: () => void): this;
|
||||
on(event: "data", cb: (data: any) => void): this;
|
||||
on(event: "change", cb: () => void): this;
|
||||
}
|
||||
|
||||
@@ -250,4 +250,6 @@ board.on('ready', function(){
|
||||
return (raw / 100) + 10;
|
||||
}
|
||||
});
|
||||
}).on("ready", function(){
|
||||
console.log("Everything is ready!!!");
|
||||
});
|
||||
|
||||
Vendored
+5
-4
@@ -1,10 +1,11 @@
|
||||
// Type definitions for jQuery Steps v1.1.0
|
||||
// Type definitions for jQuery Steps v1.1.1
|
||||
// Project: http://www.jquery-steps.com/
|
||||
// Definitions by: Joseph Blank <https://github.com/jblank/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Updated by: Nicholas Wong <https://github.com/nickwph>
|
||||
|
||||
interface JQuery {
|
||||
JQuerySteps(param?: JQuerySteps.Settings): JQuerySteps.JQuerySteps;
|
||||
steps(param?: JQuerySteps.Settings): JQuerySteps.JQuerySteps;
|
||||
}
|
||||
|
||||
declare module JQuerySteps {
|
||||
@@ -194,7 +195,7 @@ declare module JQuerySteps {
|
||||
|
||||
/**
|
||||
* The animation effect which will be used for step transitions. Default value is none or 0.
|
||||
* This can be none (0), fade (1), slide (2) or slideLeft (3).
|
||||
* This can be none (0), fade (1), slide (2) or slideLeft (3).
|
||||
*/
|
||||
transitionEffect?: string|number;
|
||||
|
||||
@@ -343,7 +344,7 @@ declare module JQuerySteps {
|
||||
|
||||
/**
|
||||
* Indicates how the content will be loaded.
|
||||
* This can be html (0), iframe (1), or async (2).
|
||||
* This can be html (0), iframe (1), or async (2).
|
||||
*/
|
||||
contentMode?: string|number;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ var settings: JQuerySteps.Settings = {
|
||||
onStepChanging: onStepChangingFunc
|
||||
}
|
||||
|
||||
var wizard = $('.wizard').JQuerySteps(settings);
|
||||
var wizard = $('.wizard').steps(settings);
|
||||
|
||||
var newStep1: JQuerySteps.Step = {
|
||||
content: '<div>Content</div>',
|
||||
|
||||
Vendored
+2
-2
@@ -128,9 +128,9 @@ declare namespace JQueryValidation
|
||||
*/
|
||||
showErrors?: (errorMap: ErrorDictionary, errorList: ErrorListItem[]) => void;
|
||||
/**
|
||||
* Callback for handling the actual submit when the form is valid. Gets the form as the only argument. Replaces the default submit. The right place to submit a form via Ajax after it is validated.
|
||||
* Callback for handling the actual submit when the form is valid. Gets the form and the event object. Replaces the default submit. The right place to submit a form via Ajax after it is validated.
|
||||
*/
|
||||
submitHandler?: (form: HTMLFormElement) => void;
|
||||
submitHandler?: (form: HTMLFormElement, event?: JQueryEventObject) => void;
|
||||
/**
|
||||
* String or Function. If specified, the error label is displayed to show a valid element. If a String is given, it is added as a class to the label. If a Function is given, it is called with the label (as a jQuery object) and the validated input (as a DOM element). The label can be used to add a text like "ok!".
|
||||
*/
|
||||
|
||||
Vendored
+4
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Kendo UI Professional v2016.3.1028
|
||||
// Type definitions for Kendo UI Professional v2016.3.1029
|
||||
// Project: http://www.telerik.com/kendo-ui
|
||||
// Definitions by: Telerik <https://github.com/telerik/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -7331,7 +7331,7 @@ declare namespace kendo.ui {
|
||||
|
||||
clearAllFiles(): void;
|
||||
clearFile(): void;
|
||||
clearFileByUid(): void;
|
||||
clearFileByUid(uid: string): void;
|
||||
destroy(): void;
|
||||
disable(): void;
|
||||
enable(enable?: boolean): void;
|
||||
@@ -7359,6 +7359,7 @@ declare namespace kendo.ui {
|
||||
extension?: string;
|
||||
name?: string;
|
||||
size?: number;
|
||||
uid?: string;
|
||||
}
|
||||
|
||||
interface UploadLocalization {
|
||||
@@ -18292,6 +18293,7 @@ declare namespace kendo.ooxml {
|
||||
cells?: WorkbookSheetRowCell[];
|
||||
index?: number;
|
||||
height?: number;
|
||||
type?: "header" | "footer" | "groupHeader" | "groupFooter" | "data";
|
||||
}
|
||||
|
||||
interface WorkbookSheet {
|
||||
|
||||
@@ -35,6 +35,7 @@ declare var cordovaSQLiteDriver: LocalForageDriver;
|
||||
var newError: any = err;
|
||||
var newStr: string = str
|
||||
});
|
||||
|
||||
cordovaSQLiteDriver.setItem("key", "value", (err: any, str: string) => {
|
||||
var newError: any = err;
|
||||
var newStr: string = str
|
||||
@@ -43,6 +44,7 @@ declare var cordovaSQLiteDriver: LocalForageDriver;
|
||||
cordovaSQLiteDriver.setItem("key", "value", (str: string) => {
|
||||
var newStr: string = str;
|
||||
});
|
||||
|
||||
cordovaSQLiteDriver.removeItem("key",(err: any) => {
|
||||
var newError: any = err;
|
||||
});
|
||||
|
||||
Vendored
+16
-13
@@ -41,7 +41,7 @@ interface LocalForageDbMethods {
|
||||
|
||||
iterate(iteratee: (value: any, key: string, iterationNumber: number) => any): Promise<any>;
|
||||
iterate(iteratee: (value: any, key: string, iterationNumber: number) => any,
|
||||
callback: (err: any, result: any) => void): void;
|
||||
callback: (err: any, result: any) => void): void;
|
||||
}
|
||||
|
||||
interface LocalForageDriverSupportFunc {
|
||||
@@ -53,11 +53,11 @@ interface LocalForageDriver extends LocalForageDbMethods {
|
||||
|
||||
_initStorage(options: LocalForageOptions): void;
|
||||
|
||||
_support: boolean | LocalForageDriverSupportFunc;
|
||||
_support?: boolean | LocalForageDriverSupportFunc;
|
||||
}
|
||||
|
||||
interface LocalForageSerializer {
|
||||
serialize<T>(value: T | ArrayBuffer | Blob, callback: (value: string, error: any) => {}): void;
|
||||
serialize<T>(value: T | ArrayBuffer | Blob, callback: (value: string, error: any) => void): void;
|
||||
|
||||
deserialize<T>(value: string): T | ArrayBuffer | Blob;
|
||||
|
||||
@@ -72,10 +72,10 @@ interface LocalForage extends LocalForageDbMethods {
|
||||
INDEXEDDB: string;
|
||||
|
||||
/**
|
||||
* Set and persist localForage options. This must be called before any other calls to localForage are made, but can be called after localForage is loaded.
|
||||
* If you set any config values with this method they will persist after driver changes, so you can call config() then setDriver()
|
||||
* @param {ILocalForageConfig} options?
|
||||
*/
|
||||
* Set and persist localForage options. This must be called before any other calls to localForage are made, but can be called after localForage is loaded.
|
||||
* If you set any config values with this method they will persist after driver changes, so you can call config() then setDriver()
|
||||
* @param {LocalForageOptions} options?
|
||||
*/
|
||||
config(options: LocalForageOptions): boolean;
|
||||
|
||||
/**
|
||||
@@ -87,23 +87,26 @@ interface LocalForage extends LocalForageDbMethods {
|
||||
|
||||
driver(): string;
|
||||
/**
|
||||
* Force usage of a particular driver or drivers, if available.
|
||||
* @param {string} driver
|
||||
*/
|
||||
* Force usage of a particular driver or drivers, if available.
|
||||
* @param {string} driver
|
||||
*/
|
||||
setDriver(driver: string | string[]): Promise<void>;
|
||||
setDriver(driver: string | string[], callback: () => void, errorCallback: (error: any) => void): void;
|
||||
defineDriver(driver: LocalForageDriver): Promise<void>;
|
||||
defineDriver(driver: LocalForageDriver, callback: () => void, errorCallback: (error: any) => void): void;
|
||||
/**
|
||||
* Return a particular driver
|
||||
* @param {string} driver
|
||||
*/
|
||||
* Return a particular driver
|
||||
* @param {string} driver
|
||||
*/
|
||||
getDriver(driver: string): Promise<LocalForageDriver>;
|
||||
|
||||
getSerializer(): Promise<LocalForageSerializer>;
|
||||
getSerializer(callback: (serializer: LocalForageSerializer) => void): void;
|
||||
|
||||
supports(driverName: string): boolean;
|
||||
|
||||
ready(callback: () => void): void;
|
||||
ready(): Promise<void>;
|
||||
}
|
||||
|
||||
declare module "localforage" {
|
||||
|
||||
@@ -105,4 +105,13 @@ namespace LocalForageTest {
|
||||
testSerializer = serializer;
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
let store: LocalForage;
|
||||
|
||||
store.ready()
|
||||
.then(() => {});
|
||||
|
||||
store.ready(() => {});
|
||||
}
|
||||
}
|
||||
Vendored
+3
-1
@@ -158,12 +158,14 @@ declare namespace lf {
|
||||
getNormalizedName(): string
|
||||
}
|
||||
|
||||
export interface Table {
|
||||
interface ITable {
|
||||
as(name: string): Table
|
||||
createRow(value: Object): Row
|
||||
getName(): string
|
||||
}
|
||||
|
||||
export type Table = ITable & { [index: string]: Column }
|
||||
|
||||
export interface ConnectOptions {
|
||||
onUpgrade?: (rawDb: raw.BackStore) => Promise<void>
|
||||
storeType?: DataStoreType
|
||||
|
||||
@@ -27,11 +27,10 @@ function main(): void {
|
||||
'deadline': new Date(),
|
||||
'done': false
|
||||
});
|
||||
|
||||
return db.insertOrReplace().into(itemSchema).values([row]).exec();
|
||||
}).then(
|
||||
function() {
|
||||
var column: lf.schema.Column = (<any>itemSchema).done;
|
||||
var column = itemSchema['done'];
|
||||
return todoDb.select().from(itemSchema).where(column.eq(false)).exec();
|
||||
}).then(
|
||||
function(results) {
|
||||
|
||||
Vendored
+9
-1
@@ -235,6 +235,12 @@ declare namespace Materialize {
|
||||
* Default: false
|
||||
*/
|
||||
closeOnClick?: boolean;
|
||||
|
||||
/**
|
||||
* Choose whether you can drag to open on touch screens
|
||||
* Default: true
|
||||
*/
|
||||
draggable?: boolean;
|
||||
}
|
||||
|
||||
interface ScrollFireOptions {
|
||||
@@ -414,8 +420,10 @@ interface JQuery {
|
||||
|
||||
/**
|
||||
* Close a modal programatically
|
||||
*
|
||||
* @name options the lean modal options
|
||||
*/
|
||||
closeModal(): void;
|
||||
closeModal(options?: Materialize.LeanModalOptions): void;
|
||||
|
||||
/**
|
||||
* Parallax is an effect where the background content or image in this case, is moved at a different speed than the foreground content while scrolling.
|
||||
|
||||
@@ -214,6 +214,7 @@ $(sideNavHtml).sideNav({});
|
||||
$(sideNavHtml).sideNav({ menuWidth: 100 });
|
||||
$(sideNavHtml).sideNav({ menuWidth: 100, edge: 'right' });
|
||||
$(sideNavHtml).sideNav({ menuWidth: 100, edge: 'right', closeOnClick: true });
|
||||
$(sideNavHtml).sideNav({ menuWidth: 100, edge: 'right', closeOnClick: true, draggable: false });
|
||||
$(sideNavHtml).sideNav("show");
|
||||
$(sideNavHtml).sideNav("hide");
|
||||
|
||||
|
||||
+3
-3
@@ -205,10 +205,10 @@ interface IUser extends mongoose.Document {
|
||||
...
|
||||
user.id = new mongoose.Types.ObjectId();
|
||||
```
|
||||
You are assigning a `mongoose.Types.ObjectId`, which is a different and incompatible type from `mongoose.Schema.Types.ObjectId`.
|
||||
To use it, you will need to `/// <reference path="promise-bluebird.d.ts" />` in one of your source code files,
|
||||
|
||||
For proper type-checking, do this:
|
||||
```typescript
|
||||
|
||||
To assign the new promise library in your code, you will need to use one of the following options (since
|
||||
interface IUser extends mongoose.Document {
|
||||
id: mongoose.Types.ObjectId; // for type-checking, doesn't affect code behaviour
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -279,6 +279,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
isTTY?: boolean;
|
||||
read(size?: number): string | Buffer;
|
||||
setEncoding(encoding: string | null): void;
|
||||
pause(): ReadableStream;
|
||||
@@ -292,6 +293,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
isTTY?: boolean;
|
||||
write(buffer: Buffer | string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, cb?: Function): boolean;
|
||||
end(): void;
|
||||
|
||||
Vendored
+2
@@ -99,6 +99,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
isTTY?: boolean;
|
||||
read(size?: number): any;
|
||||
setEncoding(encoding: string): void;
|
||||
pause(): void;
|
||||
@@ -112,6 +113,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
isTTY?: boolean;
|
||||
write(buffer: Buffer, cb?: Function): boolean;
|
||||
write(str: string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, cb?: Function): boolean;
|
||||
|
||||
Vendored
+2
@@ -99,6 +99,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
isTTY?: boolean;
|
||||
read(size?: number): any;
|
||||
setEncoding(encoding: string): void;
|
||||
pause(): void;
|
||||
@@ -112,6 +113,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
isTTY?: boolean;
|
||||
write(buffer: Buffer, cb?: Function): boolean;
|
||||
write(str: string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, cb?: Function): boolean;
|
||||
|
||||
Vendored
+2
@@ -180,6 +180,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
isTTY?: boolean;
|
||||
read(size?: number): string|Buffer;
|
||||
setEncoding(encoding: string): void;
|
||||
pause(): void;
|
||||
@@ -193,6 +194,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
isTTY?: boolean;
|
||||
write(buffer: Buffer|string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, cb?: Function): boolean;
|
||||
end(): void;
|
||||
|
||||
Vendored
+2
@@ -89,6 +89,7 @@ interface EventEmitter {
|
||||
|
||||
interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
isTTY?: boolean;
|
||||
write(str: string, encoding?: string, fd?: string): boolean;
|
||||
write(buffer: Buffer): boolean;
|
||||
end(): void;
|
||||
@@ -100,6 +101,7 @@ interface WritableStream extends EventEmitter {
|
||||
|
||||
interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
isTTY?: boolean;
|
||||
setEncoding(encoding: string): void;
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
|
||||
Vendored
+2
@@ -232,6 +232,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
isTTY?: boolean;
|
||||
read(size?: number): string|Buffer;
|
||||
setEncoding(encoding: string): void;
|
||||
pause(): void;
|
||||
@@ -245,6 +246,7 @@ declare namespace NodeJS {
|
||||
|
||||
export interface WritableStream extends EventEmitter {
|
||||
writable: boolean;
|
||||
isTTY?: boolean;
|
||||
write(buffer: Buffer|string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, cb?: Function): boolean;
|
||||
end(): void;
|
||||
|
||||
Vendored
+1562
-749
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for parseurl
|
||||
// Type definitions for parseurl 1.3
|
||||
// Project: https://github.com/pillarjs/parseurl
|
||||
// Definitions by: Stefan Reichel <https://github.com/bomret>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
Vendored
+2
-2
@@ -4,8 +4,8 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module "query-string" {
|
||||
type value = string | boolean | number;
|
||||
|
||||
|
||||
interface StringifyOptions { strict?: boolean; encode?: boolean; }
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ declare module "query-string" {
|
||||
*
|
||||
* @param obj
|
||||
*/
|
||||
export function stringify(obj: { [key: string]: value | value[] }, options?: StringifyOptions): string;
|
||||
export function stringify(obj: any, options?: StringifyOptions): string;
|
||||
|
||||
/**
|
||||
* Extract a query string from a URL that can be passed into .parse().
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for raw-body
|
||||
// Type definitions for raw-body 2.1
|
||||
// Project: https://github.com/stream-utils/raw-body
|
||||
// Definitions by: Stefan Reichel <https://github.com/bomret>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
Vendored
+1
@@ -441,6 +441,7 @@ declare namespace AdazzleReactDataGridPlugins {
|
||||
}
|
||||
export namespace Formatters {
|
||||
export class ImageFormatter extends React.Component<any, {}> { }
|
||||
export class DropDownFormatter extends React.Component<any, {}> { }
|
||||
}
|
||||
export class Toolbar extends React.Component<any, any> {}
|
||||
// TODO: re-export the react-contextmenu typings once those exist
|
||||
|
||||
Vendored
+3
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-jsonschema-form 0.30.1
|
||||
// Type definitions for react-jsonschema-form 0.38.1
|
||||
// Project: https://github.com/mozilla-services/react-jsonschema-form
|
||||
// Definitions by: Dan Fox <https://github.com/iamdanfox>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -12,6 +12,8 @@ declare module "react-jsonschema-form" {
|
||||
formData?: any;
|
||||
widgets?: {};
|
||||
fields?: {};
|
||||
noValidate?: boolean;
|
||||
showErrorList?: boolean;
|
||||
validate?: (formData: any, errors: any) => any;
|
||||
onChange?: (e: IChangeEvent) => any;
|
||||
onError?: (e: any) => any;
|
||||
|
||||
@@ -73,6 +73,8 @@ export class Example extends React.Component<any, IExampleState> {
|
||||
<div className="react-jsonschema-form-example">
|
||||
{ <Form schema={schema}
|
||||
uiSchema={uiSchema}
|
||||
showErrorList={false}
|
||||
noValidate={false}
|
||||
formData={this.state}
|
||||
onChange={(formData) => this.setState({formData})} /> }
|
||||
</div>
|
||||
|
||||
Vendored
+7
-6
@@ -183,7 +183,7 @@ declare namespace React {
|
||||
};
|
||||
}
|
||||
|
||||
class PureComponent<P, S> extends Component<P, S> {}
|
||||
class PureComponent<P, S> extends Component<P, S> { }
|
||||
|
||||
interface ClassicComponent<P, S> extends Component<P, S> {
|
||||
replaceState(nextState: S, callback?: () => any): void;
|
||||
@@ -209,7 +209,7 @@ declare namespace React {
|
||||
}
|
||||
|
||||
interface ComponentClass<P> {
|
||||
new(props?: P, context?: any): Component<P, ComponentState>;
|
||||
new (props?: P, context?: any): Component<P, ComponentState>;
|
||||
propTypes?: ValidationMap<P>;
|
||||
contextTypes?: ValidationMap<any>;
|
||||
childContextTypes?: ValidationMap<any>;
|
||||
@@ -218,7 +218,7 @@ declare namespace React {
|
||||
}
|
||||
|
||||
interface ClassicComponentClass<P> extends ComponentClass<P> {
|
||||
new(props?: P, context?: any): ClassicComponent<P, ComponentState>;
|
||||
new (props?: P, context?: any): ClassicComponent<P, ComponentState>;
|
||||
getDefaultProps?(): P;
|
||||
}
|
||||
|
||||
@@ -229,8 +229,8 @@ declare namespace React {
|
||||
*/
|
||||
type ClassType<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>> =
|
||||
C &
|
||||
(new() => T) &
|
||||
(new() => { props: P });
|
||||
(new () => T) &
|
||||
(new () => { props: P });
|
||||
|
||||
//
|
||||
// Component Specs and Lifecycle
|
||||
@@ -2436,7 +2436,7 @@ declare global {
|
||||
namespace JSX {
|
||||
interface Element extends React.ReactElement<any> { }
|
||||
interface ElementClass extends React.Component<any, any> {
|
||||
render(): JSX.Element|null;
|
||||
render(): JSX.Element | null;
|
||||
}
|
||||
interface ElementAttributesProperty { props: {}; }
|
||||
|
||||
@@ -2514,6 +2514,7 @@ declare global {
|
||||
meta: React.HTMLProps<HTMLMetaElement>;
|
||||
meter: React.HTMLProps<HTMLElement>;
|
||||
nav: React.HTMLProps<HTMLElement>;
|
||||
noindex: React.HTMLProps<HTMLElement>;
|
||||
noscript: React.HTMLProps<HTMLElement>;
|
||||
object: React.HTMLProps<HTMLObjectElement>;
|
||||
ol: React.HTMLProps<HTMLOListElement>;
|
||||
|
||||
+23
-23
@@ -130,7 +130,7 @@ class ModernComponent extends React.Component<Props, State>
|
||||
}
|
||||
}
|
||||
|
||||
class ModernComponentNoState extends React.Component<Props, void> {}
|
||||
class ModernComponentNoState extends React.Component<Props, void> { }
|
||||
|
||||
interface SCProps {
|
||||
foo?: number;
|
||||
@@ -334,9 +334,9 @@ React.DOM.span(htmlAttr);
|
||||
React.DOM.input(htmlAttr);
|
||||
|
||||
React.DOM.svg({
|
||||
viewBox: "0 0 48 48",
|
||||
xmlns: "http://www.w3.org/2000/svg"
|
||||
},
|
||||
viewBox: "0 0 48 48",
|
||||
xmlns: "http://www.w3.org/2000/svg"
|
||||
},
|
||||
React.DOM.rect({
|
||||
x: 22,
|
||||
y: 10,
|
||||
@@ -386,7 +386,7 @@ var PropTypesSpecification: React.ComponentSpec<any, any> = {
|
||||
}),
|
||||
requiredFunc: React.PropTypes.func.isRequired,
|
||||
requiredAny: React.PropTypes.any.isRequired,
|
||||
customProp: function(props: any, propName: string, componentName: string): Error | null {
|
||||
customProp: function (props: any, propName: string, componentName: string): Error | null {
|
||||
if (!/matchme/.test(props[propName])) {
|
||||
return new Error("Validation failed!");
|
||||
}
|
||||
@@ -438,7 +438,7 @@ var ContextTypesSpecification: React.ComponentSpec<any, any> = {
|
||||
}),
|
||||
requiredFunc: React.PropTypes.func.isRequired,
|
||||
requiredAny: React.PropTypes.any.isRequired,
|
||||
customProp: function(props: any, propName: string, componentName: string): Error | null {
|
||||
customProp: function (props: any, propName: string, componentName: string): Error | null {
|
||||
if (!/matchme/.test(props[propName])) {
|
||||
return new Error("Validation failed!");
|
||||
}
|
||||
@@ -456,7 +456,7 @@ var ContextTypesSpecification: React.ComponentSpec<any, any> = {
|
||||
|
||||
var mappedChildrenArray: number[] =
|
||||
React.Children.map<number>(children, (child) => { return 42; });
|
||||
React.Children.forEach(children, (child) => {});
|
||||
React.Children.forEach(children, (child) => { });
|
||||
var nChildren: number = React.Children.count(children);
|
||||
var onlyChild: React.ReactElement<any> = React.Children.only(React.DOM.div()); // ok
|
||||
onlyChild = React.Children.only([null, [[["Hallo"], true]], false]); // error
|
||||
@@ -535,13 +535,13 @@ React.createFactory(CSSTransitionGroup)({
|
||||
// --------------------------------------------------------------------------
|
||||
React.createClass({
|
||||
mixins: [LinkedStateMixin],
|
||||
getInitialState: function() {
|
||||
getInitialState: function () {
|
||||
return {
|
||||
isChecked: false,
|
||||
message: "hello!"
|
||||
};
|
||||
},
|
||||
render: function() {
|
||||
render: function () {
|
||||
return React.DOM.div(null,
|
||||
React.DOM.input({
|
||||
type: "checkbox",
|
||||
@@ -587,8 +587,8 @@ Perf.printDOM();
|
||||
// PureRenderMixin addon
|
||||
// --------------------------------------------------------------------------
|
||||
React.createClass({
|
||||
mixins: [PureRenderMixin],
|
||||
render: function() { return React.DOM.div(null); }
|
||||
mixins: [PureRenderMixin],
|
||||
render: function () { return React.DOM.div(null); }
|
||||
});
|
||||
|
||||
//
|
||||
@@ -638,21 +638,21 @@ React.createFactory(TransitionGroup)({ component: "div" });
|
||||
// update addon
|
||||
// --------------------------------------------------------------------------
|
||||
{
|
||||
// These are copied from https://facebook.github.io/react/docs/update.html
|
||||
let initialArray = [1, 2, 3];
|
||||
let newArray = update(initialArray, {$push: [4]}); // => [1, 2, 3, 4]
|
||||
// These are copied from https://facebook.github.io/react/docs/update.html
|
||||
let initialArray = [1, 2, 3];
|
||||
let newArray = update(initialArray, { $push: [4] }); // => [1, 2, 3, 4]
|
||||
|
||||
let collection = [1, 2, {a: [12, 17, 15]}];
|
||||
let newCollection = update(collection, {2: {a: {$splice: [[1, 1, 13, 14]]}}});
|
||||
// => [1, 2, {a: [12, 13, 14, 15]}]
|
||||
let collection = [1, 2, { a: [12, 17, 15] }];
|
||||
let newCollection = update(collection, { 2: { a: { $splice: [[1, 1, 13, 14]] } } });
|
||||
// => [1, 2, {a: [12, 13, 14, 15]}]
|
||||
|
||||
let obj = {a: 5, b: 3};
|
||||
let newObj = update(obj, {b: {$apply: function(x) {return x * 2;}}});
|
||||
// => {a: 5, b: 6}
|
||||
let newObj2 = update(obj, {b: {$set: obj.b * 2}});
|
||||
let obj = { a: 5, b: 3 };
|
||||
let newObj = update(obj, { b: { $apply: function (x) { return x * 2; } } });
|
||||
// => {a: 5, b: 6}
|
||||
let newObj2 = update(obj, { b: { $set: obj.b * 2 } });
|
||||
|
||||
let objShallow = {a: 5, b: 3};
|
||||
let newObjShallow = update(obj, {$merge: {b: 6, c: 7}}); // => {a: 5, b: 6, c: 7}
|
||||
let objShallow = { a: 5, b: 3 };
|
||||
let newObjShallow = update(obj, { $merge: { b: 6, c: 7 } }); // => {a: 5, b: 6, c: 7}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"redux": "^3.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"redux": "^3.6.0"
|
||||
}
|
||||
}
|
||||
Vendored
+3
@@ -26,6 +26,9 @@ declare module "rest" {
|
||||
params?: any;
|
||||
headers?: any;
|
||||
entity?: any;
|
||||
canceled?: boolean;
|
||||
cancel?: () => void;
|
||||
originator?: (request?: Request) => ResponsePromise;
|
||||
}
|
||||
|
||||
export interface Status {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import expect from 'expect';
|
||||
import * as expect from 'expect';
|
||||
var miss = require('mississippi');
|
||||
var cloneable = require('cloneable-readable');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user