mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge branch 'master' into switch-0.9.5
This commit is contained in:
@@ -30,6 +30,7 @@ List of Definitions
|
||||
* [Add To Home Screen] (http://cubiq.org/add-to-home-screen) (by [James Wilkins] (http://www.codeplex.com/site/users/view/jamesnw))
|
||||
* [AmCharts](http://www.amcharts.com/) (by [Covobonomo](https://github.com/covobonomo/))
|
||||
* [AngularJS](http://angularjs.org) (by [Diego Vilar](https://github.com/diegovilar)) ([wiki](https://github.com/borisyankov/DefinitelyTyped/wiki/AngularJS-Definitions-Usage-Notes))
|
||||
* [AngularUI](http://angular-ui.github.io/) (by [Michel Salib](https://github.com/michelsalib))
|
||||
* [AppFramework](http://app-framework-software.intel.com/) (by [Kyo Ago](https://github.com/kyo-ago))
|
||||
* [Arbiter](http://arbiterjs.com/) (by [Arash Shakery](https://github.com/arash16))
|
||||
* [async](https://github.com/caolan/async) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/// <reference path="angular-ui-router.d.ts" />
|
||||
|
||||
var myApp = angular.module('testModule');
|
||||
|
||||
|
||||
myApp.config((
|
||||
$stateProvider: ng.ui.IStateProvider,
|
||||
$urlRouterProvider: ng.ui.IUrlRouterProvider) => {
|
||||
//
|
||||
// For any unmatched url, redirect to /state1
|
||||
$urlRouterProvider.otherwise("/state1");
|
||||
//
|
||||
// Now set up the states
|
||||
$stateProvider
|
||||
.state('state1', {
|
||||
url: "/state1",
|
||||
templateUrl: "partials/state1.html"
|
||||
})
|
||||
.state('state1.list', {
|
||||
url: "/list",
|
||||
templateUrl: "partials/state1.list.html",
|
||||
controller: function($scope) {
|
||||
$scope.items = ["A", "List", "Of", "Items"];
|
||||
}
|
||||
})
|
||||
.state('state2', {
|
||||
url: "/state2",
|
||||
templateUrl: "partials/state2.html"
|
||||
})
|
||||
.state('state2.list', {
|
||||
url: "/list",
|
||||
templateUrl: "partials/state2.list.html",
|
||||
controller: function($scope) {
|
||||
$scope.things = ["A", "Set", "Of", "Things"];
|
||||
}
|
||||
}).state('index', {
|
||||
url: "",
|
||||
views: {
|
||||
"viewA": { template: "index.viewA" },
|
||||
"viewB": { template: "index.viewB" }
|
||||
}
|
||||
})
|
||||
.state('route1', {
|
||||
url: "/route1",
|
||||
views: {
|
||||
"viewA": { template: "route1.viewA" },
|
||||
"viewB": { template: "route1.viewB" }
|
||||
}
|
||||
})
|
||||
.state('route2', {
|
||||
url: "/route2",
|
||||
views: {
|
||||
"viewA": { template: "route2.viewA" },
|
||||
"viewB": { template: "route2.viewB" }
|
||||
}
|
||||
});
|
||||
});
|
||||
Vendored
+85
@@ -0,0 +1,85 @@
|
||||
// Type definitions for Angular JS 1.1.5+ (ui.router module)
|
||||
// Project: https://github.com/angular-ui/ui-router
|
||||
// Definitions by: Michel Salib <michelsalib@hotmail.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module ng.ui {
|
||||
|
||||
interface IState {
|
||||
name?: string;
|
||||
template?: any;
|
||||
templateUrl?: any;
|
||||
templateProvider?: () => string;
|
||||
controller?: any;
|
||||
controllerProvider?: any;
|
||||
resolve?: {};
|
||||
url?: string;
|
||||
params?: any[];
|
||||
views?: {};
|
||||
abstract?: boolean;
|
||||
onEnter?: Function;
|
||||
onExit?: Function;
|
||||
data?: any;
|
||||
}
|
||||
|
||||
interface IStateProvider extends IServiceProvider {
|
||||
state(name:string, config:IState): IStateProvider;
|
||||
decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
|
||||
}
|
||||
|
||||
interface IUrlMatcher {
|
||||
concat(pattern: string): IUrlMatcher;
|
||||
exec(path: string, searchParams: {}): {};
|
||||
}
|
||||
|
||||
interface IUrlMatcherFactory {
|
||||
compile(pattern: string): IUrlMatcher;
|
||||
isMatcher(o: any): boolean;
|
||||
parameters(): string[];
|
||||
format(values: {}): string;
|
||||
}
|
||||
|
||||
interface IUrlRouterProvider extends IServiceProvider {
|
||||
when(whenPath: string, toPath: string): IUrlRouterProvider;
|
||||
when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
|
||||
when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider;
|
||||
otherwise(path: string): IUrlRouterProvider;
|
||||
otherwise(path: Function): IUrlRouterProvider;
|
||||
rule(handler: Function): IUrlRouterProvider;
|
||||
}
|
||||
|
||||
interface IStateOptions {
|
||||
location?: any;
|
||||
inherit?: boolean;
|
||||
relative?: IState;
|
||||
notify?: boolean;
|
||||
}
|
||||
|
||||
interface IHrefOptions {
|
||||
lossy?: boolean;
|
||||
inherit?: boolean;
|
||||
relative?: IState;
|
||||
absolute?: boolean;
|
||||
}
|
||||
|
||||
interface IStateService {
|
||||
go(to: string, params?: {}, options?: IStateOptions): void;
|
||||
transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
|
||||
transitionTo(state: string, params?: {}, options?: IStateOptions): void;
|
||||
includes(state: string, params?: {}): boolean;
|
||||
is(state:string, params?: {}): boolean;
|
||||
is(state: IState, params?: {}): boolean;
|
||||
href(state: IState, params?: {}, options?: IHrefOptions): string;
|
||||
href(state: string, params?: {}, options?: IHrefOptions): string;
|
||||
get(state: string): IState;
|
||||
get(): IState[];
|
||||
current: IState;
|
||||
params: IStateParamsService;
|
||||
}
|
||||
|
||||
interface IStateParamsService {
|
||||
[key: string]: any;
|
||||
}
|
||||
}
|
||||
Vendored
+21
-18
@@ -3,10 +3,13 @@
|
||||
// Definitions by: [RomanoLindano]
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module angularScenario {
|
||||
export interface AngularModel {
|
||||
declare module ng {
|
||||
export interface IAngularStatic {
|
||||
scenario: any;
|
||||
}
|
||||
}
|
||||
|
||||
declare module angularScenario {
|
||||
|
||||
export interface RunFunction {
|
||||
(functionToRun: any): any;
|
||||
@@ -46,25 +49,25 @@ declare module angularScenario {
|
||||
reload(): void;
|
||||
window(): testWindow;
|
||||
location(): testLocation;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export interface Matchers {
|
||||
toEqual(value: any): void;
|
||||
toBe(value: any): void;
|
||||
toBeDefined(): void;
|
||||
toBeTruthy(): void;
|
||||
toBeFalsy(): void;
|
||||
toMatch(regularExpression: any): void;
|
||||
toBeNull(): void;
|
||||
toBe(value: any): void;
|
||||
toBeDefined(): void;
|
||||
toBeTruthy(): void;
|
||||
toBeFalsy(): void;
|
||||
toMatch(regularExpression: any): void;
|
||||
toBeNull(): void;
|
||||
toContain(value: any): void;
|
||||
toBeLessThan(value: any): void;
|
||||
toBeGreaterThan(value: any): void;
|
||||
toBeLessThan(value: any): void;
|
||||
toBeGreaterThan(value: any): void;
|
||||
}
|
||||
|
||||
export interface CustomMatchers extends Matchers{
|
||||
export interface CustomMatchers extends Matchers {
|
||||
}
|
||||
|
||||
export interface Expect extends CustomMatchers {
|
||||
export interface Expect extends CustomMatchers {
|
||||
not(): angularScenario.CustomMatchers;
|
||||
}
|
||||
|
||||
@@ -92,12 +95,12 @@ declare module angularScenario {
|
||||
export interface Select {
|
||||
option(value: any): any;
|
||||
option(...listOfValues: any[]): any;
|
||||
}
|
||||
}
|
||||
|
||||
export interface Element {
|
||||
count(): Future;
|
||||
click(): any;
|
||||
query(callback: (selectedDOMElements: any[], callbackWhenDone: (objNull: any, futureValue: any) => any) =>any): any;
|
||||
query(callback: (selectedDOMElements: any[], callbackWhenDone: (objNull: any, futureValue: any) => any) => any): any;
|
||||
val(): Future;
|
||||
text(): Future;
|
||||
html(): Future;
|
||||
@@ -111,7 +114,7 @@ declare module angularScenario {
|
||||
scrollLeft(): Future;
|
||||
scrollTop(): Future;
|
||||
offset(): Future;
|
||||
|
||||
|
||||
val(value: any): void;
|
||||
text(value: any): void;
|
||||
html(value: any): void;
|
||||
@@ -154,4 +157,4 @@ declare function input(ngModelBinding: string): angularScenario.Input;
|
||||
declare function repeater(selector: string, repeaterDescription?: string): angularScenario.Repeater;
|
||||
declare function select(ngModelBinding: string): angularScenario.Select;
|
||||
declare function element(selector: string, elementDescription?: string): angularScenario.Element;
|
||||
declare var angular: angularScenario.AngularModel;
|
||||
declare var angular: ng.IAngularStatic;
|
||||
|
||||
Vendored
+3
@@ -158,7 +158,9 @@ declare module Backbone {
|
||||
comparator(compare: Model, to?: Model): any;
|
||||
|
||||
add(model: Model, options?: AddOptions): Collection;
|
||||
add(model: any, options?: AddOptions): Collection;
|
||||
add(models: Model[], options?: AddOptions): Collection;
|
||||
add(models: any[], options?: AddOptions): Collection;
|
||||
at(index: number): Model;
|
||||
get(id: any): Model;
|
||||
create(attributes: any, options?: ModelSaveOptions): Model;
|
||||
@@ -168,6 +170,7 @@ declare module Backbone {
|
||||
remove(model: Model, options?: Silenceable): Model;
|
||||
remove(models: Model[], options?: Silenceable): Model[];
|
||||
reset(models?: Model[], options?: Silenceable): Model[];
|
||||
reset(models?: any[], options?: Silenceable): Model[];
|
||||
shift(options?: Silenceable): Model;
|
||||
sort(options?: Silenceable): Collection;
|
||||
unshift(model: Model, options?: AddOptions): Model;
|
||||
|
||||
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
// Type definitions for iScroll Lite 5
|
||||
// Project: http://cubiq.org/iscroll-5-ready-for-beta-test
|
||||
// Definitions by: Christiaan Rakowski <https://github.com/csrakowski/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface IScrollOptions {
|
||||
//hScroll?: boolean;
|
||||
//vScroll?: boolean;
|
||||
|
||||
scrollX?: boolean;
|
||||
scrollY?: boolean;
|
||||
|
||||
x?: number;
|
||||
y?: number;
|
||||
bounce?: boolean;
|
||||
bounceLock?: boolean;
|
||||
momentum?: boolean;
|
||||
lockDirection?: boolean;
|
||||
useTransform?: boolean;
|
||||
useTransition?: boolean;
|
||||
}
|
||||
|
||||
declare class IScroll {
|
||||
|
||||
constructor (element: string, options?: IScrollOptions);
|
||||
constructor (element: HTMLElement, options?: IScrollOptions);
|
||||
|
||||
destroy(): void;
|
||||
refresh(): void;
|
||||
scrollTo(x: number, y: number, time?: number, relative?: boolean): void;
|
||||
scrollToElement(element: string, time?: number): void;
|
||||
scrollToElement(element: HTMLElement, time?: number): void;
|
||||
disable(): void;
|
||||
enable(): void;
|
||||
stop(): void;
|
||||
|
||||
// Events
|
||||
on: (type: string, fn: () => void) => void;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/// <reference path="iscroll-5.d.ts" />
|
||||
|
||||
var myScroll1 = new IScroll('#wrapper');
|
||||
var myScroll2 = new IScroll('#wrapper', { hScrollbar: false, vScrollbar: false });
|
||||
var myScroll3 = new IScroll('#wrapper', {
|
||||
snap: true,
|
||||
momentum: false,
|
||||
hScrollbar: false,
|
||||
vScrollbar: false
|
||||
});
|
||||
var myScroll4 = new IScroll('#wrapper', {
|
||||
snap: 'li',
|
||||
momentum: false,
|
||||
hScrollbar: false,
|
||||
vScrollbar: false
|
||||
});
|
||||
var myScroll6 = new IScroll('#wrapper', { scrollbarClass: 'myScrollbar' });
|
||||
var myScroll7 = new IScroll('#wrapper', { bounceEasing: 'elastic', bounceTime: 1200 });
|
||||
|
||||
var myScroll8 = new IScroll('#wrapper', { eventPassthrough: true, scrollX: true, scrollY: false, preventDefault: false });
|
||||
|
||||
myScroll1.refresh();
|
||||
myScroll1.scrollTo(0, 100);
|
||||
myScroll1.scrollTo(0, 100, 200);
|
||||
myScroll1.scrollTo(0, 100, 200, true);
|
||||
|
||||
myScroll1.scrollToElement('selectedElement');
|
||||
myScroll1.scrollToElement('selectedElement', 250);
|
||||
|
||||
myScroll1.scrollToElement(document.getElementById('selectedElement'));
|
||||
myScroll1.scrollToElement(document.getElementById('selectedElement'), 250);
|
||||
|
||||
myScroll2.on('scrollStart', function () { console.log('scroll started'); });
|
||||
|
||||
var myScroll9 = new IScroll(document.getElementById('wrapper'));
|
||||
var myScroll10 = new IScroll(document.getElementById('wrapper'), { scrollbarClass: 'myScrollbar' });
|
||||
Vendored
+91
@@ -0,0 +1,91 @@
|
||||
// Type definitions for iScroll 5
|
||||
// Project: http://cubiq.org/iscroll-5-ready-for-beta-test
|
||||
// Definitions by: Christiaan Rakowski <https://github.com/csrakowski/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface IScrollOptions {
|
||||
//hScroll?: boolean;
|
||||
//vScroll?: boolean;
|
||||
x?: number;
|
||||
y?: number;
|
||||
bounce?: boolean;
|
||||
bounceLock?: boolean;
|
||||
momentum?: boolean;
|
||||
lockDirection?: boolean;
|
||||
useTransform?: boolean;
|
||||
useTransition?: boolean;
|
||||
topOffset?: number;
|
||||
checkDOMChanges?: boolean;
|
||||
handleClick?: boolean;
|
||||
|
||||
// Scrollbar
|
||||
hScrollbar?: boolean;
|
||||
vScrollbar?: boolean;
|
||||
fixedScrollbar?: boolean;
|
||||
hideScrollbar?: boolean;
|
||||
fadeScrollbar?: boolean;
|
||||
scrollbarClass?: string;
|
||||
|
||||
// Zoom
|
||||
zoom?: boolean;
|
||||
zoomMin?: number;
|
||||
zoomMax?: number;
|
||||
doubleTapZoom?: number;
|
||||
wheelAction?: string;
|
||||
|
||||
|
||||
///String or boolean
|
||||
snap?: any;
|
||||
snapThreshold?: number;
|
||||
|
||||
//new in IScroll 5?
|
||||
|
||||
resizeIndicator?: boolean;
|
||||
mouseWheelSpeed?: number;
|
||||
startX?: number;
|
||||
startY?: number;
|
||||
scrollX?: boolean;
|
||||
scrollY?: boolean;
|
||||
directionLockThreshold?: number;
|
||||
|
||||
bounceTime?: number;
|
||||
|
||||
///String or function
|
||||
bounceEasing?: any;
|
||||
|
||||
preventDefault?: boolean;
|
||||
preventDefaultException?: boolean;
|
||||
|
||||
HWCompositing?: boolean;
|
||||
|
||||
freeScroll?: boolean;
|
||||
|
||||
resizePolling?: number;
|
||||
tap?: boolean;
|
||||
click?: boolean;
|
||||
invertWheelDirection?: boolean;
|
||||
|
||||
///Boolean or string
|
||||
eventPassthrough?: any;
|
||||
}
|
||||
|
||||
declare class IScroll {
|
||||
|
||||
constructor (element: string, options?: IScrollOptions);
|
||||
constructor (element: HTMLElement, options?: IScrollOptions);
|
||||
|
||||
destroy(): void;
|
||||
refresh(): void;
|
||||
scrollTo(x: number, y: number, time?: number, relative?: boolean): void;
|
||||
scrollToElement(element: string, time?: number): void;
|
||||
scrollToElement(element: HTMLElement, time?: number): void;
|
||||
scrollToPage(pageX: number, pageY: number, time?: number): void;
|
||||
disable(): void;
|
||||
enable(): void;
|
||||
stop(): void;
|
||||
zoom(x: number, y: number, scale: number, time?: number): void;
|
||||
isReady(): boolean;
|
||||
|
||||
// Events
|
||||
on: (type: string, fn: () => void) => void;
|
||||
}
|
||||
Vendored
+2
-2
@@ -1204,9 +1204,9 @@ interface JQuery {
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
||||
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
|
||||
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).
|
||||
*/
|
||||
on(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
|
||||
on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
|
||||
/**
|
||||
* Attach an event handler function for one or more events to the selected elements.
|
||||
*
|
||||
|
||||
Vendored
+5
-5
@@ -15,10 +15,10 @@ declare var global: any;
|
||||
declare var __filename: string;
|
||||
declare var __dirname: string;
|
||||
|
||||
declare function setTimeout(callback: (...args: any[]) => void , ms: number , ...args: any[]): Timer;
|
||||
declare function clearTimeout(timeoutId: Timer): void;
|
||||
declare function setInterval(callback: (...args: any[]) => void , ms: number , ...args: any[]): Timer;
|
||||
declare function clearInterval(intervalId: Timer): void;
|
||||
declare function setTimeout(callback: (...args: any[]) => void , ms: number , ...args: any[]): NodeTimer;
|
||||
declare function clearTimeout(timeoutId: NodeTimer): void;
|
||||
declare function setInterval(callback: (...args: any[]) => void , ms: number , ...args: any[]): NodeTimer;
|
||||
declare function clearInterval(intervalId: NodeTimer): void;
|
||||
declare function setImmediate(callback: (...args: any[]) => void , ...args: any[]): any;
|
||||
declare function clearImmediate(immediateId: any): void;
|
||||
|
||||
@@ -198,7 +198,7 @@ interface NodeBuffer {
|
||||
INSPECT_MAX_BYTES: number;
|
||||
}
|
||||
|
||||
interface Timer {
|
||||
interface NodeTimer {
|
||||
ref() : void;
|
||||
unref() : void;
|
||||
}
|
||||
|
||||
Vendored
+288
@@ -0,0 +1,288 @@
|
||||
// Type definitions for RxJS/Experimental
|
||||
// Project: https://github.com/Reactive-Extensions/RxJS/
|
||||
// Definitions by: Igor Oleinikov <https://github.com/Igorbek>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="rx.js.d.ts"/>
|
||||
|
||||
declare module Rx {
|
||||
|
||||
interface IObservable<T> {
|
||||
/**
|
||||
* Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions.
|
||||
* This operator allows for a fluent style of writing queries that use the same sequence multiple times.
|
||||
*
|
||||
* @param selector Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence.
|
||||
* @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
|
||||
*/
|
||||
let<TResult>(selector: (source: IObservable<T>) => IObservable<TResult>): IObservable<TResult>;
|
||||
|
||||
/**
|
||||
* Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions.
|
||||
* This operator allows for a fluent style of writing queries that use the same sequence multiple times.
|
||||
*
|
||||
* @param selector Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence.
|
||||
* @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
|
||||
*/
|
||||
letBind<TResult>(selector: (source: IObservable<T>) => IObservable<TResult>): IObservable<TResult>;
|
||||
|
||||
/**
|
||||
* Repeats source as long as condition holds emulating a do while loop.
|
||||
* @param condition The condition which determines if the source will be repeated.
|
||||
* @returns An observable sequence which is repeated as long as the condition holds.
|
||||
*/
|
||||
doWhile(condition: () => boolean): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Expands an observable sequence by recursively invoking selector.
|
||||
*
|
||||
* @param selector Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again.
|
||||
* @param [scheduler] Scheduler on which to perform the expansion. If not provided, this defaults to the current thread scheduler.
|
||||
* @returns An observable sequence containing all the elements produced by the recursive expansion.
|
||||
*/
|
||||
expand(selector: (item: T) => IObservable<T>, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Runs two observable sequences in parallel and combines their last elemenets.
|
||||
*
|
||||
* @param second Second observable sequence.
|
||||
* @param resultSelector Result selector function to invoke with the last elements of both sequences.
|
||||
* @returns An observable sequence with the result of calling the selector function with the last elements of both input sequences.
|
||||
*/
|
||||
forkJoin<TSecond, TResult>(second: IObservable<TSecond>, resultSelector: (left: T, right: TSecond) => TResult): IObservable<TResult>;
|
||||
|
||||
/**
|
||||
* Comonadic bind operator.
|
||||
* @param selector A transform function to apply to each element.
|
||||
* @param [scheduler] Scheduler used to execute the operation. If not specified, defaults to the ImmediateScheduler.
|
||||
* @returns An observable sequence which results from the comonadic bind operation.
|
||||
*/
|
||||
manySelect<TResult>(selector: (item: IObservable<T>, index: number, source: IObservable<T>) => TResult, scheduler?: IScheduler): IObservable<TResult>;
|
||||
}
|
||||
|
||||
interface Observable {
|
||||
/**
|
||||
* Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.if(condition, obs1, obs2);
|
||||
* @param condition The condition which determines if the thenSource or elseSource will be run.
|
||||
* @param thenSource The observable sequence that will be run if the condition function returns true.
|
||||
* @param elseSource The observable sequence that will be run if the condition function returns false.
|
||||
* @returns An observable sequence which is either the thenSource or elseSource.
|
||||
*/
|
||||
if<T>(condition: () => boolean, thenSource: IObservable<T>, elseSource: IObservable<T>): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.if(condition, obs1, scheduler);
|
||||
* @param condition The condition which determines if the thenSource or empty sequence will be run.
|
||||
* @param thenSource The observable sequence that will be run if the condition function returns true.
|
||||
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
|
||||
* @returns An observable sequence which is either the thenSource or empty sequence.
|
||||
*/
|
||||
if<T>(condition: () => boolean, thenSource: IObservable<T>, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.if(condition, obs1, obs2);
|
||||
* @param condition The condition which determines if the thenSource or elseSource will be run.
|
||||
* @param thenSource The observable sequence that will be run if the condition function returns true.
|
||||
* @param elseSource The observable sequence that will be run if the condition function returns false.
|
||||
* @returns An observable sequence which is either the thenSource or elseSource.
|
||||
*/
|
||||
ifThen<T>(condition: () => boolean, thenSource: IObservable<T>, elseSource: IObservable<T>): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.if(condition, obs1, scheduler);
|
||||
* @param condition The condition which determines if the thenSource or empty sequence will be run.
|
||||
* @param thenSource The observable sequence that will be run if the condition function returns true.
|
||||
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
|
||||
* @returns An observable sequence which is either the thenSource or empty sequence.
|
||||
*/
|
||||
ifThen<T>(condition: () => boolean, thenSource: IObservable<T>, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Concatenates the observable sequences obtained by running the specified result selector for each element in source.
|
||||
* There is an alias for this method called 'forIn' for browsers <IE9
|
||||
* @param sources An array of values to turn into an observable sequence.
|
||||
* @param resultSelector A function to apply to each item in the sources array to turn it into an observable sequence.
|
||||
* @returns An observable sequence from the concatenated observable sequences.
|
||||
*/
|
||||
for<T, TResult>(sources: T[], resultSelector: (item: T) => IObservable<TResult>): IObservable<TResult>;
|
||||
|
||||
/**
|
||||
* Concatenates the observable sequences obtained by running the specified result selector for each element in source.
|
||||
* There is an alias for this method called 'forIn' for browsers <IE9
|
||||
* @param sources An array of values to turn into an observable sequence.
|
||||
* @param resultSelector A function to apply to each item in the sources array to turn it into an observable sequence.
|
||||
* @returns An observable sequence from the concatenated observable sequences.
|
||||
*/
|
||||
forIn<T, TResult>(sources: T[], resultSelector: (item: T) => IObservable<TResult>): IObservable<TResult>;
|
||||
|
||||
/**
|
||||
* Repeats source as long as condition holds emulating a while loop.
|
||||
* There is an alias for this method called 'whileDo' for browsers <IE9
|
||||
* @param condition The condition which determines if the source will be repeated.
|
||||
* @param source The observable sequence that will be run if the condition function returns true.
|
||||
* @returns An observable sequence which is repeated as long as the condition holds.
|
||||
*/
|
||||
while<T>(condition: () => boolean, source: IObservable<T>): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Repeats source as long as condition holds emulating a while loop.
|
||||
* There is an alias for this method called 'whileDo' for browsers <IE9
|
||||
* @param condition The condition which determines if the source will be repeated.
|
||||
* @param source The observable sequence that will be run if the condition function returns true.
|
||||
* @returns An observable sequence which is repeated as long as the condition holds.
|
||||
*/
|
||||
whileDo<T>(condition: () => boolean, source: IObservable<T>): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Uses selector to determine which source in sources to use.
|
||||
* There is an alias 'switchCase' for browsers <IE9.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
|
||||
* @param selector The function which extracts the value for to test in a case statement.
|
||||
* @param sources A object which has keys which correspond to the case statement labels.
|
||||
* @param elseSource The observable sequence that will be run if the sources are not matched.
|
||||
*
|
||||
* @returns An observable sequence which is determined by a case statement.
|
||||
*/
|
||||
case<T>(selector: () => string, sources: { [key: string]: IObservable<T>; }, elseSource: IObservable<T>): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Uses selector to determine which source in sources to use.
|
||||
* There is an alias 'switchCase' for browsers <IE9.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
|
||||
*
|
||||
* @param selector The function which extracts the value for to test in a case statement.
|
||||
* @param sources A object which has keys which correspond to the case statement labels.
|
||||
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
|
||||
*
|
||||
* @returns An observable sequence which is determined by a case statement.
|
||||
*/
|
||||
case<T>(selector: () => string, sources: { [key: string]: IObservable<T>; }, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Uses selector to determine which source in sources to use.
|
||||
* There is an alias 'switchCase' for browsers <IE9.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
|
||||
* @param selector The function which extracts the value for to test in a case statement.
|
||||
* @param sources A object which has keys which correspond to the case statement labels.
|
||||
* @param elseSource The observable sequence that will be run if the sources are not matched.
|
||||
*
|
||||
* @returns An observable sequence which is determined by a case statement.
|
||||
*/
|
||||
case<T>(selector: () => number, sources: { [key: number]: IObservable<T>; }, elseSource: IObservable<T>): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Uses selector to determine which source in sources to use.
|
||||
* There is an alias 'switchCase' for browsers <IE9.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
|
||||
*
|
||||
* @param selector The function which extracts the value for to test in a case statement.
|
||||
* @param sources A object which has keys which correspond to the case statement labels.
|
||||
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
|
||||
*
|
||||
* @returns An observable sequence which is determined by a case statement.
|
||||
*/
|
||||
case<T>(selector: () => number, sources: { [key: number]: IObservable<T>; }, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Uses selector to determine which source in sources to use.
|
||||
* There is an alias 'switchCase' for browsers <IE9.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
|
||||
* @param selector The function which extracts the value for to test in a case statement.
|
||||
* @param sources A object which has keys which correspond to the case statement labels.
|
||||
* @param elseSource The observable sequence that will be run if the sources are not matched.
|
||||
*
|
||||
* @returns An observable sequence which is determined by a case statement.
|
||||
*/
|
||||
switchCase<T>(selector: () => string, sources: { [key: string]: IObservable<T>; }, elseSource: IObservable<T>): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Uses selector to determine which source in sources to use.
|
||||
* There is an alias 'switchCase' for browsers <IE9.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
|
||||
*
|
||||
* @param selector The function which extracts the value for to test in a case statement.
|
||||
* @param sources A object which has keys which correspond to the case statement labels.
|
||||
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
|
||||
*
|
||||
* @returns An observable sequence which is determined by a case statement.
|
||||
*/
|
||||
switchCase<T>(selector: () => string, sources: { [key: string]: IObservable<T>; }, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Uses selector to determine which source in sources to use.
|
||||
* There is an alias 'switchCase' for browsers <IE9.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
|
||||
* @param selector The function which extracts the value for to test in a case statement.
|
||||
* @param sources A object which has keys which correspond to the case statement labels.
|
||||
* @param elseSource The observable sequence that will be run if the sources are not matched.
|
||||
*
|
||||
* @returns An observable sequence which is determined by a case statement.
|
||||
*/
|
||||
switchCase<T>(selector: () => number, sources: { [key: number]: IObservable<T>; }, elseSource: IObservable<T>): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Uses selector to determine which source in sources to use.
|
||||
* There is an alias 'switchCase' for browsers <IE9.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
|
||||
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
|
||||
*
|
||||
* @param selector The function which extracts the value for to test in a case statement.
|
||||
* @param sources A object which has keys which correspond to the case statement labels.
|
||||
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
|
||||
*
|
||||
* @returns An observable sequence which is determined by a case statement.
|
||||
*/
|
||||
switchCase<T>(selector: () => number, sources: { [key: number]: IObservable<T>; }, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
/**
|
||||
* Runs all observable sequences in parallel and collect their last elements.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.forkJoin([obs1, obs2]);
|
||||
* @param sources Array of source sequences.
|
||||
* @returns An observable sequence with an array collecting the last elements of all the input sequences.
|
||||
*/
|
||||
forkJoin<T>(sources: IObservable<T>[]): IObservable<T[]>;
|
||||
|
||||
/**
|
||||
* Runs all observable sequences in parallel and collect their last elements.
|
||||
*
|
||||
* @example
|
||||
* res = Rx.Observable.forkJoin(obs1, obs2, ...);
|
||||
* @param args Source sequences.
|
||||
* @returns An observable sequence with an array collecting the last elements of all the input sequences.
|
||||
*/
|
||||
forkJoin<T>(...args: IObservable<T>[]): IObservable<T[]>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
""
|
||||
Vendored
+459
-6
@@ -1600,9 +1600,14 @@ declare module SP {
|
||||
constructor(clientObject: SP.ClientObject, propertyName: string, comparisonOperator: string, valueToCompare: any);
|
||||
constructor(clientObject: SP.ClientObject, propertyName: string, comparisonOperator: string, valueToCompare: any, allowAllActions: boolean);
|
||||
}
|
||||
export class ClientResult {
|
||||
get_value(): any;
|
||||
setValue(value: any): void;
|
||||
//export class ClientResult {
|
||||
// get_value(): any;
|
||||
// setValue(value: any): void;
|
||||
// constructor();
|
||||
//}
|
||||
export class ClientResult<T> {
|
||||
get_value(): T;
|
||||
setValue(value: T): void;
|
||||
constructor();
|
||||
}
|
||||
export class BooleanResult {
|
||||
@@ -1637,8 +1642,8 @@ declare module SP {
|
||||
get_value(): any;
|
||||
constructor();
|
||||
}
|
||||
export class ClientDictionaryResultHandler {
|
||||
constructor(dict: SP.ClientResult);
|
||||
export class ClientDictionaryResultHandler<T> {
|
||||
constructor(dict: SP.ClientResult<T>);
|
||||
}
|
||||
export class ClientUtility {
|
||||
static urlPathEncodeForXmlHttpRequest(url: string): string;
|
||||
@@ -6744,6 +6749,53 @@ declare module SP {
|
||||
}
|
||||
}
|
||||
|
||||
declare module SP {
|
||||
export module DocumentSet {
|
||||
export class DocumentSet extends ClientObject {
|
||||
static create(context: ClientContext, parentFolder: Folder, name: string, ctid: ContentTypeId): StringResult;
|
||||
}
|
||||
}
|
||||
|
||||
export module Video {
|
||||
export class EmbedCodeConfiguration extends ClientValueObject {
|
||||
public get_autoPlay(): boolean;
|
||||
public set_autoPlay(value: boolean): boolean;
|
||||
|
||||
public get_displayTitle(): boolean;
|
||||
public set_displayTitle(value: boolean): boolean;
|
||||
|
||||
public get_linkToOwnerProfilePage(): boolean;
|
||||
public set_linkToOwnerProfilePage(value: boolean): boolean;
|
||||
|
||||
public get_linkToVideoHomePage(): boolean;
|
||||
public set_linkToVideoHomePage(value: boolean): boolean;
|
||||
|
||||
public get_loop(): boolean;
|
||||
public set_loop(value: boolean): boolean;
|
||||
|
||||
public get_pixelHeight(): number;
|
||||
public set_pixelHeight(value: number): number;
|
||||
|
||||
public get_pixelWidth(): number;
|
||||
public set_pixelWidth(value: number): number;
|
||||
|
||||
public get_startTime(): number;
|
||||
public set_startTime(value: number): number;
|
||||
|
||||
public get_previewImagePath(): string;
|
||||
public set_previewImagePath(value: string): string;
|
||||
}
|
||||
|
||||
export class VideoSet extends DocumentSet.DocumentSet {
|
||||
static createVideo(context: ClientContext, parentFolder: Folder, name: string, ctid: ContentTypeId): StringResult;
|
||||
static uploadVideo(context: ClientContext, list: List, fileName: string, file: any[], overwriteIfExists: boolean, parentFolderPath: string): StringResult;
|
||||
static getEmbedCode(context: ClientContext, videoPath: string, properties: EmbedCodeConfiguration): StringResult;
|
||||
static migrateVideo(context: ClientContext, videoFile: File): SP.ListItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
declare module SP {
|
||||
export module UI {
|
||||
export module ApplicationPages {
|
||||
@@ -8013,7 +8065,7 @@ declare module SP.WorkflowServices {
|
||||
getDesignerActions(web: SP.Web): SP.StringResult;
|
||||
/** Returns an XML representation of a collection of XAML class signatures for workflow definitions.
|
||||
@param lastChanges Date time value representing the latest changes; class signatures older than this time are excluded from the result set. */
|
||||
getActivitySignatures(lastChanged: string): SP.ClientResult;
|
||||
getActivitySignatures(lastChanged: string): SP.ClientResult<any>;
|
||||
/** Saves a SharePoint workflow definition to the workflow store. */
|
||||
saveDefinition(definition: WorkflowDefinition): SP.GuidResult;
|
||||
/** Validates the specified activity against workflow definitions in the workflow store. */
|
||||
@@ -8231,6 +8283,407 @@ declare module SP.WorkflowServices {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
declare module SP {
|
||||
export module Publishing {
|
||||
export class PublishingWeb extends ClientObject {
|
||||
static getPublishingWeb(context: ClientContext, web: Web): PublishingWeb;
|
||||
|
||||
public get_web(): Web;
|
||||
public addPublishingPage(pageInformation: PublishingPageInformation): PublishingPage;
|
||||
}
|
||||
|
||||
export class PublishingPageInformation extends ClientValueObject {
|
||||
|
||||
public get_folder(): Folder;
|
||||
public set_folder(value: Folder): Folder;
|
||||
|
||||
public get_name(): string;
|
||||
public set_name(value: string): string;
|
||||
|
||||
public get_pageLayoutListItem(): ListItem;
|
||||
public set_pageLayoutListItem(value: ListItem): ListItem;
|
||||
}
|
||||
|
||||
export class PublishingPage extends ScheduledItem {
|
||||
static getPublishingPage(context: ClientContext, sourceListItem: ListItem): PublishingPage;
|
||||
public addFriendlyUrl(friendlyUrlSegment: string, editableParent: Navigation.NavigationTermSetItem, doAddToNavigation: boolean): StringResult;
|
||||
}
|
||||
|
||||
export class ScheduledItem extends ClientObject {
|
||||
public get_listItem(): ListItem;
|
||||
|
||||
public get_startDate(): Date;
|
||||
public set_startDate(value: Date): Date;
|
||||
|
||||
public get_endDate(): Date;
|
||||
public set_endDate(value: Date): Date;
|
||||
|
||||
public schedule(approvalComment: string): void;
|
||||
}
|
||||
|
||||
export class PublishingSite extends ClientObject {
|
||||
static createPageLayout(context: ClientContext, parameters: PageLayoutCreationInformation): void;
|
||||
}
|
||||
|
||||
export class PageLayoutCreationInformation extends ClientValueObject {
|
||||
public get_web(): Web;
|
||||
public set_web(value: Web): Web;
|
||||
|
||||
public get_associatedContentTypeId(): string;
|
||||
public set_associatedContentTypeId(value: string): string;
|
||||
|
||||
public get_masterPageUrl(): string;
|
||||
public set_masterPageUrl(value: string): string;
|
||||
|
||||
public get_newPageLayoutNameWithoutExtension(): string;
|
||||
public set_newPageLayoutNameWithoutExtension(value: string): string;
|
||||
|
||||
public get_newPageLayoutEditablePath(): string;
|
||||
public set_newPageLayoutEditablePath(value: string): string;
|
||||
}
|
||||
|
||||
export class SiteServicesAddins {
|
||||
static getSettings(context: ClientContext, addinId: Guid): AddinSettings;
|
||||
static setSettings(context: ClientContext, addin: AddinSettings): void;
|
||||
static deleteSettings(context: ClientContext, addinId: Guid): void;
|
||||
|
||||
static getPlugin(context: ClientContext, pluginName: string): AddinPlugin;
|
||||
static setPlugin(context: ClientContext, addin: AddinPlugin): void;
|
||||
static deletePlugin(context: ClientContext, pluginName: string): void;
|
||||
}
|
||||
|
||||
export class AddinSettings extends ClientObject {
|
||||
constructor(ctx: ClientContext, id: Guid);
|
||||
|
||||
public get_id(): Guid;
|
||||
|
||||
public get_title(): string;
|
||||
public set_title(value: string): string;
|
||||
|
||||
public get_description(): string;
|
||||
public set_description(value: string): string;
|
||||
|
||||
public get_enabled(): boolean;
|
||||
public set_enabled(value: boolean): boolean;
|
||||
|
||||
public get_namespace(): boolean;
|
||||
public set_namespace(value: boolean): boolean;
|
||||
|
||||
public get_headScript(): string;
|
||||
public set_headScript(value: string): string;
|
||||
|
||||
public get_htmlStartBody(): string;
|
||||
public set_htmlStartBody(value: string): string;
|
||||
|
||||
public get_htmlEndBody(): string;
|
||||
public set_htmlEndBody(value: string): string;
|
||||
|
||||
public get_metaTagPagePropertyMappings(): { [key: string]: string };
|
||||
public set_metaTagPagePropertyMappings(value: { [key: string]: string }): { [key: string]: string };
|
||||
|
||||
}
|
||||
|
||||
export class AddinPlugin extends ClientObject {
|
||||
constructor(ctx: ClientContext);
|
||||
|
||||
public get_description(): string;
|
||||
public set_description(value: string): string;
|
||||
|
||||
public get_markup(): string;
|
||||
public set_markup(value: string): string;
|
||||
|
||||
public get_title(): string;
|
||||
public set_title(value: string): string;
|
||||
}
|
||||
|
||||
|
||||
export class DesignPackage {
|
||||
static install(context: ClientContext, site: Site, info: DesignPackageInfo, path: string): void;
|
||||
static uninstall(context: ClientContext, site: Site, info: DesignPackageInfo): void;
|
||||
static apply(context: ClientContext, site: Site, info: DesignPackageInfo): void;
|
||||
static exportEnterprise(context: ClientContext, site: Site, includeSearchConfiguration: boolean): ClientResult<DesignPackageInfo>;
|
||||
static exportSmallBusiness(context: ClientContext, site: Site, packageName: string, includeSearchConfiguration: boolean): ClientResult<DesignPackageInfo>;
|
||||
}
|
||||
|
||||
export class DesignPackageInfo extends ClientValueObject {
|
||||
public get_packageName(): string;
|
||||
public set_packageName(value: string): string;
|
||||
|
||||
public get_packageGuid(): Guid;
|
||||
public set_packageGuid(value: Guid): Guid;
|
||||
|
||||
public get_majorVersion(): number;
|
||||
public set_majorVersion(value: number): number;
|
||||
|
||||
public get_minorVersion(): number;
|
||||
public set_minorVersion(value: number): number;
|
||||
}
|
||||
|
||||
export class SiteImageRenditions {
|
||||
static getRenditions(context: ClientContext): ImageRendition[];
|
||||
static setRenditions(context: ClientContext, renditions: ImageRendition[]): void;
|
||||
}
|
||||
|
||||
export class ImageRendition extends ClientValueObject {
|
||||
public get_id(): number;
|
||||
public get_version(): number;
|
||||
|
||||
public get_name(): string;
|
||||
public set_name(value: string): string;
|
||||
|
||||
public get_width(): number;
|
||||
public set_width(value: number): number;
|
||||
|
||||
public get_height(): number;
|
||||
public set_height(value: number): number;
|
||||
}
|
||||
|
||||
export class Variations extends ClientObject {
|
||||
static getLabels(context: ClientContext): ClientObjectList<VariationLabel>;
|
||||
static getPeerUrl(context: ClientContext, currentUrl: string, labelTitle: string): StringResult;
|
||||
static updateListItems(context: ClientContext, listId: Guid, itemIds: number[]): void;
|
||||
}
|
||||
|
||||
export class VariationLabel extends ClientObject {
|
||||
public get_displayName(): string;
|
||||
public set_displayName(value: string): string;
|
||||
|
||||
public get_isSource(): boolean;
|
||||
public set_isSource(value: boolean): boolean;
|
||||
|
||||
public get_language(): string;
|
||||
public set_language(value: string): string;
|
||||
|
||||
public get_locale(): string;
|
||||
public set_locale(value: string): string;
|
||||
|
||||
public get_title(): string;
|
||||
public set_title(value: string): string;
|
||||
|
||||
public get_topWebUrl(): string;
|
||||
public set_topWebUrl(value: string): string;
|
||||
}
|
||||
|
||||
export class CustomizableString extends ClientObject {
|
||||
public get_defaultValue(): string;
|
||||
|
||||
public get_value(): string;
|
||||
public set_value(value: string): string;
|
||||
|
||||
public get_usesDefaultValue(): boolean;
|
||||
public set_usesDefaultValue(value: boolean): boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
export module Navigation {
|
||||
export enum NavigationLinkType {
|
||||
root,
|
||||
friendlyUrl,
|
||||
simpleLink
|
||||
}
|
||||
|
||||
export enum StandardNavigationSource {
|
||||
unknown,
|
||||
portalProvider,
|
||||
taxonomyProvider,
|
||||
inheritFromParentWeb
|
||||
}
|
||||
|
||||
export class NavigationTermSetItem extends ClientObject {
|
||||
public get_id(): Guid;
|
||||
|
||||
public get_isReadOnly(): boolean;
|
||||
|
||||
public get_linkType(): NavigationLinkType;
|
||||
public set_linkType(value: NavigationLinkType): NavigationLinkType;
|
||||
|
||||
public get_targetUrlForChildTerms(): CustomizableString;
|
||||
|
||||
public get_catalogTargetUrlForChildTerms(): CustomizableString;
|
||||
|
||||
public get_taxonomyName(): string;
|
||||
|
||||
public get_title(): CustomizableString;
|
||||
|
||||
public get_terms(): NavigationTermCollection;
|
||||
|
||||
public get_view(): NavigationTermSetView;
|
||||
|
||||
public createTerm(termName: string, linkType: NavigationLinkType, termId: Guid);
|
||||
|
||||
public getTaxonomyTermStore(): Taxonomy.TermStore;
|
||||
|
||||
public getResolvedDisplayUrl(browserQueryString: string): StringResult;
|
||||
}
|
||||
|
||||
export class NavigationTermCollection extends ClientObjectCollection<NavigationTerm> {
|
||||
|
||||
}
|
||||
|
||||
export class NavigationTerm extends NavigationTermSetItem {
|
||||
public get_associatedFolderUrl(): string;
|
||||
public set_associatedFolderUrl(value: string): string;
|
||||
|
||||
public get_catalogTargetUrl(): CustomizableString;
|
||||
|
||||
public get_categoryImageUrl(): string;
|
||||
public set_categoryImageUrl(value: string): string;
|
||||
|
||||
public get_excludedProviders(): NavigationTermProviderNameCollection;
|
||||
|
||||
public get_excludeFromCurrentNavigation(): boolean;
|
||||
public set_excludeFromCurrentNavigation(value: boolean): boolean;
|
||||
|
||||
public get_excludeFromGlobalNavigation(): boolean;
|
||||
public set_excludeFromGlobalNavigation(value: boolean): boolean;
|
||||
|
||||
public get_friendlyUrlSegment(): CustomizableString;
|
||||
|
||||
public get_hoverText(): string;
|
||||
public set_hoverText(value: string): string;
|
||||
|
||||
public get_isDeprecated(): boolean;
|
||||
public get_isPinned(): boolean;
|
||||
public get_isPinnedRoot(): boolean;
|
||||
|
||||
public get_parent(): NavigationTerm;
|
||||
|
||||
public get_simpleLinkUrl(): string;
|
||||
|
||||
public set_simpleLinkUrl(value: string): string;
|
||||
|
||||
public get_targetUrl(): CustomizableString;
|
||||
|
||||
public get_termSet(): NavigationTermSet;
|
||||
|
||||
public getAsEditable(taxonomySession: Taxonomy.TaxonomySession): NavigationTerm;
|
||||
|
||||
public getWithNewView(newView: NavigationTermSetView): NavigationTerm;
|
||||
|
||||
public getResolvedTargetUrl(browserQueryString: string, remainingUrlSegments: string[]): StringResult;
|
||||
|
||||
public getResolvedTargetUrlWithoutQuery(): StringResult;
|
||||
|
||||
public getResolvedAssociatedFolderUrl(): StringResult;
|
||||
|
||||
public getWebRelativeFriendlyUrl(); StringResult;
|
||||
|
||||
public getAllParentTerms(): NavigationTermCollection;
|
||||
|
||||
public getTaxonomyTerm(): Taxonomy.Term;
|
||||
|
||||
public move(newParent: NavigationTermSetItem): void;
|
||||
|
||||
public deleteObject(): void;
|
||||
|
||||
static getAsResolvedByWeb(context: ClientContext, term: Taxonomy.Term, web: Web, siteMapProviderName: string): NavigationTerm;
|
||||
static getAsResolvedByView(context: ClientContext, term: Taxonomy.Term, view: NavigationTermSetView): NavigationTerm;
|
||||
}
|
||||
|
||||
|
||||
export class NavigationTermSet extends NavigationTermSetItem {
|
||||
public get_isNavigationTermSet(): boolean;
|
||||
public set_isNavigationTermSet(value: boolean): boolean;
|
||||
|
||||
public get_lcid(): number;
|
||||
|
||||
public get_loadedFromPersistedData(): boolean;
|
||||
|
||||
public get_termGroupId(): Guid;
|
||||
public get_termStoreId(): Guid;
|
||||
|
||||
public getAsEditable(taxonomySession: Taxonomy.TaxonomySession): NavigationTermSet;
|
||||
|
||||
public getWithNewView(newView: NavigationTermSetView): NavigationTermSet;
|
||||
|
||||
public getTaxonomyTermSet(): Taxonomy.TermSet;
|
||||
|
||||
public getAllTerms(): NavigationTermCollection;
|
||||
|
||||
public findTermForUrl(usr: string): NavigationTerm;
|
||||
|
||||
static getAsResolvedByWeb(context: ClientContext, termSet: Taxonomy.TermSet, web: Web, siteMapProviderName: string): NavigationTermSet;
|
||||
static getAsResolvedByView(context: ClientContext, termSet: Taxonomy.TermSet, view: NavigationTermSetView): NavigationTermSet;
|
||||
}
|
||||
|
||||
|
||||
export class NavigationTermProviderNameCollection extends ClientObjectCollection<string> {
|
||||
public Add(item: string): void;
|
||||
public Clear(): void;
|
||||
public Remove(item: string): BooleanResult;
|
||||
}
|
||||
|
||||
export class NavigationTermSetView extends ClientObject {
|
||||
constructor(context: ClientContext, web: Web, siteMapProviderName: string);
|
||||
|
||||
public get_excludeDeprecatedTerms(): boolean;
|
||||
public set_excludeDeprecatedTerms(value: boolean): boolean;
|
||||
|
||||
public get_excludeTermsByPermissions(): boolean;
|
||||
public set_excludeTermsByPermissions(value: boolean): boolean;
|
||||
|
||||
public get_excludeTermsByProvider(): boolean;
|
||||
public set_excludeTermsByProvider(value: boolean): boolean;
|
||||
|
||||
public get_serverRelativeSiteUrl(): string;
|
||||
|
||||
public get_serverRelativeWebUrl(): string;
|
||||
|
||||
public get_siteMapProviderName(): string;
|
||||
public set_siteMapProviderName(value: string): string;
|
||||
|
||||
public get_webId(): Guid;
|
||||
public get_webTitle(): string;
|
||||
|
||||
public getCopy(): NavigationTermSetView;
|
||||
|
||||
static createEmptyInstance(context: ClientContext): NavigationTermSetView;
|
||||
}
|
||||
|
||||
export class TaxonomyNavigation {
|
||||
static getWebNavigationSettings(context: ClientContext, web: Web): WebNavigationSettings;
|
||||
static getTermSetForWeb(context: ClientContext, web: Web, siteMapProviderName: string, includeInheritedSettings: boolean): NavigationTermSet;
|
||||
static setCrawlAsFriendlyUrlPage(context: ClientContext, navigationTerm, crawlAsFriendlyUrlPage): BooleanResult;
|
||||
static getNavigationLcidForWeb(context: ClientContext, web: Web): IntResult;
|
||||
static flushSiteFromCache(context: ClientContext, site: Site): void;
|
||||
static flushWebFromCache(context: ClientContext, web: Web): void;
|
||||
static flushTermSetFromCache(context: ClientContext, webForPermissions, termStoreId: Guid, termSetId: Guid): void;
|
||||
}
|
||||
|
||||
export class WebNavigationSettings extends ClientObject {
|
||||
constructor(context: ClientContext, web: Web);
|
||||
|
||||
public get_addNewPagesToNavigation(): boolean;
|
||||
public set_addNewPagesToNavigation(value: boolean): boolean;
|
||||
|
||||
public get_createFriendlyUrlsForNewPages(): boolean;
|
||||
public set_createFriendlyUrlsForNewPages(value: boolean): boolean;
|
||||
|
||||
public get_currentNavigation(): StandardNavigationSettings;
|
||||
public get_globalNavigation(): StandardNavigationSettings;
|
||||
|
||||
public update(taxonomySession: Taxonomy.TaxonomySession): void;
|
||||
public resetToDefaults(): void;
|
||||
}
|
||||
|
||||
export class StandardNavigationSettings extends ClientObject {
|
||||
public get_termSetId(): Guid;
|
||||
public set_termSetId(value: Guid): Guid;
|
||||
|
||||
public get_termStoreId(): Guid;
|
||||
public set_termStoreId(value: Guid): Guid;
|
||||
|
||||
public get_source(): StandardNavigationSource;
|
||||
|
||||
public set_source(value: StandardNavigationSource): StandardNavigationSource;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
declare class SPClientAutoFill {
|
||||
static MenuOptionType: {
|
||||
Option: number;
|
||||
|
||||
Vendored
+1
-1
@@ -2707,7 +2707,7 @@ interface _Chain<T> {
|
||||
* Wrapped type `object`.
|
||||
* @see _.keys
|
||||
**/
|
||||
keys(): _Chain<T>;
|
||||
keys(): _Chain<string>;
|
||||
|
||||
/**
|
||||
* Wrapped type `object`.
|
||||
|
||||
Vendored
+181
-73
@@ -11,7 +11,52 @@ declare module "websocket" {
|
||||
import net = require('net');
|
||||
import url = require('url');
|
||||
|
||||
export interface IServerConfig {
|
||||
export interface IStringified {
|
||||
toString: (...args: any[]) => string;
|
||||
}
|
||||
|
||||
export interface IConfig {
|
||||
/**
|
||||
* The maximum allowed received frame size in bytes.
|
||||
* Single frame messages will also be limited to this maximum.
|
||||
*/
|
||||
maxReceivedFrameSize?: number;
|
||||
|
||||
/** The maximum allowed aggregate message size (for fragmented messages) in bytes */
|
||||
maxReceivedMessageSize?: number;
|
||||
|
||||
/**
|
||||
* Whether or not to fragment outgoing messages. If true, messages will be
|
||||
* automatically fragmented into chunks of up to `fragmentationThreshold` bytes.
|
||||
* @default true
|
||||
*/
|
||||
fragmentOutgoingMessages?: boolean;
|
||||
|
||||
/**
|
||||
* The maximum size of a frame in bytes before it is automatically fragmented.
|
||||
* @default 16KiB
|
||||
*/
|
||||
fragmentationThreshold?: number;
|
||||
|
||||
/**
|
||||
* If true, fragmented messages will be automatically assembled and the full
|
||||
* message will be emitted via a `message` event. If false, each frame will be
|
||||
* emitted on the `connection` object via a `frame` event and the application
|
||||
* will be responsible for aggregating multiple fragmented frames. Single-frame
|
||||
* messages will emit a `message` event in addition to the `frame` event.
|
||||
* @default true
|
||||
*/
|
||||
assembleFragments?: boolean;
|
||||
|
||||
/**
|
||||
* The number of milliseconds to wait after sending a close frame for an
|
||||
* `acknowledgement` to come back before giving up and just closing the socket.
|
||||
* @default 5000
|
||||
*/
|
||||
closeTimeout?: number;
|
||||
}
|
||||
|
||||
export interface IServerConfig extends IConfig {
|
||||
/** The http server instance to attach to */
|
||||
httpServer: http.Server;
|
||||
|
||||
@@ -28,19 +73,6 @@ declare module "websocket" {
|
||||
*/
|
||||
maxReceivedMessageSize?: number;
|
||||
|
||||
/**
|
||||
* Whether or not to fragment outgoing messages. If true, messages will be
|
||||
* automatically fragmented into chunks of up to `fragmentationThreshold` bytes.
|
||||
* @default true
|
||||
*/
|
||||
fragmentOutgoingMessages?: boolean;
|
||||
|
||||
/**
|
||||
* The maximum size of a frame in bytes before it is automatically fragmented.
|
||||
* @default 16KiB
|
||||
*/
|
||||
fragmentationThreshold?: number;
|
||||
|
||||
/**
|
||||
* If true, the server will automatically send a ping to all clients every
|
||||
* `keepaliveInterval` milliseconds. Each client has an independent `keepalive`
|
||||
@@ -72,16 +104,6 @@ declare module "websocket" {
|
||||
*/
|
||||
keepaliveGracePeriod?: number;
|
||||
|
||||
/**
|
||||
* If true, fragmented messages will be automatically assembled and the full
|
||||
* message will be emitted via a `message` event. If false, each frame will be
|
||||
* emitted on the `connection` object via a `frame` event and the application
|
||||
* will be responsible for aggregating multiple fragmented frames. Single-frame
|
||||
* messages will emit a `message` event in addition to the `frame` event.
|
||||
* @default true
|
||||
*/
|
||||
assembleFragments?: boolean;
|
||||
|
||||
/**
|
||||
* If this is true, websocket connections will be accepted regardless of the path
|
||||
* and protocol specified by the client. The protocol accepted will be the first
|
||||
@@ -90,13 +112,6 @@ declare module "websocket" {
|
||||
*/
|
||||
autoAcceptConnections?: boolean;
|
||||
|
||||
/**
|
||||
* The number of milliseconds to wait after sending a close frame for an
|
||||
* `acknowledgement` to come back before giving up and just closing the socket.
|
||||
* @default 5000
|
||||
*/
|
||||
closeTimeout?: number;
|
||||
|
||||
/**
|
||||
* The Nagle Algorithm makes more efficient use of network resources by introducing a
|
||||
* small delay before sending small packets so that multiple messages can be batched
|
||||
@@ -107,8 +122,19 @@ declare module "websocket" {
|
||||
}
|
||||
|
||||
export class server extends events.EventEmitter {
|
||||
config: IServerConfig;
|
||||
connections: connection[];
|
||||
|
||||
constructor(serverConfig?: IServerConfig);
|
||||
|
||||
/** Send binary message for each connection */
|
||||
broadcast(data: NodeBuffer): void;
|
||||
/** Send UTF-8 message for each connection */
|
||||
broadcast(data: IStringified): void;
|
||||
/** Send binary message for each connection */
|
||||
broadcastBytes(data: NodeBuffer): void;
|
||||
/** Send UTF-8 message for each connection */
|
||||
broadcastUTF(data: IStringified): void;
|
||||
/** Attach the `server` instance to a Node http.Server instance */
|
||||
mount(serverConfig: IServerConfig): void;
|
||||
|
||||
@@ -135,6 +161,22 @@ declare module "websocket" {
|
||||
addListener(event: 'close', cb: (connection: connection, reason: number, desc: string) => void): server;
|
||||
}
|
||||
|
||||
export interface ICookie {
|
||||
name: string;
|
||||
value: string;
|
||||
path?: string;
|
||||
domain?: string;
|
||||
expires?: Date;
|
||||
maxage?: number;
|
||||
secure?: boolean;
|
||||
httponly?: boolean;
|
||||
}
|
||||
|
||||
export interface IExtension {
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export class request extends events.EventEmitter {
|
||||
/** A reference to the original Node HTTP request object */
|
||||
httpRequest: http.ClientRequest;
|
||||
@@ -142,6 +184,8 @@ declare module "websocket" {
|
||||
host: string;
|
||||
/** A string containing the path that was requested by the client */
|
||||
resource: string;
|
||||
/** `Sec-WebSocket-Key` */
|
||||
key: string;
|
||||
/** Parsed resource, including the query string parameters */
|
||||
resourceURL: url.Url;
|
||||
|
||||
@@ -163,6 +207,9 @@ declare module "websocket" {
|
||||
/** An array containing a list of extensions requested by the client */
|
||||
requestedExtensions: any[];
|
||||
|
||||
cookies: ICookie[];
|
||||
socket: net.NodeSocket;
|
||||
|
||||
/**
|
||||
* List of strings that indicate the subprotocols the client would like to speak.
|
||||
* The server should select the best one that it can support from the list and
|
||||
@@ -171,6 +218,7 @@ declare module "websocket" {
|
||||
* converted to lower case.
|
||||
*/
|
||||
requestedProtocols: string[];
|
||||
protocolFullCaseMap: {[key: string]: string};
|
||||
|
||||
constructor(socket: net.NodeSocket, httpRequest: http.ClientRequest, config: IServerConfig);
|
||||
|
||||
@@ -181,7 +229,7 @@ declare module "websocket" {
|
||||
*
|
||||
* @param [acceptedProtocol] case-insensitive value that was requested by the client
|
||||
*/
|
||||
accept(acceptedProtocol?: string, allowedOrigin?: string, cookies?: any[]): connection;
|
||||
accept(acceptedProtocol?: string, allowedOrigin?: string, cookies?: ICookie[]): connection;
|
||||
|
||||
/**
|
||||
* Reject connection.
|
||||
@@ -206,6 +254,48 @@ declare module "websocket" {
|
||||
binaryData?: NodeBuffer;
|
||||
}
|
||||
|
||||
export interface IBufferList extends events.EventEmitter {
|
||||
encoding: string;
|
||||
length: number;
|
||||
write(buf: NodeBuffer): boolean;
|
||||
end(buf: NodeBuffer): void;
|
||||
|
||||
/**
|
||||
* For each buffer, perform some action.
|
||||
* If fn's result is a true value, cut out early.
|
||||
*/
|
||||
forEach(fn: (buf: NodeBuffer) => boolean): void;
|
||||
|
||||
/** Create a single buffer out of all the chunks */
|
||||
join(start: number, end: number): NodeBuffer;
|
||||
|
||||
/** Join all the chunks to existing buffer */
|
||||
joinInto(buf: NodeBuffer, offset: number, start: number, end: number): NodeBuffer;
|
||||
|
||||
/**
|
||||
* Advance the buffer stream by `n` bytes.
|
||||
* If `n` the aggregate advance offset passes the end of the buffer list,
|
||||
* operations such as `take` will return empty strings until enough data is pushed.
|
||||
*/
|
||||
advance(n: number): IBufferList;
|
||||
|
||||
/**
|
||||
* Take `n` bytes from the start of the buffers.
|
||||
* If there are less than `n` bytes in all the buffers or `n` is undefined,
|
||||
* returns the entire concatenated buffer string.
|
||||
*/
|
||||
take(n: number, encoding?: string): any;
|
||||
take(encoding?: string): any;
|
||||
|
||||
// Events
|
||||
on(event: string, listener: () => void): IBufferList;
|
||||
on(event: 'advance', cb: (n: number) => void): IBufferList;
|
||||
on(event: 'write', cb: (buf: NodeBuffer) => void): IBufferList;
|
||||
addListener(event: string, listener: () => void): IBufferList;
|
||||
addListener(event: 'advance', cb: (n: number) => void): IBufferList;
|
||||
addListener(event: 'write', cb: (buf: NodeBuffer) => void): IBufferList;
|
||||
}
|
||||
|
||||
class connection extends events.EventEmitter {
|
||||
static CLOSE_REASON_NORMAL: number;
|
||||
static CLOSE_REASON_GOING_AWAY: number;
|
||||
@@ -237,9 +327,26 @@ declare module "websocket" {
|
||||
*/
|
||||
protocol: string;
|
||||
|
||||
config: IConfig;
|
||||
socket: net.NodeSocket;
|
||||
maskOutgoingPackets: boolean;
|
||||
maskBytes: NodeBuffer;
|
||||
frameHeader: NodeBuffer;
|
||||
bufferList: IBufferList;
|
||||
currentFrame: frame;
|
||||
fragmentationSize: number;
|
||||
frameQueue: frame[];
|
||||
state: string;
|
||||
waitingForCloseResponse: boolean;
|
||||
closeTimeout: number;
|
||||
assembleFragments: number;
|
||||
maxReceivedMessageSize: number;
|
||||
outputPaused: boolean;
|
||||
bytesWaitingToFlush: number;
|
||||
socketHadError: boolean;
|
||||
|
||||
/** An array of extensions that were negotiated for this connection */
|
||||
extensions: any[];
|
||||
extensions: IExtension[];
|
||||
|
||||
/**
|
||||
* The IP address of the remote peer as a string. In the case of a server,
|
||||
@@ -254,8 +361,8 @@ declare module "websocket" {
|
||||
/** Whether or not the connection is still connected. Read-only */
|
||||
connected: boolean;
|
||||
|
||||
constructor(socket: net.NodeSocket, extensions: any[], protocol: string,
|
||||
maskOutgoingPackets: boolean, config: IServerConfig);
|
||||
constructor(socket: net.NodeSocket, extensions: IExtension[], protocol: string,
|
||||
maskOutgoingPackets: boolean, config: IConfig);
|
||||
|
||||
/**
|
||||
* Close the connection. A close frame will be sent to the remote peer indicating
|
||||
@@ -276,7 +383,7 @@ declare module "websocket" {
|
||||
* peer. If `config.fragmentOutgoingMessages` is true the message may be sent as
|
||||
* multiple fragments if it exceeds `config.fragmentationThreshold` bytes.
|
||||
*/
|
||||
sendUTF(data: {toString: (...args: any[]) => string}): void;
|
||||
sendUTF(data: IStringified): void;
|
||||
|
||||
/**
|
||||
* Immediately sends the specified Node Buffer object as a Binary WebSocket message
|
||||
@@ -287,11 +394,11 @@ declare module "websocket" {
|
||||
|
||||
/** Auto-detect the data type and send UTF-8 or Binary message */
|
||||
send(data: NodeBuffer): void;
|
||||
send(data: {toString: (...args: any[]) => string}): void;
|
||||
send(data: IStringified): void;
|
||||
|
||||
/** Sends a ping frame. Ping frames must not exceed 125 bytes in length. */
|
||||
ping(data: NodeBuffer): void;
|
||||
ping(data: {toString: (...args: any[]) => string}): void;
|
||||
ping(data: IStringified): void;
|
||||
|
||||
/**
|
||||
* Sends a pong frame. Pong frames may be sent unsolicited and such pong frames will
|
||||
@@ -310,6 +417,18 @@ declare module "websocket" {
|
||||
*/
|
||||
sendFrame(frame: frame): void;
|
||||
|
||||
/** Set or reset the `keepalive` timer when data is received */
|
||||
setKeepaliveTimer(): void;
|
||||
setGracePeriodTimer(): void;
|
||||
setCloseTimer(): void;
|
||||
clearCloseTimer(): void;
|
||||
processFrame(frame: frame): void;
|
||||
fragmentAndSend(frame: frame, cb?: (err: Error) => void): void;
|
||||
sendCloseFrame(reasonCode: number, reasonText: string, force: boolean): void;
|
||||
sendCloseFrame(): void;
|
||||
sendFrame(frame: frame, force: boolean, cb?: (msg: string) => void): void;
|
||||
sendFrame(frame: frame, cb?: (msg: string) => void): void;
|
||||
|
||||
// Events
|
||||
on(event: string, listener: () => void): connection;
|
||||
on(event: 'message', cb: (data: IMessage) => void): connection;
|
||||
@@ -376,9 +495,22 @@ declare module "websocket" {
|
||||
* Even text frames are sent with a Buffer providing the binary payload data.
|
||||
*/
|
||||
binaryPayload: NodeBuffer;
|
||||
|
||||
maskBytes: NodeBuffer;
|
||||
frameHeader: NodeBuffer;
|
||||
config: IConfig;
|
||||
maxReceivedFrameSize: number;
|
||||
protocolError: boolean;
|
||||
frameTooLarge: boolean;
|
||||
invalidCloseFrameLength: boolean;
|
||||
closeStatus: number;
|
||||
|
||||
addData(bufferList: IBufferList): boolean;
|
||||
throwAwayPayload(bufferList: IBufferList): boolean;
|
||||
toBuffer(nullMask: boolean): NodeBuffer;
|
||||
}
|
||||
|
||||
export interface IClientConfig {
|
||||
export interface IClientConfig extends IConfig {
|
||||
/**
|
||||
* Which version of the WebSocket protocol to use when making the connection.
|
||||
* Currently supported values are 8 and 13. This option will be removed once the
|
||||
@@ -387,54 +519,30 @@ declare module "websocket" {
|
||||
* the name of the Origin header.
|
||||
* @default 13
|
||||
*/
|
||||
webSocketVersion: number;
|
||||
webSocketVersion?: number;
|
||||
|
||||
/**
|
||||
* The maximum allowed received frame size in bytes.
|
||||
* Single frame messages will also be limited to this maximum.
|
||||
* @default 1MiB
|
||||
*/
|
||||
maxReceivedFrameSize: number;
|
||||
maxReceivedFrameSize?: number;
|
||||
|
||||
/**
|
||||
* The maximum allowed aggregate message size (for fragmented messages) in bytes.
|
||||
* @default 8MiB
|
||||
*/
|
||||
maxReceivedMessageSize: number;
|
||||
|
||||
/**
|
||||
* Whether or not to fragment outgoing messages. If true, messages will be
|
||||
* automatically fragmented into chunks of up to `fragmentationThreshold` bytes.
|
||||
* @default true
|
||||
*/
|
||||
fragmentOutgoingMessages: boolean;
|
||||
|
||||
/**
|
||||
* The maximum size of a frame in bytes before it is automatically fragmented.
|
||||
* @default 16KiB
|
||||
*/
|
||||
fragmentationThreshold: number;
|
||||
|
||||
/**
|
||||
* If true, fragmented messages will be automatically assembled and the full message
|
||||
* will be emitted via a `message` event. If false, each frame will be emitted on
|
||||
* the `connection` object via a `frame` event and the application will be responsible
|
||||
* for aggregating multiple fragmented frames. Single-frame messages will emit
|
||||
* a `message` event in addition to the `frame` event. Most users will want to
|
||||
* leave this set to true.
|
||||
* @default true
|
||||
*/
|
||||
assembleFragments: boolean;
|
||||
|
||||
/**
|
||||
* The number of milliseconds to wait after sending a close frame for
|
||||
* an acknowledgement to come back before giving up and just closing the socket.
|
||||
* @default 5000
|
||||
*/
|
||||
closeTimeout: number;
|
||||
maxReceivedMessageSize?: number;
|
||||
}
|
||||
|
||||
class client extends events.EventEmitter {
|
||||
protocols: string[];
|
||||
origin: string;
|
||||
url: url.Url;
|
||||
secure: boolean;
|
||||
socket: net.NodeSocket;
|
||||
response: http.ClientResponse;
|
||||
|
||||
constructor(clientConfig?: IClientConfig);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user