diff --git a/accepts/index.d.ts b/accepts/index.d.ts index 8b5817ce3f..ff6a9d0995 100644 --- a/accepts/index.d.ts +++ b/accepts/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for accepts +// Type definitions for accepts 1.3 // Project: https://github.com/jshttp/accepts // Definitions by: Stefan Reichel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/angular-spinner/angular-spinner-tests.ts b/angular-spinner/angular-spinner-tests.ts index 9ac20eed0c..c8d9e42479 100644 --- a/angular-spinner/angular-spinner-tests.ts +++ b/angular-spinner/angular-spinner-tests.ts @@ -1,4 +1,4 @@ - +/// var myApp = angular.module('testModule'); diff --git a/angular-spinner/index.d.ts b/angular-spinner/index.d.ts index e81901ef90..e7710e60e2 100644 --- a/angular-spinner/index.d.ts +++ b/angular-spinner/index.d.ts @@ -3,23 +3,21 @@ // Definitions by: Marcin BiegaƂa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - /** -* 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; diff --git a/angulartics/angulartics-tests.ts b/angulartics/angulartics-tests.ts index a7d8ba5971..02888b0cc5 100644 --- a/angulartics/angulartics-tests.ts +++ b/angulartics/angulartics-tests.ts @@ -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' }); + }); } diff --git a/angulartics/index.d.ts b/angulartics/index.d.ts index 11938c9679..561da3cfad 100644 --- a/angulartics/index.d.ts +++ b/angulartics/index.d.ts @@ -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 // 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: { diff --git a/auth0-js/index.d.ts b/auth0-js/index.d.ts index e2a907e084..2907eba686 100644 --- a/auth0-js/index.d.ts +++ b/auth0-js/index.d.ts @@ -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; diff --git a/bootstrap.timepicker/index.d.ts b/bootstrap.timepicker/index.d.ts index b1325323af..417f385526 100644 --- a/bootstrap.timepicker/index.d.ts +++ b/bootstrap.timepicker/index.d.ts @@ -5,9 +5,12 @@ /// -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; } diff --git a/ej.web.all/index.d.ts b/ej.web.all/index.d.ts index a795127c2d..1fb6a01302 100644 --- a/ej.web.all/index.d.ts +++ b/ej.web.all/index.d.ts @@ -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; } diff --git a/elastic.js/index.d.ts b/elastic.js/index.d.ts index 9bf5f6a9dc..99a45f58fa 100644 --- a/elastic.js/index.d.ts +++ b/elastic.js/index.d.ts @@ -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; } diff --git a/gapi.auth2/index.d.ts b/gapi.auth2/index.d.ts index 3613febb09..593cae78d8 100644 --- a/gapi.auth2/index.d.ts +++ b/gapi.auth2/index.d.ts @@ -103,6 +103,8 @@ declare namespace gapi.auth2 { export interface BasicProfile { getId(): string; getName(): string; + getGivenName(): string; + getFamilyName(): string; getImageUrl(): string; getEmail(): string; } diff --git a/greensock/index.d.ts b/greensock/index.d.ts index 881fb1cd92..65f7ee52e7 100644 --- a/greensock/index.d.ts +++ b/greensock/index.d.ts @@ -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; diff --git a/halogen/index.d.ts b/halogen/index.d.ts index 909812ff4b..5a6448899c 100644 --- a/halogen/index.d.ts +++ b/halogen/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for halogen +// Type definitions for halogen 0.2 // Project: https://github.com/yuanyan/halogen // Definitions by: Vincent Rouffiat // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/johnny-five/index.d.ts b/johnny-five/index.d.ts index 8f480c5e3e..c5e058c335 100644 --- a/johnny-five/index.d.ts +++ b/johnny-five/index.d.ts @@ -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; raw: Array; @@ -468,9 +468,9 @@ export declare class Sensor { scale(): Sensor; booleanAt(barrier: number): boolean; within(range: Array, 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, cb: () => void): void; within(range: Array, 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, cb: () => void): void; within(range: Array, 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; } diff --git a/johnny-five/johnny-five-tests.ts b/johnny-five/johnny-five-tests.ts index 919f1fd7d5..da5cff19f6 100644 --- a/johnny-five/johnny-five-tests.ts +++ b/johnny-five/johnny-five-tests.ts @@ -250,4 +250,6 @@ board.on('ready', function(){ return (raw / 100) + 10; } }); +}).on("ready", function(){ + console.log("Everything is ready!!!"); }); diff --git a/jquery-steps/index.d.ts b/jquery-steps/index.d.ts index 4fea4af113..6abe640417 100644 --- a/jquery-steps/index.d.ts +++ b/jquery-steps/index.d.ts @@ -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 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Updated by: Nicholas Wong 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; diff --git a/jquery-steps/jquery-steps-tests.ts b/jquery-steps/jquery-steps-tests.ts index 09b91025ff..35346d1f7b 100644 --- a/jquery-steps/jquery-steps-tests.ts +++ b/jquery-steps/jquery-steps-tests.ts @@ -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: '
Content
', diff --git a/jquery.validation/index.d.ts b/jquery.validation/index.d.ts index 76658df4c0..953755a065 100644 --- a/jquery.validation/index.d.ts +++ b/jquery.validation/index.d.ts @@ -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!". */ diff --git a/kendo-ui/index.d.ts b/kendo-ui/index.d.ts index fb033d78ec..00f11b029e 100644 --- a/kendo-ui/index.d.ts +++ b/kendo-ui/index.d.ts @@ -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 // 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 { diff --git a/localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts b/localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts index 6d853d4926..8778e6ac16 100644 --- a/localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts +++ b/localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts @@ -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; }); diff --git a/localforage/index.d.ts b/localforage/index.d.ts index 26269682c8..d0194ec60f 100644 --- a/localforage/index.d.ts +++ b/localforage/index.d.ts @@ -41,7 +41,7 @@ interface LocalForageDbMethods { iterate(iteratee: (value: any, key: string, iterationNumber: number) => any): Promise; 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(value: T | ArrayBuffer | Blob, callback: (value: string, error: any) => {}): void; + serialize(value: T | ArrayBuffer | Blob, callback: (value: string, error: any) => void): void; deserialize(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; setDriver(driver: string | string[], callback: () => void, errorCallback: (error: any) => void): void; defineDriver(driver: LocalForageDriver): Promise; 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; getSerializer(): Promise; getSerializer(callback: (serializer: LocalForageSerializer) => void): void; supports(driverName: string): boolean; + + ready(callback: () => void): void; + ready(): Promise; } declare module "localforage" { diff --git a/localforage/localForage-tests.ts b/localforage/localForage-tests.ts index 721db8ba86..6279cbdf89 100644 --- a/localforage/localForage-tests.ts +++ b/localforage/localForage-tests.ts @@ -105,4 +105,13 @@ namespace LocalForageTest { testSerializer = serializer; }); } + + { + let store: LocalForage; + + store.ready() + .then(() => {}); + + store.ready(() => {}); + } } \ No newline at end of file diff --git a/lovefield/index.d.ts b/lovefield/index.d.ts index 23fec53b2b..14c010dc4f 100644 --- a/lovefield/index.d.ts +++ b/lovefield/index.d.ts @@ -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 storeType?: DataStoreType diff --git a/lovefield/lovefield-tests.ts b/lovefield/lovefield-tests.ts index 11b67cab03..3535775d1b 100644 --- a/lovefield/lovefield-tests.ts +++ b/lovefield/lovefield-tests.ts @@ -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 = (itemSchema).done; + var column = itemSchema['done']; return todoDb.select().from(itemSchema).where(column.eq(false)).exec(); }).then( function(results) { diff --git a/materialize-css/index.d.ts b/materialize-css/index.d.ts index 35e70b49e6..14e68a7c21 100644 --- a/materialize-css/index.d.ts +++ b/materialize-css/index.d.ts @@ -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. diff --git a/materialize-css/materialize-css-tests.ts b/materialize-css/materialize-css-tests.ts index 3f8358ce73..45c9c84a76 100644 --- a/materialize-css/materialize-css-tests.ts +++ b/materialize-css/materialize-css-tests.ts @@ -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"); diff --git a/mongoose/README.md b/mongoose/README.md index 9a49572f9c..8684f7f2b6 100644 --- a/mongoose/README.md +++ b/mongoose/README.md @@ -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 `/// ` 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 } diff --git a/node/index.d.ts b/node/index.d.ts index b41a3e5ab3..340ecbc6f2 100644 --- a/node/index.d.ts +++ b/node/index.d.ts @@ -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; diff --git a/node/node-0.10.d.ts b/node/node-0.10.d.ts index 5192f33457..b277749fb2 100644 --- a/node/node-0.10.d.ts +++ b/node/node-0.10.d.ts @@ -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; diff --git a/node/node-0.11.d.ts b/node/node-0.11.d.ts index d153a11f7e..22a94069a6 100644 --- a/node/node-0.11.d.ts +++ b/node/node-0.11.d.ts @@ -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; diff --git a/node/node-0.12.d.ts b/node/node-0.12.d.ts index 511ecc6e6a..a31c58363e 100644 --- a/node/node-0.12.d.ts +++ b/node/node-0.12.d.ts @@ -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; diff --git a/node/node-0.8.8.d.ts b/node/node-0.8.8.d.ts index 7bf214b781..fa03e382ac 100644 --- a/node/node-0.8.8.d.ts +++ b/node/node-0.8.8.d.ts @@ -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; diff --git a/node/node-4.d.ts b/node/node-4.d.ts index 854588e835..f762544aee 100644 --- a/node/node-4.d.ts +++ b/node/node-4.d.ts @@ -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; diff --git a/office-js/index.d.ts b/office-js/index.d.ts index cae1dedcae..65567403fd 100644 --- a/office-js/index.d.ts +++ b/office-js/index.d.ts @@ -10335,12 +10335,12 @@ declare module Excel { //////////////////////////////////////////////////////////////// -declare namespace Word { +declare module Word { /** * * The Application object. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.3] */ class Application extends OfficeExtension.ClientObject { /** @@ -10349,13 +10349,14 @@ declare namespace Word { * * @param base64File Optional. The base64 encoded .docx file. The default value is null. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.3] */ createDocument(base64File?: string): Word.Document; /** * Create a new instance of Word.Application object */ static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; + toJSON(): {}; } /** * @@ -10364,18 +10365,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Body extends OfficeExtension.ClientObject { - private m_contentControls; - private m_font; - private m_inlinePictures; - private m_lists; - private m_paragraphs; - private m_parentBody; - private m_parentContentControl; - private m_style; - private m_tables; - private m_text; - private m_type; - private m__ReferenceId; /** * * Gets the collection of rich text content control objects in the body. Read-only. @@ -10401,7 +10390,7 @@ declare namespace Word { * * Gets the collection of list objects in the body. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ lists: Word.ListCollection; /** @@ -10415,30 +10404,44 @@ declare namespace Word { * * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentBody: Word.Body; /** * - * Gets the content control that contains the body. Returns null if there isn't a parent content control. Read-only. + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; + /** + * + * Gets the parent section of the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentSection: Word.Section; /** * * Gets the collection of table objects in the body. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ tables: Word.TableCollection; /** * - * Gets or sets the style used for the body. This is the name of the pre-installed or custom style. + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * [Api set: WordApi 1.1] */ style: string; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: string; /** * * Gets the text of the body. Use the insertText method to insert text. Read-only. @@ -10450,7 +10453,7 @@ declare namespace Word { * * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ type: string; /** @@ -10478,9 +10481,9 @@ declare namespace Word { * * Gets the whole body, or the starting or ending point of the body, as a range. * - * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ getRange(rangeLocation?: string): Word.Range; /** @@ -10559,7 +10562,7 @@ declare namespace Word { * @param insertLocation Required. The value can be 'Start' or 'End'. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; /** @@ -10586,11 +10589,10 @@ declare namespace Word { ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; - matchSoundsLike?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; - }): Word.SearchResultCollection; + }): Word.RangeCollection; /** * * Selects the body and navigates the Word UI to it. @@ -10604,6 +10606,21 @@ declare namespace Word { * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Body; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Body; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Body; + toJSON(): { + "font": Font; + "style": string; + "styleBuiltIn": string; + "text": string; + "type": string; + }; } /** * @@ -10612,29 +10629,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class ContentControl extends OfficeExtension.ClientObject { - private m_appearance; - private m_cannotDelete; - private m_cannotEdit; - private m_color; - private m_contentControls; - private m_font; - private m_id; - private m_inlinePictures; - private m_lists; - private m_paragraphs; - private m_parentContentControl; - private m_parentTable; - private m_parentTableCell; - private m_placeholderText; - private m_removeWhenEdited; - private m_style; - private m_subtype; - private m_tables; - private m_tag; - private m_text; - private m_title; - private m_type; - private m__ReferenceId; /** * * Gets the collection of content control objects in the content control. Read-only. @@ -10660,7 +10654,7 @@ declare namespace Word { * * Gets the collection of list objects in the content control. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ lists: Word.ListCollection; /** @@ -10672,30 +10666,37 @@ declare namespace Word { paragraphs: Word.ParagraphCollection; /** * - * Gets the content control that contains the content control. Returns null if there isn't a parent content control. Read-only. + * Gets the parent body of the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody: Word.Body; + /** + * + * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; /** * - * Gets the table that contains the content control. Returns null if it is not contained in a table. Read-only. + * Gets the table that contains the content control. Returns a null object if it is not contained in a table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTable: Word.Table; /** * - * Gets the table cell that contains the content control. Returns null if it is not contained in a table cell. Read-only. + * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTableCell: Word.TableCell; /** * * Gets the collection of table objects in the content control. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ tables: Word.TableCollection; /** @@ -10749,16 +10750,23 @@ declare namespace Word { removeWhenEdited: boolean; /** * - * Gets or sets the style used for the content control. This is the name of the pre-installed or custom style. + * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * [Api set: WordApi 1.1] */ style: string; + /** + * + * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: string; /** * * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ subtype: string; /** @@ -10823,21 +10831,21 @@ declare namespace Word { * * Gets the whole content control, or the starting or ending point of the content control, as a range. * - * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. + * @param rangeLocation Optional. The range location can be 'Whole', 'Before', 'Start', 'End', 'After' or 'Content'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ getRange(rangeLocation?: string): Word.Range; /** * - * Gets the text ranges in the content control by using punctuation marks and/or space character. + * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. * - * @param punctuationMarks Required. The punctuation marks and/or space character as an array of strings. + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getTextRanges(punctuationMarks: Array, trimSpacing?: boolean): Word.RangeCollection; + getTextRanges(endingMarks: Array, trimSpacing?: boolean): Word.RangeCollection; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. @@ -10907,7 +10915,7 @@ declare namespace Word { * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; /** @@ -10934,11 +10942,10 @@ declare namespace Word { ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; - matchSoundsLike?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; - }): Word.SearchResultCollection; + }): Word.RangeCollection; /** * * Selects the content control. This causes Word to scroll to the selection. @@ -10957,31 +10964,46 @@ declare namespace Word { * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ split(delimiters: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.ContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ContentControl; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ContentControl; + toJSON(): { + "appearance": string; + "cannotDelete": boolean; + "cannotEdit": boolean; + "color": string; + "font": Font; + "id": number; + "placeholderText": string; + "removeWhenEdited": boolean; + "style": string; + "styleBuiltIn": string; + "subtype": string; + "tag": string; + "text": string; + "title": string; + "type": string; + }; } /** * - * Contains a collection of ContentControl objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. + * Contains a collection of [contentControl](contentControl.md) objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. * * [Api set: WordApi 1.1] */ class ContentControlCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first content control in this collection. Read-only. - * - * [Api set: WordApiDesktop 1.3 Beta] - */ - first: Word.ContentControl; /** Gets the loaded child items in this collection. */ items: Array; /** @@ -11017,14 +11039,21 @@ declare namespace Word { * * @param types Required. An array of content control types and/or subtypes. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.3] */ getByTypes(types: Array): Word.ContentControlCollection; + /** + * + * Gets the first content control in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.ContentControl; /** * * Gets a content control by its index in the collection. * - * @param index The index + * @param index The index. * * [Api set: WordApi 1.1] */ @@ -11033,6 +11062,124 @@ declare namespace Word { * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.ContentControlCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ContentControlCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ContentControlCollection; + toJSON(): {}; + } + /** + * + * Represents a custom property. + * + * [Api set: WordApi 1.3] + */ + class CustomProperty extends OfficeExtension.ClientObject { + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + key: string; + /** + * + * Gets the value type of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + type: string; + /** + * + * Gets or sets the value of the custom property. + * + * [Api set: WordApi 1.3] + */ + value: any; + /** + * + * Deletes the custom property. + * + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.CustomProperty; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.CustomProperty; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.CustomProperty; + toJSON(): { + "key": string; + "type": string; + "value": any; + }; + } + /** + * + * Contains the collection of [customProperty](customProperty.md) objects. + * + * [Api set: WordApi 1.3] + */ + class CustomPropertyCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + items: Array; + /** + * + * Deletes all custom properties in this collection. + * + * [Api set: WordApi 1.3] + */ + deleteAll(): void; + /** + * + * Gets the count of custom properties. + * + * [Api set: WordApi 1.3] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom property object by its key, which is case-insensitive. + * + * @param key The key that identifies the custom property object. + * + * [Api set: WordApi 1.3] + */ + getItem(key: string): Word.CustomProperty; + /** + * + * Creates or sets a custom property. + * + * @param key Required. The custom property's key, which is case-insensitive. + * @param value Required. The custom property's value. + * + * [Api set: WordApi 1.3] + */ + set(key: string, value: any): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.CustomPropertyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.CustomPropertyCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.CustomPropertyCollection; + toJSON(): {}; } /** * @@ -11041,11 +11188,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Document extends OfficeExtension.ClientObject { - private m_body; - private m_contentControls; - private m_saved; - private m_sections; - private m__ReferenceId; /** * * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. @@ -11060,6 +11202,13 @@ declare namespace Word { * [Api set: WordApi 1.1] */ contentControls: Word.ContentControlCollection; + /** + * + * Gets the properties of the current document. Read-only. + * + * [Api set: WordApi 1.3] + */ + properties: Word.DocumentProperties; /** * * Gets the collection of section objects in the document. Read-only. @@ -11085,7 +11234,7 @@ declare namespace Word { * * Open the document. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.3] */ open(): void; /** @@ -11099,6 +11248,184 @@ declare namespace Word { * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Document; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Document; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Document; + toJSON(): { + "body": Body; + "properties": DocumentProperties; + "saved": boolean; + }; + } + /** + * + * Represents document properties. + * + * [Api set: WordApi 1.3] + */ + class DocumentProperties extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of custom properties of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + customProperties: Word.CustomPropertyCollection; + /** + * + * Gets the application name of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + applicationName: string; + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author: string; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category: string; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments: string; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company: string; + /** + * + * Gets the creation date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + creationDate: Date; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format: string; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords: string; + /** + * + * Gets or sets the last author of the document. + * + * [Api set: WordApi 1.3] + */ + lastAuthor: string; + /** + * + * Gets the last print date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastPrintDate: Date; + /** + * + * Gets the last save time of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastSaveTime: Date; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager: string; + /** + * + * Gets the revision number of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + revisionNumber: string; + /** + * + * Gets the security of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + security: number; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject: string; + /** + * + * Gets the template of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + template: string; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title: string; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.DocumentProperties; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.DocumentProperties; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.DocumentProperties; + toJSON(): { + "applicationName": string; + "author": string; + "category": string; + "comments": string; + "company": string; + "creationDate": Date; + "format": string; + "keywords": string; + "lastAuthor": string; + "lastPrintDate": Date; + "lastSaveTime": Date; + "manager": string; + "revisionNumber": string; + "security": number; + "subject": string; + "template": string; + "title": string; + }; } /** * @@ -11107,18 +11434,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Font extends OfficeExtension.ClientObject { - private m_bold; - private m_color; - private m_doubleStrikeThrough; - private m_highlightColor; - private m_italic; - private m_name; - private m_size; - private m_strikeThrough; - private m_subscript; - private m_superscript; - private m_underline; - private m__ReferenceId; /** * * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. @@ -11137,12 +11452,12 @@ declare namespace Word { * * Gets or sets a value that indicates whether the font has a double strike through. True if the font is formatted as double strikethrough text, otherwise, false. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.1] */ doubleStrikeThrough: boolean; /** * - * Gets or sets the highlight color for the specified font. You can provide the value as either in the '#RRGGBB' format or the color name. + * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, or an empty string for mixed highlight colors, or null for no highlight color. * * [Api set: WordApi 1.1] */ @@ -11200,6 +11515,27 @@ declare namespace Word { * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Font; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Font; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Font; + toJSON(): { + "bold": boolean; + "color": string; + "doubleStrikeThrough": boolean; + "highlightColor": string; + "italic": boolean; + "name": string; + "size": number; + "strikeThrough": boolean; + "subscript": boolean; + "superscript": boolean; + "underline": string; + }; } /** * @@ -11208,53 +11544,32 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class InlinePicture extends OfficeExtension.ClientObject { - private m_altTextDescription; - private m_altTextTitle; - private m_height; - private m_hyperlink; - private m_imageFormat; - private m_lockAspectRatio; - private m_next; - private m_paragraph; - private m_parentContentControl; - private m_parentTable; - private m_parentTableCell; - private m_width; - private m__Id; - private m__ReferenceId; /** * - * Gets the next inline image. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - next: Word.InlinePicture; - /** - * - * Gets the paragraph that contains the inline image. Read-only. + * Gets the parent paragraph that contains the inline image. Read-only. * * [Api set: WordApi 1.2] */ paragraph: Word.Paragraph; /** * - * Gets the content control that contains the inline image. Returns null if there isn't a parent content control. Read-only. + * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; /** * - * Gets the table that contains the inline image. Returns null if it is not contained in a table. Read-only. + * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTable: Word.Table; /** * - * Gets the table cell that contains the inline image. Returns null if it is not contained in a table cell. Read-only. + * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTableCell: Word.TableCell; /** @@ -11280,18 +11595,11 @@ declare namespace Word { height: number; /** * - * Gets or sets the hyperlink associated with the inline image. + * Gets or sets a hyperlink on the image. Use a newline character ('\n') to separate the address part from the optional location part. * * [Api set: WordApi 1.1] */ hyperlink: string; - /** - * - * Gets the format of the inline image. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - imageFormat: string; /** * * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. @@ -11320,13 +11628,20 @@ declare namespace Word { * [Api set: WordApi 1.1] */ getBase64ImageSrc(): OfficeExtension.ClientResult; + /** + * + * Gets the next inline image. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.InlinePicture; /** * * Gets the picture, or the starting or ending point of the picture, as a range. * * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ getRange(rangeLocation?: string): Word.Range; /** @@ -11419,6 +11734,22 @@ declare namespace Word { * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.InlinePicture; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.InlinePicture; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.InlinePicture; + toJSON(): { + "altTextDescription": string; + "altTextTitle": string; + "height": number; + "hyperlink": string; + "lockAspectRatio": boolean; + "width": number; + }; } /** * @@ -11427,56 +11758,82 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class InlinePictureCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first inline image in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.InlinePicture; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * Gets the first inline image in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.InlinePicture; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.InlinePictureCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.InlinePictureCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.InlinePictureCollection; + toJSON(): {}; } /** * * Contains a collection of [paragraph](paragraph.md) objects. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class List extends OfficeExtension.ClientObject { - private m_format; - private m_id; - private m__ReferenceId; /** * - * An object that represents the list format. + * Gets paragraphs in the list. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - format: Word.ListFormat; + paragraphs: Word.ParagraphCollection; /** * * Gets the list's id. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ id: number; /** * - * Gets the paragraphs in the list. + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. * - * @param topLevelOnly Optional. Indicates whether to get all paragraphs, or just the top level paragraphs. The default is false that specifies to get all paragraphs. - * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getParagraphs(topLevelOnly?: boolean): Word.ParagraphCollection; + levelExistences: Array; + /** + * + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number' or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes: Array; + /** + * + * Gets the paragraphs that occur at the specified level in the list. + * + * @param level Required. The level in the list. + * + * [Api set: WordApi 1.3] + */ + getLevelParagraphs(level: number): Word.ParagraphCollection; + /** + * + * Gets the bullet, number or picture at the specified level as a string. + * + * @param level Required. The level in the list. + * + * [Api set: WordApi 1.3] + */ + getLevelString(level: number): OfficeExtension.ClientResult; /** * * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. @@ -11484,31 +11841,88 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + /** + * + * Sets the alignment of the bullet, number or picture at the specified level in the list. + * + * @param level Required. The level in the list. + * @param alignment Required. The level alignment that can be 'left', 'centered' or 'right'. + * + * [Api set: WordApi 1.3] + */ + setLevelAlignment(level: number, alignment: string): void; + /** + * + * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. + * + * @param level Required. The level in the list. + * @param listBullet Required. The bullet. + * @param charCode Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + * @param fontName Optional. The bullet's font name. Used only if the bullet is 'Custom'. + * + * [Api set: WordApi 1.3] + */ + setLevelBullet(level: number, listBullet: string, charCode?: number, fontName?: string): void; + /** + * + * Sets the two indents of the specified level in the list. + * + * @param level Required. The level in the list. + * @param textIndent Required. The text indent in points. It is the same as paragraph left indent. + * @param textIndent Required. The relative indent, in points, of the bullet, number or picture. It is the same as paragraph first line indent. + * + * [Api set: WordApi 1.3] + */ + setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; + /** + * + * Sets the numbering format at the specified level in the list. + * + * @param level Required. The level in the list. + * @param listNumbering Required. The ordinal format. + * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. + * + * [Api set: WordApi 1.3] + */ + setLevelNumbering(level: number, listNumbering: string, formatString?: Array): void; + /** + * + * Sets the starting number at the specified level in the list. Default value is 1. + * + * @param level Required. The level in the list. + * @param startingNumber Required. The number to start with. + * + * [Api set: WordApi 1.3] + */ + setLevelStartingNumber(level: number, startingNumber: number): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.List; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.List; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.List; + toJSON(): { + "id": number; + "levelExistences": boolean[]; + "levelTypes": string[]; + }; } /** * * Contains a collection of [list](list.md) objects. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class ListCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first list in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.List; /** Gets the loaded child items in this collection. */ items: Array; /** @@ -11517,57 +11931,65 @@ declare namespace Word { * * @param id Required. A list identifier. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ getById(id: number): Word.List; + /** + * + * Gets the first list in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.List; + /** + * + * Gets a list object by its index in the collection. + * + * @param index A number that identifies the index location of a list object. + * + * [Api set: WordApi 1.3] + */ + getItem(index: number): Word.List; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListCollection; - } - /** - * - * Represents a list's format. - * - * [Api set: WordApi 1.3 Beta] - */ - class ListFormat extends OfficeExtension.ClientObject { - private m_levelTypes; - private m__ReferenceId; /** - * - * Gets all 9 level types in the list. Read-only. - * - * [Api set: WordApi 1.3 Beta] + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ - levelTypes: Array; + track(): Word.ListCollection; /** - * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListFormat; + untrack(): Word.ListCollection; + toJSON(): {}; } /** * * Represents the paragraph list item format. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class ListItem extends OfficeExtension.ClientObject { - private m_listString; - private m_siblingIndex; - private m__ReferenceId; /** * - * Gets the list item bullet or number as a string. Read-only. + * Gets or sets the level of the item in the list. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] + */ + level: number; + /** + * + * Gets the list item bullet, number or picture as a string. Read-only. + * + * [Api set: WordApi 1.3] */ listString: string; /** * * Gets the list item order number in relation to its siblings. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ siblingIndex: number; /** @@ -11576,7 +11998,7 @@ declare namespace Word { * * @param parentOnly Optional. Specified only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.3] */ getAncestor(parentOnly?: boolean): Word.Paragraph; /** @@ -11585,13 +12007,26 @@ declare namespace Word { * * @param directChildrenOnly Optional. Specified only the list item's direct children will be returned. The default is false that indicates to get all descendant items. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.3] */ getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ListItem; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ListItem; + toJSON(): { + "level": number; + "listString": string; + "siblingIndex": number; + }; } /** * @@ -11600,33 +12035,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Paragraph extends OfficeExtension.ClientObject { - private m_alignment; - private m_contentControls; - private m_firstLineIndent; - private m_font; - private m_inlinePictures; - private m_leftIndent; - private m_lineSpacing; - private m_lineUnitAfter; - private m_lineUnitBefore; - private m_list; - private m_listItem; - private m_listLevel; - private m_next; - private m_outlineLevel; - private m_parentBody; - private m_parentContentControl; - private m_parentTable; - private m_parentTableCell; - private m_previous; - private m_rightIndent; - private m_spaceAfter; - private m_spaceBefore; - private m_style; - private m_tableNestingLevel; - private m_text; - private m__Id; - private m__ReferenceId; /** * * Gets the collection of content control objects in the paragraph. Read-only. @@ -11650,63 +12058,49 @@ declare namespace Word { inlinePictures: Word.InlinePictureCollection; /** * - * Gets the List to which this paragraph belongs. Returns null if the paragraph is not in a list. + * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ list: Word.List; /** * - * Gets the ListItem for the paragraph. Returns null if the paragraph is not part of a list. + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ listItem: Word.ListItem; - /** - * - * Gets the next paragraph. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - next: Word.Paragraph; /** * * Gets the parent body of the paragraph. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentBody: Word.Body; /** * - * Gets the content control that contains the paragraph. Returns null if there isn't a parent content control. Read-only. + * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; /** * - * Gets the table that contains the paragraph. Returns null if it is not contained in a table. Read-only. + * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTable: Word.Table; /** * - * Gets the table cell that contains the paragraph. Returns null if it is not contained in a table cell. Read-only. + * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTableCell: Word.TableCell; /** * - * Gets the previous paragraph. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - previous: Word.Paragraph; - /** - * - * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. * * [Api set: WordApi 1.1] */ @@ -11718,6 +12112,20 @@ declare namespace Word { * [Api set: WordApi 1.1] */ firstLineIndent: number; + /** + * + * Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph: boolean; + /** + * + * Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem: boolean; /** * * Gets or sets the left indent value, in points, for the paragraph. @@ -11746,18 +12154,11 @@ declare namespace Word { * [Api set: WordApi 1.1] */ lineUnitBefore: number; - /** - * - * Gets or sets the list level of the paragraph. Set to -1 to make the paragraph appear outside of a list. - * - * [Api set: WordApi 1.3 Beta] - */ - listLevel: number; /** * * Gets or sets the outline level for the paragraph. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.1] */ outlineLevel: number; /** @@ -11783,16 +12184,23 @@ declare namespace Word { spaceBefore: number; /** * - * Gets or sets the style used for the paragraph. This is the name of the pre-installed or custom style. + * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * [Api set: WordApi 1.1] */ style: string; + /** + * + * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: string; /** * * Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ tableNestingLevel: number; /** @@ -11802,6 +12210,16 @@ declare namespace Word { * [Api set: WordApi 1.1] */ text: string; + /** + * + * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. + * + * @param listId Required. The ID of an existing list. + * @param level Required. The level in the list. + * + * [Api set: WordApi 1.3] + */ + attachToList(listId: number, level: number): Word.List; /** * * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. @@ -11816,6 +12234,13 @@ declare namespace Word { * [Api set: WordApi 1.1] */ delete(): void; + /** + * + * Moves this paragraph out of its list, if the paragraph is a list item. + * + * [Api set: WordApi 1.3] + */ + detachFromList(): void; /** * * Gets the HTML representation of the paragraph object. @@ -11823,6 +12248,13 @@ declare namespace Word { * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; + /** + * + * Gets the next paragraph. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.Paragraph; /** * * Gets the Office Open XML (OOXML) representation of the paragraph object. @@ -11830,25 +12262,32 @@ declare namespace Word { * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; + /** + * + * Gets the previous paragraph. + * + * [Api set: WordApi 1.3] + */ + getPrevious(): Word.Paragraph; /** * * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. * - * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ getRange(rangeLocation?: string): Word.Range; /** * - * Gets the text ranges in the paragraph by using punctuation marks and/or space character. + * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. * - * @param punctuationMarks Required. The punctuation marks and/or space character as an array of strings. + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getTextRanges(punctuationMarks: Array, trimSpacing?: boolean): Word.RangeCollection; + getTextRanges(endingMarks: Array, trimSpacing?: boolean): Word.RangeCollection; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. @@ -11925,7 +12364,7 @@ declare namespace Word { * @param insertLocation Required. The value can be 'Before' or 'After'. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; /** @@ -11952,11 +12391,10 @@ declare namespace Word { ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; - matchSoundsLike?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; - }): Word.SearchResultCollection; + }): Word.RangeCollection; /** * * Selects and navigates the Word UI to the paragraph. @@ -11974,20 +12412,48 @@ declare namespace Word { * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ split(delimiters: Array, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; /** * - * Uses the paragraph to start a new list. + * Starts a new list with this paragraph. Fails if the paragraph is already a list item. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ startNewList(): Word.List; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Paragraph; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Paragraph; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Paragraph; + toJSON(): { + "alignment": string; + "firstLineIndent": number; + "font": Font; + "isLastParagraph": boolean; + "isListItem": boolean; + "leftIndent": number; + "lineSpacing": number; + "lineUnitAfter": number; + "lineUnitBefore": number; + "listItem": ListItem; + "outlineLevel": number; + "rightIndent": number; + "spaceAfter": number; + "spaceBefore": number; + "style": string; + "styleBuiltIn": string; + "tableNestingLevel": number; + "text": string; + }; } /** * @@ -11996,30 +12462,35 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class ParagraphCollection extends OfficeExtension.ClientObject { - private m_first; - private m_last; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first paragraph in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.Paragraph; - /** - * - * Gets the last paragraph in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - last: Word.Paragraph; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * Gets the first paragraph in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Paragraph; + /** + * + * Gets the last paragraph in this collection. + * + * [Api set: WordApi 1.3] + */ + getLast(): Word.Paragraph; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ParagraphCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ParagraphCollection; + toJSON(): {}; } /** * @@ -12028,22 +12499,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Range extends OfficeExtension.ClientObject { - private m_contentControls; - private m_font; - private m_hyperlink; - private m_inlinePictures; - private m_isEmpty; - private m_lists; - private m_paragraphs; - private m_parentBody; - private m_parentContentControl; - private m_parentTable; - private m_parentTableCell; - private m_style; - private m_tables; - private m_text; - private m__Id; - private m__ReferenceId; /** * * Gets the collection of content control objects in the range. Read-only. @@ -12069,7 +12524,7 @@ declare namespace Word { * * Gets the collection of list objects in the range. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ lists: Word.ListCollection; /** @@ -12083,12 +12538,12 @@ declare namespace Word { * * Gets the parent body of the range. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentBody: Word.Body; /** * - * Gets the content control that contains the range. Returns null if there isn't a parent content control. Read-only. + * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ @@ -12097,44 +12552,51 @@ declare namespace Word { * * Gets the table that contains the range. Returns null if it is not contained in a table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTable: Word.Table; /** * - * Gets the table cell that contains the range. Returns null if it is not contained in a table cell. Read-only. + * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTableCell: Word.TableCell; /** * * Gets the collection of table objects in the range. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ tables: Word.TableCollection; /** * - * Gets the first hyperlink in the range, or sets a hyperlink on the range. Existing hyperlinks in this range are deleted when you set a new hyperlink. + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a newline character ('\n') to separate the address part from the optional location part. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ hyperlink: string; /** * * Checks whether the range length is zero. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ isEmpty: boolean; /** * - * Gets or sets the style used for the range. This is the name of the pre-installed or custom style. + * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * [Api set: WordApi 1.1] */ style: string; + /** + * + * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: string; /** * * Gets the text of the range. Read-only. @@ -12155,7 +12617,7 @@ declare namespace Word { * * @param range Required. The range to compare with this range. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; /** @@ -12167,13 +12629,13 @@ declare namespace Word { delete(): void; /** * - * Expands the range in either direction to cover another range. + * Returns a new range that extends from this range in either direction to cover another range. This range is not changed. * * @param range Required. Another range. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - expandTo(range: Word.Range): void; + expandTo(range: Word.Range): Word.Range; /** * * Gets the HTML representation of the range object. @@ -12185,19 +12647,19 @@ declare namespace Word { * * Gets hyperlink child ranges within the range. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ getHyperlinkRanges(): Word.RangeCollection; /** * - * Gets the next text range by using punctuation marks and/or space character. + * Gets the next text range by using punctuation marks and/or other ending marks. * - * @param punctuationMarks Required. The punctuation marks and/or space character as an array of strings. + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getNextTextRange(punctuationMarks: Array, trimSpacing?: boolean): Word.Range; + getNextTextRange(endingMarks: Array, trimSpacing?: boolean): Word.Range; /** * * Gets the OOXML representation of the range object. @@ -12209,27 +12671,27 @@ declare namespace Word { * * Clones the range, or gets the starting or ending point of the range as a new range. * - * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After' or 'Content'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ getRange(rangeLocation?: string): Word.Range; /** * - * Gets the text child ranges in the range by using punctuation marks and/or space character. + * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. * - * @param punctuationMarks Required. The punctuation marks and/or space character as an array of strings. + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getTextRanges(punctuationMarks: Array, trimSpacing?: boolean): Word.RangeCollection; + getTextRanges(endingMarks: Array, trimSpacing?: boolean): Word.RangeCollection; /** * - * Inserts a break at the specified location in the main document. The insertLocation value can be 'Replace', 'Before' or 'After'. + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. * * @param breakType Required. The break type to add. - * @param insertLocation Required. The value can be 'Replace', 'Before' or 'After'. + * @param insertLocation Required. The value can be 'Before' or 'After'. * * [Api set: WordApi 1.1] */ @@ -12300,7 +12762,7 @@ declare namespace Word { * @param insertLocation Required. The value can be 'Before' or 'After'. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; /** @@ -12315,13 +12777,13 @@ declare namespace Word { insertText(text: string, insertLocation: string): Word.Range; /** * - * Shrinks the range to the intersection of the range with another range. + * Returns a new range as the intersection of this range with another range. This range is not changed. * * @param range Required. Another range. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - intersectWith(range: Word.Range): void; + intersectWith(range: Word.Range): Word.Range; /** * * Performs a search with the specified searchOptions on the scope of the range object. The search results are a collection of range objects. @@ -12336,11 +12798,10 @@ declare namespace Word { ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; - matchSoundsLike?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; - }): Word.SearchResultCollection; + }): Word.RangeCollection; /** * * Selects and navigates the Word UI to the range. @@ -12359,37 +12820,59 @@ declare namespace Word { * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ split(delimiters: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Range; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Range; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Range; + toJSON(): { + "font": Font; + "hyperlink": string; + "isEmpty": boolean; + "style": string; + "styleBuiltIn": string; + "text": string; + }; } /** * * Contains a collection of [range](range.md) objects. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class RangeCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first range in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.Range; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * Gets the first range in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Range; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.RangeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.RangeCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.RangeCollection; + toJSON(): {}; } /** * @@ -12398,14 +12881,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class SearchOptions extends OfficeExtension.ClientObject { - private m_ignorePunct; - private m_ignoreSpace; - private m_matchCase; - private m_matchPrefix; - private m_matchSoundsLike; - private m_matchSuffix; - private m_matchWholeWord; - private m_matchWildcards; matchWildCards: boolean; /** * @@ -12435,13 +12910,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ matchPrefix: boolean; - /** - * - * Gets or sets a value that indicates whether to find words that sound similar to the search string. Corresponds to the Sounds like check box in the Find and Replace dialog box - * - * [Api set: WordApi 1.1] - */ - matchSoundsLike: boolean; /** * * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. @@ -12471,30 +12939,15 @@ declare namespace Word { * Create a new instance of Word.SearchOptions object */ static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; - } - /** - * - * Contains a collection of [range](range.md) objects as a result of a search operation. - * - * [Api set: WordApi 1.1] - */ - class SearchResultCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first searched result in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.Range; - /** Gets the loaded child items in this collection. */ - items: Array; - /** - * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. - */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.SearchResultCollection; + toJSON(): { + "ignorePunct": boolean; + "ignoreSpace": boolean; + "matchCase": boolean; + "matchPrefix": boolean; + "matchSuffix": boolean; + "matchWholeWord": boolean; + "matchWildcards": boolean; + }; } /** * @@ -12503,10 +12956,6 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Section extends OfficeExtension.ClientObject { - private m_body; - private m_next; - private m__Id; - private m__ReferenceId; /** * * Gets the body object of the section. This does not include the header/footer and other section metadata. Read-only. @@ -12516,11 +12965,18 @@ declare namespace Word { body: Word.Body; /** * - * Gets the next section. Read-only. + * Gets or sets a value that indicates whether even-numbered pages have a different header and footer from odd-numbered pages in the section. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - next: Word.Section; + headerFooterEvenPageDifferent: boolean; + /** + * + * Gets or sets a value that indicates whether the first page has a different header and footer from the other pages in the section. + * + * [Api set: WordApi 1.3] + */ + headerFooterFirstPageDifferent: boolean; /** * * Gets one of the section's footers. @@ -12539,10 +12995,30 @@ declare namespace Word { * [Api set: WordApi 1.1] */ getHeader(type: string): Word.Body; + /** + * + * Gets the next section. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.Section; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Section; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Section; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Section; + toJSON(): { + "body": Body; + "headerFooterEvenPageDifferent": boolean; + "headerFooterFirstPageDifferent": boolean; + }; } /** * @@ -12551,254 +13027,223 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class SectionCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first section in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.Section; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * Gets the first section in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Section; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.SectionCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.SectionCollection; + toJSON(): {}; } /** * * Represents a table in a Word document. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class Table extends OfficeExtension.ClientObject { - private m_cellPaddingBottom; - private m_cellPaddingLeft; - private m_cellPaddingRight; - private m_cellPaddingTop; - private m_font; - private m_headerRowCount; - private m_height; - private m_isUniform; - private m_nestingLevel; - private m_next; - private m_paragraphAfter; - private m_paragraphBefore; - private m_parentContentControl; - private m_parentTable; - private m_parentTableCell; - private m_rowCount; - private m_rows; - private m_shadingColor; - private m_style; - private m_styleBandedColumns; - private m_styleBandedRows; - private m_styleFirstColumn; - private m_styleLastColumn; - private m_styleTotalRow; - private m_tables; - private m_values; - private m_verticalAlignment; - private m_width; - private m__Id; - private m__ReferenceId; /** * * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ font: Word.Font; - /** - * - * Gets the next table. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - next: Word.Table; /** * * Gets the paragraph after the table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ paragraphAfter: Word.Paragraph; /** * * Gets the paragraph before the table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ paragraphBefore: Word.Paragraph; + /** + * + * Gets the parent body of the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody: Word.Body; /** * * Gets the content control that contains the table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentContentControl: Word.ContentControl; /** * - * Gets the table that contains this table. Returns null if it is not contained in a table. Read-only. + * Gets the table that contains this table. Returns a null object if it is not contained in a table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTable: Word.Table; /** * - * Gets the table cell that contains this table. Returns null if it is not contained in a table cell. Read-only. + * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTableCell: Word.TableCell; /** * * Gets all of the table rows. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ rows: Word.TableRowCollection; /** * * Gets the child tables nested one level deeper. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ tables: Word.TableCollection; /** * - * Gets and sets the default bottom cell padding in points. + * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - cellPaddingBottom: number; - /** - * - * Gets and sets the default left cell padding in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingLeft: number; - /** - * - * Gets and sets the default right cell padding in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingRight: number; - /** - * - * Gets and sets the default top cell padding in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingTop: number; + alignment: string; /** * * Gets and sets the number of header rows. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ headerRowCount: number; /** * * Gets the height of the table in points. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ height: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment: string; /** * * Indicates whether all of the table rows are uniform. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ isUniform: boolean; /** * * Gets the nesting level of the table. Top-level tables have level 1. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ nestingLevel: number; /** * - * Gets the number of rows in the table. + * Gets the number of rows in the table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ rowCount: number; /** * * Gets and sets the shading color. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ shadingColor: string; /** * - * Gets and sets the name of the table style. + * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ style: string; /** * * Gets and sets whether the table has banded columns. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ styleBandedColumns: boolean; /** * * Gets and sets whether the table has banded rows. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ styleBandedRows: boolean; + /** + * + * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: string; /** * * Gets and sets whether the table has a first column with a special style. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ styleFirstColumn: boolean; /** * * Gets and sets whether the table has a last column with a special style. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ styleLastColumn: boolean; /** * * Gets and sets whether the table has a total (last) row with a special style. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ styleTotalRow: boolean; /** * * Gets and sets the text values in the table, as a 2D Javascript array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ values: Array>; /** * - * Gets and sets the vertical alignment of every cell in the table. + * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ verticalAlignment: string; /** * * Gets and sets the width of the table in points. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ width: number; /** @@ -12809,7 +13254,7 @@ declare namespace Word { * @param columnCount Required. Number of columns to add. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ addColumns(insertLocation: string, columnCount: number, values?: Array>): void; /** @@ -12820,35 +13265,35 @@ declare namespace Word { * @param rowCount Required. Number of rows to add. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - addRows(insertLocation: string, rowCount: number, values?: Array>): void; + addRows(insertLocation: string, rowCount: number, values?: Array>): Word.TableRowCollection; /** * * Autofits the table columns to the width of their contents. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ autoFitContents(): void; /** * * Autofits the table columns to the width of the window. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ autoFitWindow(): void; /** * * Clears the contents of the table. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ clear(): void; /** * * Deletes the entire table. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ delete(): void; /** @@ -12858,7 +13303,7 @@ declare namespace Word { * @param columnIndex Required. The first column to delete. * @param columnCount Optional. The number of columns to delete. Default 1. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ deleteColumns(columnIndex: number, columnCount?: number): void; /** @@ -12868,21 +13313,21 @@ declare namespace Word { * @param rowIndex Required. The first row to delete. * @param rowCount Optional. The number of rows to delete. Default 1. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ deleteRows(rowIndex: number, rowCount?: number): void; /** * * Distributes the column widths evenly. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ distributeColumns(): void; /** * * Distributes the row heights evenly. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ distributeRows(): void; /** @@ -12891,9 +13336,9 @@ declare namespace Word { * * @param borderLocation Required. The border location. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getBorderStyle(borderLocation: string): Word.TableBorderStyle; + getBorder(borderLocation: string): Word.TableBorder; /** * * Gets the table cell at a specified row and column. @@ -12901,23 +13346,39 @@ declare namespace Word { * @param rowIndex Required. The index of the row. * @param cellIndex Required. The index of the cell in the row. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ getCell(rowIndex: number, cellIndex: number): Word.TableCell; + /** + * + * Gets cell padding in points. + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. + * + * [Api set: WordApi 1.3] + */ + getCellPadding(cellPaddingLocation: string): OfficeExtension.ClientResult; + /** + * + * Gets the next table. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.Table; /** * * Gets the range that contains this table, or the range at the start or end of the table. * - * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End' or 'After'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getRange(rangeLocation: string): Word.Range; + getRange(rangeLocation?: string): Word.Range; /** * * Inserts a content control on the table. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertContentControl(): Word.ContentControl; /** @@ -12927,7 +13388,7 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; /** @@ -12939,21 +13400,9 @@ declare namespace Word { * @param insertLocation Required. The value can be 'Before' or 'After'. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; - /** - * - * Merges the cells bounded inclusively by a first and last cell. - * - * @param topRow Required. The row of the first cell - * @param firstCell Required. The index of the first cell in its row - * @param bottomRow Required. The row of the last cell - * @param lastCell Required. The index of the last cell in its row - * - * [Api set: WordApiDesktop 1.3 Beta] - */ - mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; /** * * Performs a search with the specified searchOptions on the scope of the table object. The search results are a collection of range objects. @@ -12961,197 +13410,195 @@ declare namespace Word { * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; - matchSoundsLike?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; - }): Word.SearchResultCollection; + }): Word.RangeCollection; /** * * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ select(selectionMode?: string): void; + /** + * + * Sets cell padding in points. + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. + * + * [Api set: WordApi 1.3] + */ + setCellPadding(cellPaddingLocation: string, cellPadding: number): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Table; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Table; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Table; + toJSON(): { + "alignment": string; + "font": Font; + "headerRowCount": number; + "height": number; + "horizontalAlignment": string; + "isUniform": boolean; + "nestingLevel": number; + "rowCount": number; + "shadingColor": string; + "style": string; + "styleBandedColumns": boolean; + "styleBandedRows": boolean; + "styleBuiltIn": string; + "styleFirstColumn": boolean; + "styleLastColumn": boolean; + "styleTotalRow": boolean; + "values": string[][]; + "verticalAlignment": string; + "width": number; + }; } /** * * Contains the collection of the document's Table objects. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class TableCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first table in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.Table; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * Gets the first table in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Table; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableCollection; + toJSON(): {}; } /** * * Represents a row in a Word document. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class TableRow extends OfficeExtension.ClientObject { - private m_cellCount; - private m_cellPaddingBottom; - private m_cellPaddingLeft; - private m_cellPaddingRight; - private m_cellPaddingTop; - private m_cells; - private m_font; - private m_isHeader; - private m_next; - private m_parentTable; - private m_preferredHeight; - private m_rowIndex; - private m_shadingColor; - private m_values; - private m_verticalAlignment; - private m__Id; - private m__ReferenceId; /** * * Gets cells. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ cells: Word.TableCellCollection; /** * * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ font: Word.Font; - /** - * - * Gets the next row. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - next: Word.TableRow; /** * * Gets parent table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTable: Word.Table; /** * * Gets the number of cells in the row. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ cellCount: number; /** * - * Gets and sets the default bottom cell padding for the row in points. + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - cellPaddingBottom: number; + horizontalAlignment: string; /** * - * Gets and sets the default left cell padding for the row in points. + * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingLeft: number; - /** - * - * Gets and sets the default right cell padding for the row in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingRight: number; - /** - * - * Gets and sets the default top cell padding for the row in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingTop: number; - /** - * - * Gets a value that indicates whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. - * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ isHeader: boolean; /** * * Gets and sets the preferred height of the row in points. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ preferredHeight: number; /** * * Gets the index of the row in its parent table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ rowIndex: number; /** * * Gets and sets the shading color. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ shadingColor: string; /** * * Gets and sets the text values in the row, as a 1D Javascript array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ values: Array; /** * - * Gets and sets the vertical alignment of the cells in the row. + * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ verticalAlignment: string; /** * * Clears the contents of the row. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ clear(): void; /** * * Deletes the entire row. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ delete(): void; /** @@ -13160,27 +13607,36 @@ declare namespace Word { * * @param borderLocation Required. The border location. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getBorderStyle(borderLocation: string): Word.TableBorderStyle; + getBorder(borderLocation: string): Word.TableBorder; + /** + * + * Gets cell padding in points. + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. + * + * [Api set: WordApi 1.3] + */ + getCellPadding(cellPaddingLocation: string): OfficeExtension.ClientResult; + /** + * + * Gets the next row. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableRow; /** * * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. * - * @param insertLocation Where the new rows should be inserted, relative to the current row. It can be 'Before' or 'After'. Required. + * @param insertLocation Required. Where the new rows should be inserted, relative to the current row. It can be 'Before' or 'After'. * @param rowCount Required. Number of rows to add - * @param values Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. Optional. + * @param values Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - insertRows(insertLocation: string, rowCount: number, values?: Array>): void; - /** - * - * Merges the row into one cell. - * - * [Api set: WordApiDesktop 1.3 Beta] - */ - merge(): Word.TableCell; + insertRows(insertLocation: string, rowCount: number, values?: Array>): Word.TableRowCollection; /** * * Performs a search with the specified searchOptions on the scope of the row. The search results are a collection of range objects. @@ -13188,197 +13644,185 @@ declare namespace Word { * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; ignoreSpace?: boolean; matchCase?: boolean; matchPrefix?: boolean; - matchSoundsLike?: boolean; matchSuffix?: boolean; matchWholeWord?: boolean; matchWildcards?: boolean; - }): Word.SearchResultCollection; + }): Word.RangeCollection; /** * * Selects the row and navigates the Word UI to it. * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ select(selectionMode?: string): void; + /** + * + * Sets cell padding in points. + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. + * + * [Api set: WordApi 1.3] + */ + setCellPadding(cellPaddingLocation: string, cellPadding: number): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableRow; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableRow; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableRow; + toJSON(): { + "cellCount": number; + "font": Font; + "horizontalAlignment": string; + "isHeader": boolean; + "preferredHeight": number; + "rowIndex": number; + "shadingColor": string; + "values": string[]; + "verticalAlignment": string; + }; } /** * * Contains the collection of the document's TableRow objects. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class TableRowCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first row in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.TableRow; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * Gets the first row in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableRow; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableRowCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableRowCollection; + toJSON(): {}; } /** * * Represents a table cell in a Word document. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class TableCell extends OfficeExtension.ClientObject { - private m_body; - private m_cellIndex; - private m_cellPaddingBottom; - private m_cellPaddingLeft; - private m_cellPaddingRight; - private m_cellPaddingTop; - private m_columnWidth; - private m_next; - private m_parentRow; - private m_parentTable; - private m_rowIndex; - private m_shadingColor; - private m_value; - private m_verticalAlignment; - private m_width; - private m__Id; - private m__ReferenceId; /** * * Gets the body object of the cell. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ body: Word.Body; - /** - * - * Gets the next cell. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - next: Word.TableCell; /** * * Gets the parent row of the cell. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentRow: Word.TableRow; /** * * Gets the parent table of the cell. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ parentTable: Word.Table; /** * * Gets the index of the cell in its row. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ cellIndex: number; - /** - * - * Gets and sets the bottom padding of the cell in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingBottom: number; - /** - * - * Gets and sets the left padding of the cell in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingLeft: number; - /** - * - * Gets and sets the right padding of the cell in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingRight: number; - /** - * - * Gets and sets the top padding of the cell in points. - * - * [Api set: WordApi 1.3 Beta] - */ - cellPaddingTop: number; /** * * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ columnWidth: number; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment: string; /** * * Gets the index of the cell's row in the table. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ rowIndex: number; /** * * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ shadingColor: string; /** * * Gets and sets the text of the cell. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ value: string; /** * - * Gets and sets the vertical alignment of the cell. + * Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ verticalAlignment: string; /** * * Gets the width of the cell in points. Read-only. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ width: number; /** * * Deletes the column containing this cell. This is applicable to uniform tables. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ deleteColumn(): void; /** * * Deletes the row containing this cell. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ deleteRow(): void; /** @@ -13387,9 +13831,25 @@ declare namespace Word { * * @param borderLocation Required. The border location. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - getBorderStyle(borderLocation: string): Word.TableBorderStyle; + getBorder(borderLocation: string): Word.TableBorder; + /** + * + * Gets cell padding in points. + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. + * + * [Api set: WordApi 1.3] + */ + getCellPadding(cellPaddingLocation: string): OfficeExtension.ClientResult; + /** + * + * Gets the next cell. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableCell; /** * * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. @@ -13398,7 +13858,7 @@ declare namespace Word { * @param columnCount Required. Number of columns to add * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ insertColumns(insertLocation: string, columnCount: number, values?: Array>): void; /** @@ -13409,84 +13869,117 @@ declare namespace Word { * @param rowCount Required. Number of rows to add. * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - insertRows(insertLocation: string, rowCount: number, values?: Array>): void; + insertRows(insertLocation: string, rowCount: number, values?: Array>): Word.TableRowCollection; /** * - * Adds columns to the left or right of the cell, using the existing column as a template. The string values, if specified, are set in the newly inserted rows. + * Sets cell padding in points. * - * @param rowCount Required. The number of rows to split into. Must be a divisor of the number of underlying rows. - * @param columnCount Required. The number of columns to split into. + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom' or 'Right'. * - * [Api set: WordApiDesktop 1.3 Beta] + * [Api set: WordApi 1.3] */ - split(rowCount: number, columnCount: number): void; + setCellPadding(cellPaddingLocation: string, cellPadding: number): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCell; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableCell; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableCell; + toJSON(): { + "body": Body; + "cellIndex": number; + "columnWidth": number; + "horizontalAlignment": string; + "rowIndex": number; + "shadingColor": string; + "value": string; + "verticalAlignment": string; + "width": number; + }; } /** * * Contains the collection of the document's TableCell objects. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ class TableCellCollection extends OfficeExtension.ClientObject { - private m_first; - private m__ReferenceId; - private m__items; - /** - * - * Gets the first table cell in this collection. Read-only. - * - * [Api set: WordApi 1.3 Beta] - */ - first: Word.TableCell; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * Gets the first table cell in this collection. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableCell; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableCellCollection; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableCellCollection; + toJSON(): {}; } /** * * Specifies the border style * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ - class TableBorderStyle extends OfficeExtension.ClientObject { - private m_color; - private m_type; - private m_width; - private m__ReferenceId; + class TableBorder extends OfficeExtension.ClientObject { /** * * Gets or sets the table border color, as a hex value or name. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ color: string; /** * - * Gets or sets the type of the table border style. + * Gets or sets the type of the table border. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ type: string; /** * - * Gets or sets the width, in points, of the table border style. + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. * - * [Api set: WordApi 1.3 Beta] + * [Api set: WordApi 1.3] */ width: number; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableBorderStyle; + load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableBorder; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableBorder; + /** + * Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableBorder; + toJSON(): { + "color": string; + "type": string; + "width": number; + }; } /** * @@ -13531,33 +14024,84 @@ declare namespace Word { * [Api set: WordApi] */ module UnderlineType { + var mixed: string; var none: string; + /** + * + * @deprecated Hidden is no longer supported. + */ + var hidden: string; + /** + * + * @deprecated DotLine is no longer supported. + */ + var dotLine: string; var single: string; var word: string; var double: string; - var dotted: string; - var hidden: string; var thick: string; + var dotted: string; + var dottedHeavy: string; var dashLine: string; - var dotLine: string; + var dashLineHeavy: string; + var dashLineLong: string; + var dashLineLongHeavy: string; var dotDashLine: string; + var dotDashLineHeavy: string; var twoDotDashLine: string; + var twoDotDashLineHeavy: string; var wave: string; + var waveHeavy: string; + var waveDouble: string; } /** + * + * Page break, line break, and four section breaks + * * [Api set: WordApi] */ module BreakType { + /** + * + * Page break. + * + */ var page: string; - var column: string; + /** + * + * @deprecated Use sectionNext instead. + */ var next: string; + /** + * + * Section break, with the new section starting on the next page. + * + */ + var sectionNext: string; + /** + * + * Section break, with the new section starting on the same page. + * + */ var sectionContinuous: string; + /** + * + * Section break, with the new section starting on the next even-numbered page. + * + */ var sectionEven: string; + /** + * + * Section break, with the new section starting on the next odd-numbered page. + * + */ var sectionOdd: string; + /** + * + * Line break. + * + */ var line: string; - var lineClearLeft: string; - var lineClearRight: string; - var textWrapping: string; } /** * @@ -13576,6 +14120,7 @@ declare namespace Word { * [Api set: WordApi] */ module Alignment { + var mixed: string; var unknown: string; var left: string; var centered: string; @@ -13626,6 +14171,7 @@ declare namespace Word { var emf: string; var pict: string; var pdf: string; + var svg: string; } /** * [Api set: WordApi] @@ -13634,6 +14180,9 @@ declare namespace Word { var whole: string; var start: string; var end: string; + var before: string; + var after: string; + var content: string; } /** * [Api set: WordApi] @@ -13668,6 +14217,15 @@ declare namespace Word { var outside: string; var all: string; } + /** + * [Api set: WordApi] + */ + module CellPaddingLocation { + var top: string; + var left: string; + var bottom: string; + var right: string; + } /** * [Api set: WordApi] */ @@ -13675,9 +14233,7 @@ declare namespace Word { var mixed: string; var none: string; var single: string; - var thick: string; var double: string; - var hairline: string; var dotted: string; var dashed: string; var dotDashed: string; @@ -13716,6 +14272,251 @@ declare namespace Word { var number: string; var picture: string; } + /** + * [Api set: WordApi] + */ + module ListBullet { + var custom: string; + var solid: string; + var hollow: string; + var square: string; + var diamonds: string; + var arrow: string; + var checkmark: string; + } + /** + * [Api set: WordApi] + */ + module ListNumbering { + var none: string; + var arabic: string; + var upperRoman: string; + var lowerRoman: string; + var upperLetter: string; + var lowerLetter: string; + } + /** + * [Api set: WordApi] + */ + module Style { + /** + * + * Mixed styles or other style not in this list. + * + */ + var other: string; + /** + * + * Reset character and paragraph style to default. + * + */ + var normal: string; + var heading1: string; + var heading2: string; + var heading3: string; + var heading4: string; + var heading5: string; + var heading6: string; + var heading7: string; + var heading8: string; + var heading9: string; + /** + * + * Table-of-content level 1. + * + */ + var toc1: string; + /** + * + * Table-of-content level 2. + * + */ + var toc2: string; + /** + * + * Table-of-content level 3. + * + */ + var toc3: string; + /** + * + * Table-of-content level 4. + * + */ + var toc4: string; + /** + * + * Table-of-content level 5. + * + */ + var toc5: string; + /** + * + * Table-of-content level 6. + * + */ + var toc6: string; + /** + * + * Table-of-content level 7. + * + */ + var toc7: string; + /** + * + * Table-of-content level 8. + * + */ + var toc8: string; + /** + * + * Table-of-content level 9. + * + */ + var toc9: string; + var footnoteText: string; + var header: string; + var footer: string; + var caption: string; + var footnoteReference: string; + var endnoteReference: string; + var endnoteText: string; + var title: string; + var subtitle: string; + var hyperlink: string; + var strong: string; + var emphasis: string; + var noSpacing: string; + var listParagraph: string; + var quote: string; + var intenseQuote: string; + var subtleEmphasis: string; + var intenseEmphasis: string; + var subtleReference: string; + var intenseReference: string; + var bookTitle: string; + var bibliography: string; + /** + * + * Table-of-content heading. + * + */ + var tocHeading: string; + var tableGrid: string; + var plainTable1: string; + var plainTable2: string; + var plainTable3: string; + var plainTable4: string; + var plainTable5: string; + var tableGridLight: string; + var gridTable1Light: string; + var gridTable1Light_Accent1: string; + var gridTable1Light_Accent2: string; + var gridTable1Light_Accent3: string; + var gridTable1Light_Accent4: string; + var gridTable1Light_Accent5: string; + var gridTable1Light_Accent6: string; + var gridTable2: string; + var gridTable2_Accent1: string; + var gridTable2_Accent2: string; + var gridTable2_Accent3: string; + var gridTable2_Accent4: string; + var gridTable2_Accent5: string; + var gridTable2_Accent6: string; + var gridTable3: string; + var gridTable3_Accent1: string; + var gridTable3_Accent2: string; + var gridTable3_Accent3: string; + var gridTable3_Accent4: string; + var gridTable3_Accent5: string; + var gridTable3_Accent6: string; + var gridTable4: string; + var gridTable4_Accent1: string; + var gridTable4_Accent2: string; + var gridTable4_Accent3: string; + var gridTable4_Accent4: string; + var gridTable4_Accent5: string; + var gridTable4_Accent6: string; + var gridTable5Dark: string; + var gridTable5Dark_Accent1: string; + var gridTable5Dark_Accent2: string; + var gridTable5Dark_Accent3: string; + var gridTable5Dark_Accent4: string; + var gridTable5Dark_Accent5: string; + var gridTable5Dark_Accent6: string; + var gridTable6Colorful: string; + var gridTable6Colorful_Accent1: string; + var gridTable6Colorful_Accent2: string; + var gridTable6Colorful_Accent3: string; + var gridTable6Colorful_Accent4: string; + var gridTable6Colorful_Accent5: string; + var gridTable6Colorful_Accent6: string; + var gridTable7Colorful: string; + var gridTable7Colorful_Accent1: string; + var gridTable7Colorful_Accent2: string; + var gridTable7Colorful_Accent3: string; + var gridTable7Colorful_Accent4: string; + var gridTable7Colorful_Accent5: string; + var gridTable7Colorful_Accent6: string; + var listTable1Light: string; + var listTable1Light_Accent1: string; + var listTable1Light_Accent2: string; + var listTable1Light_Accent3: string; + var listTable1Light_Accent4: string; + var listTable1Light_Accent5: string; + var listTable1Light_Accent6: string; + var listTable2: string; + var listTable2_Accent1: string; + var listTable2_Accent2: string; + var listTable2_Accent3: string; + var listTable2_Accent4: string; + var listTable2_Accent5: string; + var listTable2_Accent6: string; + var listTable3: string; + var listTable3_Accent1: string; + var listTable3_Accent2: string; + var listTable3_Accent3: string; + var listTable3_Accent4: string; + var listTable3_Accent5: string; + var listTable3_Accent6: string; + var listTable4: string; + var listTable4_Accent1: string; + var listTable4_Accent2: string; + var listTable4_Accent3: string; + var listTable4_Accent4: string; + var listTable4_Accent5: string; + var listTable4_Accent6: string; + var listTable5Dark: string; + var listTable5Dark_Accent1: string; + var listTable5Dark_Accent2: string; + var listTable5Dark_Accent3: string; + var listTable5Dark_Accent4: string; + var listTable5Dark_Accent5: string; + var listTable5Dark_Accent6: string; + var listTable6Colorful: string; + var listTable6Colorful_Accent1: string; + var listTable6Colorful_Accent2: string; + var listTable6Colorful_Accent3: string; + var listTable6Colorful_Accent4: string; + var listTable6Colorful_Accent5: string; + var listTable6Colorful_Accent6: string; + var listTable7Colorful: string; + var listTable7Colorful_Accent1: string; + var listTable7Colorful_Accent2: string; + var listTable7Colorful_Accent3: string; + var listTable7Colorful_Accent4: string; + var listTable7Colorful_Accent5: string; + var listTable7Colorful_Accent6: string; + } + /** + * [Api set: WordApi] + */ + module DocumentPropertyType { + var string: string; + var number: string; + var date: string; + var boolean: string; + } module ErrorCodes { var accessDenied: string; var generalException: string; @@ -13724,20 +14525,32 @@ declare namespace Word { var notImplemented: string; } } -declare namespace Word { +declare module Word { /** * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. */ class RequestContext extends OfficeExtension.ClientRequestContext { - private m_document; constructor(url?: string); document: Document; + application: Application; } /** - * Executes a batch script that performs actions on the Word object model. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. + * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. */ function run(batch: (context: Word.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + /** + * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param object - A previously-created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + /** + * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously-created API objects. + * @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; } diff --git a/parseurl/index.d.ts b/parseurl/index.d.ts index 829a76ac84..15140d9261 100644 --- a/parseurl/index.d.ts +++ b/parseurl/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for parseurl +// Type definitions for parseurl 1.3 // Project: https://github.com/pillarjs/parseurl // Definitions by: Stefan Reichel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/query-string/index.d.ts b/query-string/index.d.ts index fbd2d3638d..9cd6d8df1e 100644 --- a/query-string/index.d.ts +++ b/query-string/index.d.ts @@ -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(). diff --git a/raw-body/index.d.ts b/raw-body/index.d.ts index ffe61856c8..a99f2c51c2 100644 --- a/raw-body/index.d.ts +++ b/raw-body/index.d.ts @@ -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 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/react-data-grid/index.d.ts b/react-data-grid/index.d.ts index 7c438468e9..d378476670 100644 --- a/react-data-grid/index.d.ts +++ b/react-data-grid/index.d.ts @@ -441,6 +441,7 @@ declare namespace AdazzleReactDataGridPlugins { } export namespace Formatters { export class ImageFormatter extends React.Component { } + export class DropDownFormatter extends React.Component { } } export class Toolbar extends React.Component {} // TODO: re-export the react-contextmenu typings once those exist diff --git a/react-jsonschema-form/index.d.ts b/react-jsonschema-form/index.d.ts index a12c95b26d..1ff2487144 100644 --- a/react-jsonschema-form/index.d.ts +++ b/react-jsonschema-form/index.d.ts @@ -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 // 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; diff --git a/react-jsonschema-form/react-jsonschema-form-tests.tsx b/react-jsonschema-form/react-jsonschema-form-tests.tsx index 0e4e8eeef9..b5fdfff1c9 100644 --- a/react-jsonschema-form/react-jsonschema-form-tests.tsx +++ b/react-jsonschema-form/react-jsonschema-form-tests.tsx @@ -73,6 +73,8 @@ export class Example extends React.Component {
{
this.setState({formData})} /> }
diff --git a/react/index.d.ts b/react/index.d.ts index 9d5ff227df..9f9761cdcf 100644 --- a/react/index.d.ts +++ b/react/index.d.ts @@ -183,7 +183,7 @@ declare namespace React { }; } - class PureComponent extends Component {} + class PureComponent extends Component { } interface ClassicComponent extends Component { replaceState(nextState: S, callback?: () => any): void; @@ -209,7 +209,7 @@ declare namespace React { } interface ComponentClass

{ - new(props?: P, context?: any): Component; + new (props?: P, context?: any): Component; propTypes?: ValidationMap

; contextTypes?: ValidationMap; childContextTypes?: ValidationMap; @@ -218,7 +218,7 @@ declare namespace React { } interface ClassicComponentClass

extends ComponentClass

{ - new(props?: P, context?: any): ClassicComponent; + new (props?: P, context?: any): ClassicComponent; getDefaultProps?(): P; } @@ -229,8 +229,8 @@ declare namespace React { */ type ClassType, C extends ComponentClass

> = 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 { } interface ElementClass extends React.Component { - render(): JSX.Element|null; + render(): JSX.Element | null; } interface ElementAttributesProperty { props: {}; } @@ -2514,6 +2514,7 @@ declare global { meta: React.HTMLProps; meter: React.HTMLProps; nav: React.HTMLProps; + noindex: React.HTMLProps; noscript: React.HTMLProps; object: React.HTMLProps; ol: React.HTMLProps; diff --git a/react/react-tests.ts b/react/react-tests.ts index d375ef8f65..c2d80d0dd0 100644 --- a/react/react-tests.ts +++ b/react/react-tests.ts @@ -130,7 +130,7 @@ class ModernComponent extends React.Component } } -class ModernComponentNoState extends React.Component {} +class ModernComponentNoState extends React.Component { } 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 = { }), 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 = { }), 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 = { var mappedChildrenArray: number[] = React.Children.map(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 = 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} } // diff --git a/redux-form/package.json b/redux-form/package.json new file mode 100644 index 0000000000..e52256ea90 --- /dev/null +++ b/redux-form/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "redux": "^3.6.0" + } +} \ No newline at end of file diff --git a/redux-router/package.json b/redux-router/package.json new file mode 100644 index 0000000000..e52256ea90 --- /dev/null +++ b/redux-router/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "redux": "^3.6.0" + } +} \ No newline at end of file diff --git a/rest/index.d.ts b/rest/index.d.ts index 4bad0c9d6e..3268eb093f 100644 --- a/rest/index.d.ts +++ b/rest/index.d.ts @@ -26,6 +26,9 @@ declare module "rest" { params?: any; headers?: any; entity?: any; + canceled?: boolean; + cancel?: () => void; + originator?: (request?: Request) => ResponsePromise; } export interface Status { diff --git a/vinyl/vinyl-tests.ts b/vinyl/vinyl-tests.ts index b5c5dd9993..bb705b7b2b 100644 --- a/vinyl/vinyl-tests.ts +++ b/vinyl/vinyl-tests.ts @@ -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');