diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7f3c8671de..f9324d1bdd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2639,7 +2639,7 @@ /types/nightmare/ @horiuchi @samyang-au @Bleser92 /types/nightwatch/ @rkavalap @schlesiger /types/nivo-slider/ @AndersonFriaca -/types/noble/ @swook @wind-rider @shantanubhadoria @lukel99 @bioball @keton @thegecko +/types/noble/ @swook @shantanubhadoria @lukel99 @bioball @keton @thegecko /types/nock/ @bonnici @horiuchi @afharo @mastermatt @damour /types/nodal/ @charrondev /types/node/v4/ @eps1lon @@ -3009,6 +3009,7 @@ /types/proj4leaflet/ @BendingBender /types/project-oxford/ @scsouthw /types/promise-dag/ @OSjoerdWie +/types/promise-map-limit/ @kohlmannj /types/promise-pg/ @coldacid /types/promise-polyfill/ @skysteve /types/promise-pool/ @vilic diff --git a/README.es.md b/README.es.md index ce94bb0298..c3cff967db 100644 --- a/README.es.md +++ b/README.es.md @@ -87,6 +87,7 @@ Primero, haz un [fork](https://guides.github.com/activities/forking/) en este re * `cd types/my-package-to-edit` * Haz cambios. Recuerda editar las pruebas. + Si realiza cambios importantes, no olvide [actualizar una versión principal](#quiero-actualizar-un-paquete-a-una-nueva-versión-principal). * También puede que quieras añadirte la sección "Definitions by" en el encabezado del paquete. - Esto hará que seas notificado (a través de tu nombre de usuario en GitHub) cada vez que alguien haga un pull request o issue sobre el paquete. - Haz esto añadiendo tu nombre al final de la línea, así como en `// Definitions by: Alice , Bob `. diff --git a/README.md b/README.md index 7c58fe8901..554316e52a 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ First, [fork](https://guides.github.com/activities/forking/) this repository, in * `cd types/my-package-to-edit` * Make changes. Remember to edit tests. + If you make breaking changes, do not forget to [update a major version](#i-want-to-update-a-package-to-a-new-major-version). * You may also want to add yourself to "Definitions by" section of the package header. - This will cause you to be notified (via your GitHub username) whenever someone makes a pull request or issue about the package. - Do this by adding your name to the end of the line, as in `// Definitions by: Alice , Bob `. diff --git a/notNeededPackages.json b/notNeededPackages.json index 2b9e1fcde0..dd5523d102 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -660,6 +660,12 @@ "sourceRepoURL": "https://github.com/ashtuchkin/iconv-lite", "asOfVersion": "0.4.14" }, + { + "libraryName": "ids", + "typingsPackageName": "ids", + "sourceRepoURL": "https://github.com/bpmn-io/ids", + "asOfVersion": "0.2.2" + }, { "libraryName": "immutability-helper", "typingsPackageName": "immutability-helper", @@ -1176,6 +1182,12 @@ "sourceRepoURL": "https://github.com/idehub/react-native-google-analytics-bridge", "asOfVersion": "5.3.3" }, + { + "libraryName": "react-native-linear-gradient", + "typingsPackageName": "react-native-linear-gradient", + "sourceRepoURL": "https://github.com/react-native-community/react-native-linear-gradient", + "asOfVersion": "2.4.0" + }, { "libraryName": "react-native-modal", "typingsPackageName": "react-native-modal", diff --git a/package.json b/package.json index db67595b77..37d1f4d48b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "definitely-typed", - "version": "0.0.1", + "version": "0.0.2", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped", "repository": { "type": "git", diff --git a/types/a-big-triangle/a-big-triangle-tests.ts b/types/a-big-triangle/a-big-triangle-tests.ts new file mode 100644 index 0000000000..75198e8690 --- /dev/null +++ b/types/a-big-triangle/a-big-triangle-tests.ts @@ -0,0 +1,5 @@ +import drawTriangle = require("a-big-triangle"); + +const gl = new WebGLRenderingContext(); + +drawTriangle(gl); // $ExpectType void diff --git a/types/a-big-triangle/index.d.ts b/types/a-big-triangle/index.d.ts new file mode 100644 index 0000000000..6e397cfa7e --- /dev/null +++ b/types/a-big-triangle/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for a-big-triangle 1.0 +// Project: https://github.com/mikolalysenko/a-big-triangle +// Definitions by: Mathias Paumgarten +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function createABigTriangle(gl: WebGLRenderingContext): void; + +export = createABigTriangle; diff --git a/types/a-big-triangle/tsconfig.json b/types/a-big-triangle/tsconfig.json new file mode 100644 index 0000000000..c85f12fe20 --- /dev/null +++ b/types/a-big-triangle/tsconfig.json @@ -0,0 +1,24 @@ +{ + "files": [ + "index.d.ts", + "a-big-triangle-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/types/a-big-triangle/tslint.json b/types/a-big-triangle/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/a-big-triangle/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/accept-language-parser/accept-language-parser-tests.ts b/types/accept-language-parser/accept-language-parser-tests.ts index b137df02e4..586a31cb93 100644 --- a/types/accept-language-parser/accept-language-parser-tests.ts +++ b/types/accept-language-parser/accept-language-parser-tests.ts @@ -1,4 +1,4 @@ -// https://github.com/opentable/accept-language-parser/blob/v1.4.1/index.js +// https://github.com/opentable/accept-language-parser/blob/v1.5.0/index.js import * as AcceptLanguageParser from 'accept-language-parser'; @@ -23,3 +23,9 @@ const l3: AcceptLanguageParser.Language = { const parsed1: AcceptLanguageParser.Language[] = AcceptLanguageParser.parse(''); const pick1: string | null = AcceptLanguageParser.pick([''], ''); const pick2: string | null = AcceptLanguageParser.pick([''], [l1, l2, l3]); +const pick3: string | null = AcceptLanguageParser.pick([''], '', {}); +const pick4: string | null = AcceptLanguageParser.pick([''], '', { loose: true }); + +const pickOptions: AcceptLanguageParser.PickOptions = { + loose: true +}; diff --git a/types/accept-language-parser/index.d.ts b/types/accept-language-parser/index.d.ts index 16d003648c..c47969c940 100644 --- a/types/accept-language-parser/index.d.ts +++ b/types/accept-language-parser/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for accept-language-parser 1.4 +// Type definitions for accept-language-parser 1.5 // Project: https://github.com/opentable/accept-language-parser // Definitions by: Niklas Wulf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,7 +7,11 @@ // https://github.com/opentable/accept-language-parser/blob/v1.4.1/index.js export function parse(acceptLanguage: string): Language[]; -export function pick(supportedLanguages: string[], acceptLanguage: string | Language[]): string | null; +export function pick( + supportedLanguages: string[], + acceptLanguage: string | Language[], + options?: PickOptions +): string | null; export interface Language { code: string; @@ -15,3 +19,7 @@ export interface Language { region?: string; quality: number; } + +export interface PickOptions { + loose?: boolean; +} diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts index 1f7dd9752b..828aab87c2 100644 --- a/types/ace/index.d.ts +++ b/types/ace/index.d.ts @@ -101,6 +101,29 @@ declare namespace AceAjax { transformAction(state: any, action: any, editor: any, session: any, param: any): any; } + export interface OptionProvider { + + /** + * Sets a Configuration Option + **/ + setOption(optionName: string, optionValue: any): void; + + /** + * Sets Configuration Options + **/ + setOptions(keyValueTuples: any): void; + + /** + * Get a Configuration Option + **/ + getOption(name: string):any; + + /** + * Get Configuration Options + **/ + getOptions():any; + } + //////////////// /// Ace //////////////// @@ -495,7 +518,7 @@ declare namespace AceAjax { * Stores all the data about [[Editor `Editor`]] state providing easy way to change editors state. * `EditSession` can be attached to only one [[Document `Document`]]. Same `Document` can be attached to several `EditSession`s. **/ - export interface IEditSession { + export interface IEditSession extends OptionProvider { selection: Selection; @@ -1074,7 +1097,7 @@ declare namespace AceAjax { * The `Editor` manages the [[EditSession]] (which manages [[Document]]s), as well as the [[VirtualRenderer]], which draws everything to the screen. * Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them. **/ - export interface Editor { + export interface Editor extends OptionProvider { on(ev: string, callback: (e: any) => any): void; @@ -1113,26 +1136,6 @@ declare namespace AceAjax { execCommand(command:string, args?: any): void; - /** - * Sets a Configuration Option - **/ - setOption(optionName: any, optionValue: any): void; - - /** - * Sets Configuration Options - **/ - setOptions(keyValueTuples: any): void; - - /** - * Get a Configuration Option - **/ - getOption(name: any):any; - - /** - * Get Configuration Options - **/ - getOptions():any; - /** * Get rid of console warning by setting this to Infinity **/ @@ -2692,7 +2695,7 @@ declare namespace AceAjax { /** * The class that is responsible for drawing everything you see on the screen! **/ - export interface VirtualRenderer { + export interface VirtualRenderer extends OptionProvider { scroller: any; @@ -3036,6 +3039,37 @@ declare namespace AceAjax { **/ new(container: HTMLElement, theme?: string): VirtualRenderer; } + + export interface Completer { + /** + * Provides possible completion results asynchronously using the given callback. + * @param editor The editor to associate with + * @param session The `EditSession` to refer to + * @param pos An object containing the row and column + * @param prefix The prefixing string before the current position + * @param callback Function to provide the results or error + */ + getCompletions: (editor: Editor, session: IEditSession, pos: Position, prefix: string, callback: CompletionCallback) => void; + + /** + * Provides tooltip information about a completion result. + * @param item The completion result + */ + getDocTooltip?: (item: Completion) => void; + } + + export interface Completion { + value: string; + meta: string; + type?: string; + caption?: string; + snippet?: any; + score?: number; + exactMatch?: number; + docHTML?: string; + } + + export type CompletionCallback = (error: Error, results: Completion[]) => void; } declare var ace: AceAjax.Ace; diff --git a/types/activex-dao/activex-dao-tests.ts b/types/activex-dao/activex-dao-tests.ts index 412bea60b5..7e8c2bef22 100644 --- a/types/activex-dao/activex-dao-tests.ts +++ b/types/activex-dao/activex-dao-tests.ts @@ -1,27 +1,48 @@ -let engine = new ActiveXObject('DAO.DBEngine.120'); +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + +const dbOpenSnapshot = DAO.RecordsetTypeEnum.dbOpenSnapshot; + +let engine = new ActiveXObject('DAO.DBEngine'); let dbsNorthwind = engine.OpenDatabase('c:\\path\\to\\northwind.mdb'); -// adding a record to a recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/add-a-record-to-a-dao-recordset -let rstShippers = dbsNorthwind.OpenRecordset('Shippers'); -rstShippers.AddNew(); -rstShippers.Fields.Item('CompanyName').Value = 'Global Parcel Service'; -// Set remaining fields -rstShippers.Update(); -rstShippers.Close(); +// https://msdn.microsoft.com/VBA/Access-VBA/articles/add-a-record-to-a-dao-recordset +{ + // adding a record to a recordset + const rstShippers = dbsNorthwind.OpenRecordset('Shippers'); + rstShippers.AddNew(); + rstShippers('CompanyName').Value = 'Global Parcel Service'; + // Set remaining fields + rstShippers.Update(); + rstShippers.Close(); +} -// create a QueryDef with the given SQL -- https://msdn.microsoft.com/VBA/Access-VBA/articles/build-sql-statements-that-include-variables-and-controls -let sql = 'SELECT * FROM Orders WHERE OrderDate > #3-31-2006#'; -let qdf = dbsNorthwind.CreateQueryDef('Second quarter', sql); -// using parameters -sql = ` - PARAMETERS QuarterStart DATETIME - SELECT * - FROM Orders - WHERE OrderDate > QuarterStart -`; -qdf = dbsNorthwind.CreateQueryDef('Second quarter (parameters)', sql); +// https://msdn.microsoft.com/VBA/Access-VBA/articles/build-sql-statements-that-include-variables-and-controls +{ + // create a QueryDef with the given SQL + let sql = 'SELECT * FROM Orders WHERE OrderDate > #3-31-2006#'; + let qdf = dbsNorthwind.CreateQueryDef('Second quarter', sql); + // using parameters + sql = ` + PARAMETERS QuarterStart DATETIME + SELECT * + FROM Orders + WHERE OrderDate > QuarterStart + `; + qdf = dbsNorthwind.CreateQueryDef('Second quarter (parameters)', sql); + WScript.Echo(`Field names: ${collectionToArray(qdf.Fields).map(fld => fld.Name).join(', ')}`); +} -// count the number of records in a Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/count-the-number-of-records-in-a-dao-recordset +// https://msdn.microsoft.com/VBA/Access-VBA/articles/count-the-number-of-records-in-a-dao-recordset +/** Count the number of records in a Recordset */ const findRecordCount = (dbs: DAO.Database, sql: string) => { let count = 0; const rstRecords = dbs.OpenRecordset(sql); @@ -33,113 +54,119 @@ const findRecordCount = (dbs: DAO.Database, sql: string) => { return count; }; -// delete records from a Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/delete-a-record-from-a-dao-recordset -rstShippers = dbsNorthwind.OpenRecordset('SELECT * FROM Shippers ORDER BY CompanyName, ShipperID', DAO.RecordsetTypeEnum.dbOpenDynaset); -if (!rstShippers.EOF) { - let name = rstShippers.Fields.Item('CompanyName').Value; - rstShippers.MoveNext(); - while (!rstShippers.EOF) { - const recordName: string = rstShippers.Fields.Item('CompanyName').Value; - if (recordName === name) { - rstShippers.Delete(); - } else { - name = recordName; - } +// https://msdn.microsoft.com/VBA/Access-VBA/articles/delete-a-record-from-a-dao-recordset +{ + // delete records from a Recordset + const rstShippers = dbsNorthwind.OpenRecordset('SELECT * FROM Shippers ORDER BY CompanyName, ShipperID', DAO.RecordsetTypeEnum.dbOpenDynaset); + if (!rstShippers.EOF) { + let name = rstShippers('CompanyName').Value; rstShippers.MoveNext(); + while (!rstShippers.EOF) { + const recordName: string = rstShippers('CompanyName').Value; + if (recordName === name) { + rstShippers.Delete(); + } else { + name = recordName; + } + rstShippers.MoveNext(); + } } + rstShippers.Close(); } -rstShippers.Close(); -// copy entire records to an array -- https://msdn.microsoft.com/VBA/Access-VBA/articles/extract-data-from-a-record-in-a-dao-recordset -let rstEmployees = dbsNorthwind.OpenRecordset('SELECT FirstName, LastName, Title FROM Employees', DAO.RecordsetTypeEnum.dbOpenSnapshot); -let records = new VBArray(rstEmployees.GetRows(3)); -let recordCount = records.ubound(2) + 1; -let columnCount = records.ubound(1) + 1; -for (let row = 0; row < recordCount; row += 1) { - for (let column = 0; column < columnCount; column += 1) { - WScript.Echo(records.getItem(column, row)); +// https://msdn.microsoft.com/VBA/Access-VBA/articles/extract-data-from-a-record-in-a-dao-recordset +{ + // copy entire records to an array + const rstEmployees = dbsNorthwind.OpenRecordset('SELECT FirstName, LastName, Title FROM Employees', dbOpenSnapshot); + const records = new VBArray(rstEmployees.GetRows(3)); + const recordCount = records.ubound(2) + 1; + const columnCount = records.ubound(1) + 1; + for (let row = 0; row < recordCount; row += 1) { + for (let column = 0; column < columnCount; column += 1) { + WScript.Echo(records.getItem(column, row)); + } } + if (rstEmployees.EOF) { WScript.Echo('At end of recordset'); } + rstEmployees.Close(); } -if (rstEmployees.EOF) { WScript.Echo('At end of recordset'); } -rstEmployees.Close(); // find a record in a dynaset-type or snapshot-type DAO Recordset -- https://msdn.microsoft.com/en-us/vba/access-vba/articles/find-a-record-in-a-dynaset-type-or-snapshot-type-dao-recordset -const findOrdersWithoutDetails = () => { +{ const orders: number[] = []; - const rstOrders = dbsNorthwind.OpenRecordset('SELECT * FROM Orders ORDER BY OrderID', DAO.RecordsetTypeEnum.dbOpenSnapshot); - const rstOrderDetails = dbsNorthwind.OpenRecordset('SELECT * FROM [Order Details] ORDER BY OrderID', DAO.RecordsetTypeEnum.dbOpenSnapshot); + const rstOrders = dbsNorthwind.OpenRecordset('SELECT * FROM Orders ORDER BY OrderID', dbOpenSnapshot); + const rstOrderDetails = dbsNorthwind.OpenRecordset('SELECT * FROM [Order Details] ORDER BY OrderID', dbOpenSnapshot); - const closeRecordsets = () => { - rstOrders.Close(); - rstOrderDetails.Close(); - }; - if (rstOrders.EOF || rstOrderDetails.EOF) { - closeRecordsets(); - return; - } - - while (!rstOrders.EOF) { - const orderID = rstOrders.Fields.Item('OrderID').Value; - rstOrderDetails.FindFirst(`OrderID=${orderID}`); - if (rstOrderDetails.NoMatch) { - orders.push(orderID); + if (!rstOrders.EOF && !rstOrderDetails.EOF) { + while (!rstOrders.EOF) { + const orderID = rstOrders('OrderID').Value; + rstOrderDetails.FindFirst(`OrderID=${orderID}`); + if (rstOrderDetails.NoMatch) { + orders.push(orderID); + } + rstOrders.MoveNext(); } - rstOrders.MoveNext(); } - closeRecordsets(); - return orders; -}; -// find a record in a table-type DAO Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/find-a-record-in-a-table-type-dao-recordset + rstOrders.Close(); + rstOrderDetails.Close(); + + WScript.Echo(orders.join('\n')); +} + +// https://msdn.microsoft.com/VBA/Access-VBA/articles/find-a-record-in-a-table-type-dao-recordset +/** Find a record in a table-type DAO Recordset */ const getHireDate = (employeeID: number) => { let hireDate: Date | undefined; const rstEmployees = dbsNorthwind.OpenRecordset('Employees'); rstEmployees.Index = 'PrimaryKey'; rstEmployees.Seek('=', employeeID); if (!rstEmployees.NoMatch) { - hireDate = new Date(rstEmployees.Fields.Item('HireDate').Value as VarDate); + hireDate = new Date(rstEmployees('HireDate').Value as VarDate); } return hireDate; }; -// manipulate multiple fields with DAO -- https://msdn.microsoft.com/VBA/Access-VBA/articles/manipulate-multivalued-fields-with-dao -const browseMultiValueField = () => { +// https://msdn.microsoft.com/VBA/Access-VBA/articles/manipulate-multivalued-fields-with-dao +{ + // manipulate multiple fields with DAO const rs = dbsNorthwind.OpenRecordset('Tasks'); rs.MoveFirst(); while (!rs.EOF) { - WScript.Echo(rs.Fields.Item('TaskName').Value); - const childRs = rs.Fields.Item('AssignedTo').Value as DAO.Recordset; + WScript.Echo(rs('TaskName').Value); + const childRs = rs('AssignedTo').Value as DAO.Recordset; if (childRs.EOF) { continue; } childRs.MoveFirst(); while (!childRs.EOF) { - WScript.Echo('\t' + childRs.Fields.Item('Value').Value); + WScript.Echo('\t' + childRs('Value').Value); } } -}; +} -// modifying an existing record in a DAO Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/modify-an-existing-record-in-a-dao-recordset -const changeTitleWithoutTransaction = () => { - rstEmployees = dbsNorthwind.OpenRecordset('Employees'); +// https://msdn.microsoft.com/VBA/Access-VBA/articles/modify-an-existing-record-in-a-dao-recordset +{ + // modifying an existing record in a DAO Recordset + const rstEmployees = dbsNorthwind.OpenRecordset('Employees'); while (!rstEmployees.EOF) { - if (rstEmployees.Fields.Item('Title').Value === 'Sales Representative') { + if (rstEmployees('Title').Value === 'Sales Representative') { rstEmployees.Edit(); - rstEmployees.Fields.Item('Title').Value = 'Account Executive'; + rstEmployees('Title').Value = 'Account Executive'; rstEmployees.Update(); } rstEmployees.MoveNext(); } rstEmployees.Close(); -}; +} -// using transactions in a DAO Recordset -- https://msdn.microsoft.com/VBA/Access-VBA/articles/use-transactions-in-a-dao-recordset +// https://msdn.microsoft.com/VBA/Access-VBA/articles/use-transactions-in-a-dao-recordset +/** using transactions in a DAO Recordset */ const changeTitleWithTransaction = (commitTransaction: boolean) => { - const currentWorkspace = engine.Workspaces.Item(0); - rstEmployees = dbsNorthwind.OpenRecordset('Employees'); + const currentWorkspace = engine.Workspaces(0); + const rstEmployees = dbsNorthwind.OpenRecordset('Employees'); currentWorkspace.BeginTrans(); while (!rstEmployees.EOF) { - if (rstEmployees.Fields.Item('Title').Value === 'Sales Representative') { + if (rstEmployees('Title').Value === 'Sales Representative') { rstEmployees.Edit(); - rstEmployees.Fields.Item('Title').Value = 'Account Executive'; + rstEmployees('Title').Value = 'Account Executive'; rstEmployees.Update(); } rstEmployees.MoveNext(); diff --git a/types/activex-dao/index.d.ts b/types/activex-dao/index.d.ts index 6db3e0bd0d..a2a159e324 100644 --- a/types/activex-dao/index.d.ts +++ b/types/activex-dao/index.d.ts @@ -1,8 +1,8 @@ -// Type definitions for Microsoft Office 14.0 Access Database Engine Object Library - DAO 14.0 +// Type definitions for Microsoft Office 16.0 Access Database Engine Object Library - DAO 16.0 // Project: https://msdn.microsoft.com/en-us/library/dn124645.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.6 declare namespace DAO { const enum _DAOSuppHelp { @@ -56,12 +56,15 @@ declare namespace DAO { } const enum DatabaseTypeEnum { + /** @deprecated */ dbDecrypt = 4, + /** @deprecated */ dbEncrypt = 2, dbVersion10 = 1, dbVersion11 = 8, dbVersion120 = 128, dbVersion140 = 256, + dbVersion150 = 512, dbVersion20 = 16, dbVersion30 = 32, dbVersion40 = 64, @@ -128,6 +131,15 @@ declare namespace DAO { dbRefreshCache = 8, } + const enum ISAMStatsEnum { + DiskReads = 0, + DiskWrites = 1, + LocksPlaced = 4, + LocksReleased = 5, + ReadsFromCache = 2, + ReadsFromReadAheadCache = 3, + } + const enum LanguageConstants { dbLangArabic = ';LANGID=0x0401;CP=1256;COUNTRY=0', dbLangChineseSimplified = ';LANGID=0x0804;CP=936;COUNTRY=0', @@ -308,18 +320,26 @@ declare namespace DAO { dbUseODBC = 1, } + type Bookmark = SafeArray; + + class ComplexType { + private 'DAO.ComplexType_typekey': ComplexType; + private constructor(); + readonly Fields: Fields; + } + class Connection { private 'DAO.Connection_typekey': Connection; private constructor(); Cancel(): void; Close(): void; readonly Connect: string; - CreateQueryDef(Name?: any, SQLText?: any): QueryDef; + CreateQueryDef(Name?: string, SQLText?: string): QueryDef; readonly Database: Database; - Execute(Query: string, Options?: any): void; + Execute(Query: string, Options?: RecordsetOptionEnum): void; readonly hDbc: number; readonly Name: string; - OpenRecordset(Name: string, Type?: any, Options?: any, LockEdit?: any): Recordset; + OpenRecordset(Name: string, Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum, LockEdit?: LockTypeEnum): Recordset; readonly QueryDefs: QueryDefs; QueryTimeout: number; readonly RecordsAffected: number; @@ -329,12 +349,11 @@ declare namespace DAO { readonly Updatable: boolean; } - class Connections { - private 'DAO.Connections_typekey': Connections; - private constructor(); + interface Connections { readonly Count: number; - Item(Item: any): Connection; + Item(Item: number | string): Connection; Refresh(): void; + (Item: number | string): Connection; } class Container { @@ -350,12 +369,11 @@ declare namespace DAO { UserName: string; } - class Containers { - private 'DAO.Containers_typekey': Containers; - private constructor(); + interface Containers { readonly Count: number; - Item(Item: any): Container; + Item(Item: number | string): Container; Refresh(): void; + (Item: number | string): Container; } class Database { @@ -366,16 +384,16 @@ declare namespace DAO { Connect: string; readonly Connection: Connection; readonly Containers: Containers; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; - CreateQueryDef(Name?: any, SQLText?: any): QueryDef; - CreateRelation(Name?: any, Table?: any, ForeignTable?: any, Attributes?: any): Relation; - CreateTableDef(Name?: any, Attributes?: any, SourceTableName?: any, Connect?: any): TableDef; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; + CreateQueryDef(Name?: string, SQLText?: string): QueryDef; + CreateRelation(Name?: string, Table?: string, ForeignTable?: string, Attributes?: RelationAttributeEnum): Relation; + CreateTableDef(Name?: string, Attributes?: TableDefAttributeEnum, SourceTableName?: string, Connect?: string): TableDef; DesignMasterID: string; - Execute(Query: string, Options?: any): void; - MakeReplica(PathName: string, Description: string, Options?: any): void; + Execute(Query: string, Options?: RecordsetOptionEnum): void; + MakeReplica(PathName: string, Description: string, Options?: ReplicaTypeEnum): void; readonly Name: string; NewPassword(bstrOld: string, bstrNew: string): void; - OpenRecordset(Name: string, Type?: any, Options?: any, LockEdit?: any): Recordset; + OpenRecordset(Name: string, Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum, LockEdit?: LockTypeEnum): Recordset; PopulatePartial(DbPathName: string): void; readonly Properties: Properties; readonly QueryDefs: QueryDefs; @@ -384,19 +402,18 @@ declare namespace DAO { readonly Recordsets: Recordsets; readonly Relations: Relations; readonly ReplicaID: string; - Synchronize(DbPathName: string, ExchangeType?: any): void; + Synchronize(DbPathName: string, ExchangeType?: SynchronizeTypeEnum): void; readonly TableDefs: TableDefs; readonly Transactions: boolean; readonly Updatable: boolean; readonly Version: string; } - class Databases { - private 'DAO.Databases_typekey': Databases; - private constructor(); + interface Databases { readonly Count: number; - Item(Item: any): Database; + Item(Item: number | string): Database; Refresh(): void; + (Item: number | string): Database; } class DBEngine { @@ -404,26 +421,51 @@ declare namespace DAO { private constructor(); BeginTrans(): void; - /** @param number [Option=0] */ + /** @param Option [Option=0] */ CommitTrans(Option?: number): void; - CompactDatabase(SrcName: string, DstName: string, DstLocale?: any, Options?: any, SrcLocale?: any): void; - CreateDatabase(Name: string, Locale: string, Option?: any): Database; - CreateWorkspace(Name: string, UserName: string, Password: string, UseType?: any): Workspace; + + /** + * Compact a closed database + * + * @param DstLocale Specify one of the following: + * * the locale, using one of the language constants + * * the password, in the form `;pwd=MyNewPassword'` + * * both the constant and a password, e.g. `dbLangGreek + ';pwd=MyNewPassword'` + * + * @param Options `dbEncrypt` and `dbDecrypt` are deprecated, and unsupported for ACCDB + * @param password Deprecated, and unsupported for ACCDB + */ + CompactDatabase(SrcName: string, DstName: string, DstLocale?: LanguageConstants | string, Options?: DatabaseTypeEnum, password?: string): void; + + /** + * @param Locale Specify one of the following: + * * the locale, using one of the language constants + * * the password, in the form `;pwd=MyNewPassword'` + * * both the constant and a password, e.g. `dbLangGreek + ';pwd=MyNewPassword'` + */ + CreateDatabase(Name: string, Locale: LanguageConstants | string, Option?: DatabaseTypeEnum): Database; + CreateWorkspace(Name: string, UserName: string, Password: string, UseType?: WorkspaceTypeEnum): Workspace; readonly DefaultPassword: string; DefaultType: number; readonly DefaultUser: string; readonly Errors: Errors; - Idle(Action?: any): void; + Idle(Action?: IdleEnum): void; IniPath: string; - ISAMStats(StatNum: number, Reset?: any): number; + + /** Returns various statistics from the Jet engine */ + ISAMStats(StatNum: ISAMStatsEnum, Reset?: boolean): number; LoginTimeout: number; - OpenConnection(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Connection; - OpenDatabase(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Database; + + /** + * @param Connect ODBC connection string; prepend with `ODBC;` + */ + OpenConnection(Name: string, Options?: DriverPromptEnum | RecordsetOptionEnum.dbRunAsync, ReadOnly?: boolean, Connect?: string): Connection; + OpenDatabase(Name: string, Exclusive?: boolean, ReadOnly?: boolean, Connect?: string): Database; readonly Properties: Properties; RegisterDatabase(Dsn: string, Driver: string, Silent: boolean, Attributes: string): void; RepairDatabase(Name: string): void; Rollback(): void; - SetOption(Option: number, Value: any): void; + SetOption(Option: SetOptionEnum, Value: any): void; SystemDB: string; readonly Version: string; readonly Workspaces: Workspaces; @@ -434,9 +476,9 @@ declare namespace DAO { private constructor(); readonly AllPermissions: number; readonly Container: string; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; - readonly DateCreated: any; - readonly LastUpdated: any; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; + readonly DateCreated: VarDate; + readonly LastUpdated: VarDate; readonly Name: string; Owner: string; Permissions: number; @@ -444,12 +486,11 @@ declare namespace DAO { UserName: string; } - class Documents { - private 'DAO.Documents_typekey': Documents; - private constructor(); + interface Documents { readonly Count: number; - Item(Item: any): Document; + Item(Item: number | string): Document; Refresh(): void; + (Item: number | string): Document; } class Error { @@ -462,33 +503,38 @@ declare namespace DAO { readonly Source: string; } - class Errors { - private 'DAO.Errors_typekey': Errors; - private constructor(); + interface Errors { readonly Count: number; Item(Item: any): Error; Refresh(): void; + (Item: any): Error; } class Field { - private 'DAO.Field_typekey': Field; private constructor(); + private 'DAO.Field2_typekey': Field; AllowZeroLength: boolean; AppendChunk(Val: any): void; + AppendOnly: boolean; Attributes: number; readonly CollatingOrder: number; readonly CollectionIndex: number; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; + readonly ComplexType: ComplexType; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; readonly DataUpdatable: boolean; DefaultValue: any; + Expression: string; readonly FieldSize: number; ForeignName: string; GetChunk(Offset: number, Bytes: number): any; + readonly IsComplex: boolean; + LoadFromFile(FileName: string): void; Name: string; OrdinalPosition: number; readonly OriginalValue: any; readonly Properties: Properties; Required: boolean; + SaveToFile(FileName: string): void; Size: number; readonly SourceField: string; readonly SourceTable: string; @@ -500,44 +546,42 @@ declare namespace DAO { readonly VisibleValue: any; } - class Fields { - private 'DAO.Fields_typekey': Fields; - private constructor(); - Append(Object: any): void; + interface Fields { + Append(Field: Field): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Field; + Item(Item: number | string): Field; Refresh(): void; + (Item: number | string): Field; } class Group { private 'DAO.Group_typekey': Group; private constructor(); - CreateUser(Name?: any, PID?: any, Password?: any): User; + CreateUser(Name?: string, PID?: string, Password?: string): User; Name: string; readonly PID: string; readonly Properties: Properties; readonly Users: Users; } - class Groups { - private 'DAO.Groups_typekey': Groups; - private constructor(); - Append(Object: any): void; + interface Groups { + Append(Group: Group): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Group; + Item(Item: number | string): Group; Refresh(): void; + (Item: number | string): Group; } class Index { private 'DAO.Index_typekey': Index; private constructor(); Clustered: boolean; - CreateField(Name?: any, Type?: any, Size?: any): Field; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; + CreateField(Name?: string): Field; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; readonly DistinctCount: number; - Fields: any; + Fields: Fields; readonly Foreign: boolean; IgnoreNulls: boolean; Name: string; @@ -547,14 +591,14 @@ declare namespace DAO { Unique: boolean; } - class Indexes { - private 'DAO.Indexes_typekey': Indexes; - private constructor(); - Append(Object: any): void; + // tslint:disable-next-line:interface-name + interface Indexes { + Append(Index: Index): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Index; + Item(Item: number | string): Index; Refresh(): void; + (Item: number | string): Index; } class Parameter { @@ -567,53 +611,20 @@ declare namespace DAO { Value: any; } - class Parameters { - private 'DAO.Parameters_typekey': Parameters; - private constructor(); + interface Parameters { readonly Count: number; - Item(Item: any): Parameter; + Item(Item: number | string): Parameter; Refresh(): void; + (Item: number | string): Parameter; } - /** DAO 3.0 DBEngine (private) */ - class PrivDBEngine { - private 'DAO.PrivDBEngine_typekey': PrivDBEngine; - private constructor(); - BeginTrans(): void; - - /** @param number [Option=0] */ - CommitTrans(Option?: number): void; - CompactDatabase(SrcName: string, DstName: string, DstLocale?: any, Options?: any, SrcLocale?: any): void; - CreateDatabase(Name: string, Locale: string, Option?: any): Database; - CreateWorkspace(Name: string, UserName: string, Password: string, UseType?: any): Workspace; - readonly DefaultPassword: string; - DefaultType: number; - readonly DefaultUser: string; - readonly Errors: Errors; - Idle(Action?: any): void; - IniPath: string; - ISAMStats(StatNum: number, Reset?: any): number; - LoginTimeout: number; - OpenConnection(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Connection; - OpenDatabase(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Database; - readonly Properties: Properties; - RegisterDatabase(Dsn: string, Driver: string, Silent: boolean, Attributes: string): void; - RepairDatabase(Name: string): void; - Rollback(): void; - SetOption(Option: number, Value: any): void; - SystemDB: string; - readonly Version: string; - readonly Workspaces: Workspaces; - } - - class Properties { - private 'DAO.Properties_typekey': Properties; - private constructor(); - Append(Object: any): void; + interface Properties { + Append(Property: Property): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Property; + Item(Item: number | string): Property; Refresh(): void; + (Item: number | string): Property; } class Property { @@ -633,81 +644,78 @@ declare namespace DAO { Cancel(): void; Close(): void; Connect: string; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; - readonly DateCreated: any; - Execute(Options?: any): void; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; + readonly DateCreated: VarDate; + Execute(Options?: RecordsetOptionEnum): void; readonly Fields: Fields; readonly hStmt: number; - readonly LastUpdated: any; + readonly LastUpdated: VarDate; MaxRecords: number; Name: string; ODBCTimeout: number; - OpenRecordset(Type?: any, Options?: any, LockEdit?: any): Recordset; + OpenRecordset(Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum, LockEdit?: LockTypeEnum): Recordset; readonly Parameters: Parameters; - Prepare: any; + Prepare: QueryDefStateEnum; readonly Properties: Properties; readonly RecordsAffected: number; ReturnsRecords: boolean; SQL: string; readonly StillExecuting: boolean; - readonly Type: number; + readonly Type: QueryDefTypeEnum; readonly Updatable: boolean; } - class QueryDefs { - private 'DAO.QueryDefs_typekey': QueryDefs; - private constructor(); - Append(Object: any): void; + interface QueryDefs { + Append(QueryDef: QueryDef): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): QueryDef; + Item(Item: number | string): QueryDef; Refresh(): void; + (Item: number | string): QueryDef; } - class Recordset { - private 'DAO.Recordset_typekey': Recordset; - private constructor(); + interface Recordset { AbsolutePosition: number; AddNew(): void; readonly BatchCollisionCount: number; - readonly BatchCollisions: any; + readonly BatchCollisions: SafeArray; BatchSize: number; readonly BOF: boolean; - Bookmark: SafeArray; + Bookmark: Bookmark; readonly Bookmarkable: boolean; CacheSize: number; - CacheStart: SafeArray; + CacheStart: Bookmark; Cancel(): void; - /** @param number [UpdateType=1] */ + /** @param UpdateType [UpdateType=1] */ CancelUpdate(UpdateType?: number): void; Clone(): Recordset; Close(): void; Collect(Item: any): any; Connection: Connection; CopyQueryDef(): QueryDef; - readonly DateCreated: any; + readonly DateCreated: VarDate; Delete(): void; Edit(): void; - readonly EditMode: number; + readonly EditMode: EditModeEnum; readonly EOF: boolean; readonly Fields: Fields; - FillCache(Rows?: any, StartBookmark?: any): void; + FillCache(Rows?: number, StartBookmark?: string): void; Filter: string; FindFirst(Criteria: string): void; FindLast(Criteria: string): void; FindNext(Criteria: string): void; FindPrevious(Criteria: string): void; - GetRows(NumRows?: any): any; + GetRows(NumRows?: number): any; readonly hStmt: number; Index: string; - readonly LastModified: SafeArray; - readonly LastUpdated: any; + readonly LastModified: Bookmark; + readonly LastUpdated: VarDate; LockEdits: boolean; - Move(Rows: number, StartBookmark?: any): void; + Move(Rows: number, StartBookmark?: Bookmark): void; MoveFirst(): void; - /** @param number [Options=0] */ + /** @param Options [Options=0] */ MoveLast(Options?: number): void; MoveNext(): void; MovePrevious(): void; @@ -716,45 +724,44 @@ declare namespace DAO { readonly NoMatch: boolean; readonly ODBCFetchCount: number; readonly ODBCFetchDelay: number; - OpenRecordset(Type?: any, Options?: any): Recordset; + OpenRecordset(Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum): Recordset; readonly Parent: Database; PercentPosition: number; readonly Properties: Properties; readonly RecordCount: number; readonly RecordStatus: number; - Requery(NewQueryDef?: any): void; + Requery(NewQueryDef?: QueryDef): void; readonly Restartable: boolean; - Seek( - Comparison: string, Key1: any, Key2?: any, Key3?: any, Key4?: any, Key5?: any, Key6?: any, Key7?: any, Key8?: any, Key9?: any, Key10?: any, Key11?: any, Key12?: any, Key13?: any): void; + Seek(Comparison: string, Key1: any, Key2?: any, Key3?: any, Key4?: any, Key5?: any, Key6?: any, Key7?: any, Key8?: any, Key9?: any, Key10?: any, Key11?: any, Key12?: any, Key13?: any): void; Sort: string; readonly StillExecuting: boolean; readonly Transactions: boolean; - readonly Type: number; + readonly Type: RecordsetTypeEnum; readonly Updatable: boolean; /** - * @param number [UpdateType=1] - * @param boolean [Force=false] + * @param UpdateType [UpdateType=1] + * @param Force [Force=false] */ - Update(UpdateType?: number, Force?: boolean): void; - UpdateOptions: number; + Update(UpdateType?: UpdateTypeEnum, Force?: boolean): void; + UpdateOptions: UpdateCriteriaEnum; readonly ValidationRule: string; readonly ValidationText: string; + (FieldIndex: number | string): Field; } - class Recordsets { - private 'DAO.Recordsets_typekey': Recordsets; - private constructor(); + interface Recordsets { readonly Count: number; - Item(Item: any): Recordset; + Item(Item: number | string): Recordset; Refresh(): void; + (Item: number | string): Recordset; } class Relation { private 'DAO.Relation_typekey': Relation; private constructor(); - Attributes: number; - CreateField(Name?: any, Type?: any, Size?: any): Field; + Attributes: RelationAttributeEnum; + CreateField(Name?: string): Field; readonly Fields: Fields; ForeignTable: string; Name: string; @@ -763,55 +770,53 @@ declare namespace DAO { Table: string; } - class Relations { - private 'DAO.Relations_typekey': Relations; - private constructor(); - Append(Object: any): void; + interface Relations { + Append(Relation: Relation): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Relation; + Item(Item: number | string): Relation; Refresh(): void; + (Item: number | string): Relation; } class TableDef { private 'DAO.TableDef_typekey': TableDef; private constructor(); - Attributes: number; + Attributes: TableDefAttributeEnum; readonly ConflictTable: string; Connect: string; - CreateField(Name?: any, Type?: any, Size?: any): Field; - CreateIndex(Name?: any): Index; - CreateProperty(Name?: any, Type?: any, Value?: any, DDL?: any): Property; - readonly DateCreated: any; + CreateField(Name?: string, Type?: DataTypeEnum, Size?: number): Field; + CreateIndex(Name?: string): Index; + CreateProperty(Name?: string, Type?: DataTypeEnum, Value?: any, DDL?: boolean): Property; + readonly DateCreated: VarDate; readonly Fields: Fields; readonly Indexes: Indexes; - readonly LastUpdated: any; + readonly LastUpdated: VarDate; Name: string; - OpenRecordset(Type?: any, Options?: any): Recordset; + OpenRecordset(Type?: RecordsetTypeEnum, Options?: RecordsetOptionEnum): Recordset; readonly Properties: Properties; readonly RecordCount: number; RefreshLink(): void; - ReplicaFilter: any; + ReplicaFilter: string | boolean; SourceTableName: string; readonly Updatable: boolean; ValidationRule: string; ValidationText: string; } - class TableDefs { - private 'DAO.TableDefs_typekey': TableDefs; - private constructor(); - Append(Object: any): void; + interface TableDefs { + Append(TableDef: TableDef): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): TableDef; + Item(Item: number | string): TableDef; Refresh(): void; + (Item: number | string): TableDef; } class User { private 'DAO.User_typekey': User; private constructor(); - CreateGroup(Name?: any, PID?: any): Group; + CreateGroup(Name?: string, PID?: string): Group; readonly Groups: Groups; Name: string; NewPassword(bstrOld: string, bstrNew: string): void; @@ -820,14 +825,13 @@ declare namespace DAO { readonly Properties: Properties; } - class Users { - private 'DAO.Users_typekey': Users; - private constructor(); - Append(Object: any): void; + interface Users { + Append(User: User): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): User; + Item(Item: number | string): User; Refresh(): void; + (Item: number | string): User; } class Workspace { @@ -836,12 +840,19 @@ declare namespace DAO { BeginTrans(): void; Close(): void; - /** @param number [Options=0] */ + /** @param Options [Options=0] */ CommitTrans(Options?: number): void; readonly Connections: Connections; - CreateDatabase(Name: string, Connect: string, Option?: any): Database; - CreateGroup(Name?: any, PID?: any): Group; - CreateUser(Name?: any, PID?: any, Password?: any): User; + + /** + * @param Connect Specify one of the following: + * * the locale, using one of the language constants + * * the password, in the form `;pwd=MyNewPassword'` + * * both the constant and a password, e.g. `dbLangGreek + ';pwd=MyNewPassword'` + */ + CreateDatabase(Name: string, Connect: string, Option?: DatabaseTypeEnum): Database; + CreateGroup(Name?: string, PID?: string): Group; + CreateUser(Name?: string, PID?: string, Password?: string): User; readonly Databases: Databases; DefaultCursorDriver: number; readonly Groups: Groups; @@ -849,8 +860,12 @@ declare namespace DAO { IsolateODBCTrans: number; LoginTimeout: number; Name: string; - OpenConnection(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Connection; - OpenDatabase(Name: string, Options?: any, ReadOnly?: any, Connect?: any): Database; + + /** + * @param Connect ODBC connection string; prepend with `ODBC;` + */ + OpenConnection(Name: string, Options?: DriverPromptEnum | RecordsetOptionEnum.dbRunAsync, ReadOnly?: boolean, Connect?: string): Connection; + OpenDatabase(Name: string, Exclusive?: boolean, ReadOnly?: boolean, Connect?: string): Database; readonly Properties: Properties; Rollback(): void; readonly Type: number; @@ -858,14 +873,13 @@ declare namespace DAO { readonly Users: Users; } - class Workspaces { - private 'DAO.Workspaces_typekey': Workspaces; - private constructor(); - Append(Object: any): void; + interface Workspaces { + Append(Workspace: Workspace): void; readonly Count: number; Delete(Name: string): void; - Item(Item: any): Workspace; + Item(Item: number | string): Workspace; Refresh(): void; + (Item: number | string): Workspace; } } @@ -875,36 +889,12 @@ interface ActiveXObject { interface ActiveXObjectNameMap { 'DAO.DBEngine': DAO.DBEngine; - 'DAO.DBEngine.120': DAO.DBEngine; 'DAO.Field': DAO.Field; 'DAO.Group': DAO.Group; 'DAO.Index': DAO.Index; - 'DAO.PrivateDBEngine': DAO.PrivDBEngine; + 'DAO.PrivateDBEngine': DAO.DBEngine; 'DAO.QueryDef': DAO.QueryDef; 'DAO.Relation': DAO.Relation; 'DAO.TableDef': DAO.TableDef; 'DAO.User': DAO.User; } - -interface EnumeratorConstructor { - new(col: DAO.Connections): Enumerator; - new(col: DAO.Containers): Enumerator; - new(col: DAO.Databases): Enumerator; - new(col: DAO.Documents): Enumerator; - new(col: DAO.Errors): Enumerator; - new(col: DAO.Fields): Enumerator; - new(col: DAO.Groups): Enumerator; - new(col: DAO.Indexes): Enumerator; - new(col: DAO.Parameters): Enumerator; - new(col: DAO.Properties): Enumerator; - new(col: DAO.QueryDefs): Enumerator; - new(col: DAO.Recordsets): Enumerator; - new(col: DAO.Relations): Enumerator; - new(col: DAO.TableDefs): Enumerator; - new(col: DAO.Users): Enumerator; - new(col: DAO.Workspaces): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-excel/activex-excel-tests.ts b/types/activex-excel/activex-excel-tests.ts index b93a924263..4e577300e5 100644 --- a/types/activex-excel/activex-excel-tests.ts +++ b/types/activex-excel/activex-excel-tests.ts @@ -279,7 +279,7 @@ const setColumnVisibility = (visible: boolean) => { const data = sheet.Range("L2", sheet.Range('L100').End(Excel.XlDirection.xlUp)).Value() as SafeArray; sheet.Range('L1', sheet.Range('L100').End(Excel.XlDirection.xlUp)).ClearContents(); - const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox2; + const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox; combobox.Clear(); ActiveXObject.set(combobox, 'List', [], data); combobox.ListIndex = -1; @@ -293,7 +293,7 @@ const setColumnVisibility = (visible: boolean) => { const dict = new ActiveXObject('Scripting.Dictionary'); arr.forEach(x => ActiveXObject.set(dict, 'Item', [x], true)); - const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox2; + const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox; combobox.Clear(); const enumerator = new Enumerator(dict.Items()); enumerator.moveFirst(); diff --git a/types/activex-interop/activex-interop-tests.ts b/types/activex-interop/activex-interop-tests.ts new file mode 100644 index 0000000000..e2ece7401e --- /dev/null +++ b/types/activex-interop/activex-interop-tests.ts @@ -0,0 +1,49 @@ +// copied from the definitions in activex-scripting +interface Dictionary { + /** Add a new key and item to the dictionary. */ + Add(Key: TKey, Item: TItem): void; + + /** Get the number of items in the dictionary. */ + readonly Count: number; + + /** Determine if a given key is in the dictionary. */ + Exists(Key: TKey): boolean; + HashVal(Key: TKey): any; + + /** Set or get the item for a given key */ + Item(Key: TKey): TItem; + + /** Get an array containing all items in the dictionary. */ + Items(): SafeArray; + + /** Change a key to a different key. */ + Key(Key: TKey): TKey; + + /** Get an array containing all keys in the dictionary. */ + Keys(): SafeArray; + + /** Remove a given key from the dictionary. */ + Remove(Key: TKey): void; + + /** Remove all information from the dictionary. */ + RemoveAll(): void; + + /** Set or get the item for a given key */ + (Key: TKey): TItem; +} + +interface ActiveXObjectNameMap { + 'Scripting.Dictionary': Dictionary; +} + +const dict: Dictionary = new ActiveXObject('Scripting.Dictionary'); +dict.Add('one', 1); +dict.Add('two', 2); +dict.Add('three', 3); + +const keyEnumerator = new Enumerator(dict.Keys()); +keyEnumerator.moveFirst(); +while (!keyEnumerator.atEnd()) { + const item = dict(keyEnumerator.item()); + const power = Math.pow(item, 2); +} diff --git a/types/activex-interop/index.d.ts b/types/activex-interop/index.d.ts new file mode 100644 index 0000000000..caa74fff38 --- /dev/null +++ b/types/activex-interop/index.d.ts @@ -0,0 +1,111 @@ +// Type definitions for Javascript Automation interop 0.0 +// Project: https://msdn.microsoft.com/en-us/library/ff521046(v=vs.85).aspx +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// tslint:disable-next-line no-empty-interface +interface ActiveXObjectNameMap { } + +interface ActiveXObject { + new (progid: K): ActiveXObjectNameMap[K]; + new(s: string): any; +} +declare var ActiveXObject: ActiveXObject; + +/** + * Represents an Automation SAFEARRAY + */ +declare class SafeArray { + private constructor(); + private SafeArray_typekey: SafeArray; +} + +/** + * Allows enumerating over a COM collection, which may not have indexed item access. + */ +interface Enumerator { + /** + * Returns true if the current item is the last one in the collection, or the collection is empty, + * or the current item is undefined. + */ + atEnd(): boolean; + + /** + * Returns the current item in the collection + */ + item(): T; + + /** + * Resets the current item in the collection to the first item. If there are no items in the collection, + * the current item is set to undefined. + */ + moveFirst(): void; + + /** + * Moves the current item to the next item in the collection. If the enumerator is at the end of + * the collection or the collection is empty, the current item is set to undefined. + */ + moveNext(): void; +} + +interface EnumeratorConstructor { + new (collection: SafeArray | { Item(index: any): T }): Enumerator; + new (collection: any): Enumerator; +} + +declare var Enumerator: EnumeratorConstructor; + +/** + * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions. + */ +interface VBArray { + /** + * Returns the number of dimensions (1-based). + */ + dimensions(): number; + + /** + * Takes an index for each dimension in the array, and returns the item at the corresponding location. + */ + getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T; + + /** + * Returns the smallest available index for a given dimension. + * @param dimension 1-based dimension (defaults to 1) + */ + lbound(dimension?: number): number; + + /** + * Returns the largest available index for a given dimension. + * @param dimension 1-based dimension (defaults to 1) + */ + ubound(dimension?: number): number; + + /** + * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions, + * each successive dimension is appended to the end of the array. + * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6] + */ + toArray(): T[]; +} + +interface VBArrayConstructor { + new (safeArray: SafeArray): VBArray; +} + +declare var VBArray: VBArrayConstructor; + +/** Automation date (VT_DATE) */ +declare class VarDate { + private constructor(); + private VarDate_typekey: VarDate; +} + +interface DateConstructor { + new(vd: VarDate): Date; +} + +interface Date { + getVarDate: () => VarDate; +} diff --git a/types/activex-interop/tsconfig.json b/types/activex-interop/tsconfig.json new file mode 100644 index 0000000000..49c7698384 --- /dev/null +++ b/types/activex-interop/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ "../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-interop-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-iwshruntimelibrary/tslint.json b/types/activex-interop/tslint.json similarity index 100% rename from types/activex-iwshruntimelibrary/tslint.json rename to types/activex-interop/tslint.json diff --git a/types/activex-msforms/index.d.ts b/types/activex-msforms/index.d.ts index 45acebbdb3..c896cc4bf5 100644 --- a/types/activex-msforms/index.d.ts +++ b/types/activex-msforms/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/VBA/Language-Reference-VBA/articles/reference-microsoft-forms // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// @@ -361,48 +361,11 @@ declare namespace MSForms { WordWrap: boolean; } - class CheckBox2 { - private 'MSForms.CheckBox2_typekey': CheckBox2; - private constructor(); - readonly _Font_Reserved: NewFont; - Accelerator: string; - Alignment: fmAlignment; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BordersSuppress: boolean; - Caption: string; - readonly DisplayStyle: fmDisplayStyle; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - GroupName: string; - Locked: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiSelect: fmMultiSelect; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - SpecialEffect: fmButtonEffect; - TextAlign: fmTextAlign; - TripleState: boolean; - readonly Valid: boolean; - Value: any; - WordWrap: boolean; - } - class ComboBox { private 'MSForms.ComboBox_typekey': ComboBox; private constructor(); readonly _Font_Reserved: NewFont; - AddItem(pvargItem?: any, pvargIndex?: any): void; + AddItem(pvargItem?: number, pvargIndex?: number): void; AutoSize: boolean; AutoTab: boolean; AutoWordSelect: boolean; @@ -411,10 +374,11 @@ declare namespace MSForms { BorderColor: number; BordersSuppress: boolean; BorderStyle: fmBorderStyle; - BoundColumn: any; + BoundColumn: number; readonly CanPaste: boolean; Clear(): void; - Column(pvargColumn?: any, pvargIndex?: any): any; + Column(pvargColumn: number, pvargIndex?: number): any; + Column(): SafeArray; ColumnCount: number; ColumnHeads: boolean; ColumnWidths: string; @@ -441,13 +405,14 @@ declare namespace MSForms { HideSelection: boolean; IMEMode: fmIMEMode; readonly LineCount: number; - List(pvargIndex?: any, pvargColumn?: any): any; + List(pvargIndex: number, pvargColumn?: number): any; + List(): SafeArray; readonly ListCount: number; ListCursor: any; - ListIndex: any; + ListIndex: number; ListRows: number; ListStyle: fmListStyle; - ListWidth: any; + ListWidth: number; Locked: boolean; MatchEntry: fmMatchEntry; readonly MatchFound: boolean; @@ -456,7 +421,7 @@ declare namespace MSForms { MouseIcon: stdole.StdPicture; MousePointer: fmMousePointer; Paste(): void; - RemoveItem(pvargIndex: any): void; + RemoveItem(pvargIndex: number): boolean; SelectionMargin: boolean; SelLength: number; SelStart: number; @@ -466,84 +431,9 @@ declare namespace MSForms { Style: fmStyle; Text: string; TextAlign: fmTextAlign; - TextColumn: any; + TextColumn: number; readonly TextLength: number; - TopIndex: any; - readonly Valid: boolean; - Value: any; - } - - class ComboBox2 { - private 'MSForms.ComboBox2_typekey': ComboBox2; - private constructor(); - readonly _Font_Reserved: NewFont; - AddItem(pvargItem?: any, pvargIndex?: any): void; - AutoSize: boolean; - AutoTab: boolean; - AutoWordSelect: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BorderColor: number; - BordersSuppress: boolean; - BorderStyle: fmBorderStyle; - BoundColumn: any; - readonly CanPaste: boolean; - Clear(): void; - Column(pvargColumn?: any, pvargIndex?: any): any; - ColumnCount: number; - ColumnHeads: boolean; - ColumnWidths: string; - Copy(): void; - readonly CurTargetX: number; - readonly CurTargetY: number; - CurX: number; - Cut(): void; - readonly DisplayStyle: fmDisplayStyle; - DragBehavior: fmDragBehavior; - DropButtonStyle: fmDropButtonStyle; - DropDown(): void; - Enabled: boolean; - EnterFieldBehavior: fmEnterFieldBehavior; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - HideSelection: boolean; - IMEMode: fmIMEMode; - readonly LineCount: number; - List(pvargIndex?: any, pvargColumn?: any): any; - readonly ListCount: number; - ListCursor: any; - ListIndex: any; - ListRows: number; - ListStyle: fmListStyle; - ListWidth: any; - Locked: boolean; - MatchEntry: fmMatchEntry; - readonly MatchFound: boolean; - MatchRequired: boolean; - MaxLength: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Paste(): void; - RemoveItem(pvargIndex: any): void; - SelectionMargin: boolean; - SelLength: number; - SelStart: number; - SelText: string; - ShowDropButtonWhen: fmShowDropButtonWhen; - SpecialEffect: fmSpecialEffect; - Style: fmStyle; - Text: string; - TextAlign: fmTextAlign; - TextColumn: any; - readonly TextLength: number; - TopIndex: any; + TopIndex: number; readonly Valid: boolean; Value: any; } @@ -577,35 +467,6 @@ declare namespace MSForms { WordWrap: boolean; } - class CommandButton2 { - private 'MSForms.CommandButton2_typekey': CommandButton2; - private constructor(); - readonly _Font_Reserved: NewFont; - Accelerator: string; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - Caption: string; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - Locked: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - TakeFocusOnClick: boolean; - Value: boolean; - WordWrap: boolean; - } - class Control { private 'MSForms.Control_typekey': Control; private constructor(); @@ -656,9 +517,7 @@ declare namespace MSForms { ZOrder(zPosition?: any): void; } - class Controls { - private 'MSForms.Controls_typekey': Controls; - private constructor(); + interface Controls { _AddByClass(clsid: number): Control; _GetItemByID(ID: number): Control; _GetItemByIndex(lIndex: number): Control; @@ -679,6 +538,7 @@ declare namespace MSForms { SelectAll(): void; SendBackward(): void; SendToBack(): void; + (varg: any): any; } class DataObject { @@ -693,18 +553,6 @@ declare namespace MSForms { StartDrag(OKEffect?: any): fmDropEffect; } - class DataObject2 { - private 'MSForms.DataObject2_typekey': DataObject2; - private constructor(); - Clear(): void; - GetFormat(Format: any): boolean; - GetFromClipboard(): void; - GetText(Format?: any): string; - PutInClipboard(): void; - SetText(Text: string, Format?: any): void; - StartDrag(OKEffect?: any): fmDropEffect; - } - class Frame { private 'MSForms.Frame_typekey': Frame; private constructor(); @@ -770,71 +618,6 @@ declare namespace MSForms { Zoom: number; } - class Frame2 { - private 'MSForms.Frame2_typekey': Frame2; - private constructor(); - readonly _Font_Reserved: NewFont; - _GetGridX(GridX: number): void; - _GetGridY(GridY: number): void; - _GetInsideHeight(InsideHeight: number): void; - _GetInsideWidth(InsideWidth: number): void; - _GetScrollHeight(ScrollHeight: number): void; - _GetScrollLeft(ScrollLeft: number): void; - _GetScrollTop(ScrollTop: number): void; - _GetScrollWidth(ScrollWidth: number): void; - _SetGridX(GridX: number): void; - _SetGridY(GridY: number): void; - _SetScrollHeight(ScrollHeight: number): void; - _SetScrollLeft(ScrollLeft: number): void; - _SetScrollTop(ScrollTop: number): void; - _SetScrollWidth(ScrollWidth: number): void; - readonly ActiveControl: Control; - BackColor: number; - BorderColor: number; - BorderStyle: fmBorderStyle; - readonly CanPaste: boolean; - readonly CanRedo: boolean; - readonly CanUndo: boolean; - Caption: string; - readonly Controls: Controls; - Copy(): void; - Cut(): void; - Cycle: fmCycle; - DesignMode: fmMode; - Enabled: boolean; - Font: NewFont; - ForeColor: number; - GridX: number; - GridY: number; - readonly InsideHeight: number; - readonly InsideWidth: number; - KeepScrollBarsVisible: fmScrollBars; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Paste(): void; - Picture: stdole.StdPicture; - PictureAlignment: fmPictureAlignment; - PictureSizeMode: fmPictureSizeMode; - PictureTiling: boolean; - RedoAction(): void; - Repaint(): void; - Scroll(xAction?: any, yAction?: any): void; - ScrollBars: fmScrollBars; - ScrollHeight: number; - ScrollLeft: number; - ScrollTop: number; - ScrollWidth: number; - readonly Selected: Controls; - SetDefaultTabOrder(): void; - ShowGridDots: fmMode; - ShowToolbox: fmMode; - SnapToGrid: fmMode; - SpecialEffect: fmSpecialEffect; - UndoAction(): void; - VerticalScrollBarSide: fmVerticalScrollBarSide; - Zoom: number; - } - class HTMLCheckbox { private 'MSForms.HTMLCheckbox_typekey': HTMLCheckbox; private constructor(); @@ -844,15 +627,6 @@ declare namespace MSForms { Value: string; } - class HTMLCheckbox2 { - private 'MSForms.HTMLCheckbox2_typekey': HTMLCheckbox2; - private constructor(); - Checked: boolean; - HTMLName: string; - HTMLType: string; - Value: string; - } - class HTMLHidden { private 'MSForms.HTMLHidden_typekey': HTMLHidden; private constructor(); @@ -861,14 +635,6 @@ declare namespace MSForms { Value: string; } - class HTMLHidden2 { - private 'MSForms.HTMLHidden2_typekey': HTMLHidden2; - private constructor(); - HTMLName: string; - HTMLType: string; - Value: string; - } - class HTMLImage { private 'MSForms.HTMLImage_typekey': HTMLImage; private constructor(); @@ -880,17 +646,6 @@ declare namespace MSForms { Source: string; } - class HTMLImage2 { - private 'MSForms.HTMLImage2_typekey': HTMLImage2; - private constructor(); - Action: string; - Encoding: string; - HTMLName: string; - HTMLType: string; - Method: string; - Source: string; - } - class HTMLOption { private 'MSForms.HTMLOption_typekey': HTMLOption; private constructor(); @@ -901,16 +656,6 @@ declare namespace MSForms { Value: string; } - class HTMLOption2 { - private 'MSForms.HTMLOption2_typekey': HTMLOption2; - private constructor(); - Checked: boolean; - readonly DisplayStyle: fmDisplayStyle; - HTMLName: string; - HTMLType: string; - Value: string; - } - class HTMLPassword { private 'MSForms.HTMLPassword_typekey': HTMLPassword; private constructor(); @@ -921,16 +666,6 @@ declare namespace MSForms { Width: number; } - class HTMLPassword2 { - private 'MSForms.HTMLPassword2_typekey': HTMLPassword2; - private constructor(); - HTMLName: string; - HTMLType: string; - MaxLength: number; - Value: string; - Width: number; - } - class HTMLReset { private 'MSForms.HTMLReset_typekey': HTMLReset; private constructor(); @@ -939,14 +674,6 @@ declare namespace MSForms { HTMLType: string; } - class HTMLReset2 { - private 'MSForms.HTMLReset2_typekey': HTMLReset2; - private constructor(); - Caption: string; - HTMLName: string; - HTMLType: string; - } - class HTMLSelect { private 'MSForms.HTMLSelect_typekey': HTMLSelect; private constructor(); @@ -958,17 +685,6 @@ declare namespace MSForms { Values: any; } - class HTMLSelect2 { - private 'MSForms.HTMLSelect2_typekey': HTMLSelect2; - private constructor(); - DisplayValues: any; - HTMLName: string; - MultiSelect: boolean; - Selected: string; - Size: number; - Values: any; - } - class HTMLSubmit { private 'MSForms.HTMLSubmit_typekey': HTMLSubmit; private constructor(); @@ -980,17 +696,6 @@ declare namespace MSForms { Method: string; } - class HTMLSubmit2 { - private 'MSForms.HTMLSubmit2_typekey': HTMLSubmit2; - private constructor(); - Action: string; - Caption: string; - Encoding: string; - HTMLName: string; - HTMLType: string; - Method: string; - } - class HTMLText { private 'MSForms.HTMLText_typekey': HTMLText; private constructor(); @@ -1001,16 +706,6 @@ declare namespace MSForms { Width: number; } - class HTMLText2 { - private 'MSForms.HTMLText2_typekey': HTMLText2; - private constructor(); - HTMLName: string; - HTMLType: string; - MaxLength: number; - Value: string; - Width: number; - } - class HTMLTextArea { private 'MSForms.HTMLTextArea_typekey': HTMLTextArea; private constructor(); @@ -1021,16 +716,6 @@ declare namespace MSForms { WordWrap: string; } - class HTMLTextArea2 { - private 'MSForms.HTMLTextArea2_typekey': HTMLTextArea2; - private constructor(); - Columns: number; - HTMLName: string; - Rows: number; - Value: string; - WordWrap: string; - } - class Image { private 'MSForms.Image_typekey': Image; private constructor(); @@ -1049,24 +734,6 @@ declare namespace MSForms { SpecialEffect: fmSpecialEffect; } - class Image2 { - private 'MSForms.Image2_typekey': Image2; - private constructor(); - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BorderColor: number; - BorderStyle: fmBorderStyle; - Enabled: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Picture: stdole.StdPicture; - PictureAlignment: fmPictureAlignment; - PictureSizeMode: fmPictureSizeMode; - PictureTiling: boolean; - SpecialEffect: fmSpecialEffect; - } - class Label { private 'MSForms.Label_typekey': Label; private constructor(); @@ -1098,37 +765,6 @@ declare namespace MSForms { WordWrap: boolean; } - class Label2 { - private 'MSForms.Label2_typekey': Label2; - private constructor(); - readonly _Font_Reserved: NewFont; - _Value: string; - Accelerator: string; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BorderColor: number; - BorderStyle: fmBorderStyle; - Caption: string; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - SpecialEffect: fmSpecialEffect; - TextAlign: fmTextAlign; - WordWrap: boolean; - } - class ListBox { private 'MSForms.ListBox_typekey': ListBox; private constructor(); @@ -1140,7 +776,8 @@ declare namespace MSForms { BorderStyle: fmBorderStyle; BoundColumn: any; Clear(): void; - Column(pvargColumn?: any, pvargIndex?: any): any; + Column(pvargColumn: number, pvargIndex?: number): any; + Column(): SafeArray; ColumnCount: number; ColumnHeads: boolean; ColumnWidths: string; @@ -1157,57 +794,8 @@ declare namespace MSForms { ForeColor: number; IMEMode: fmIMEMode; IntegralHeight: boolean; - List(pvargIndex?: any, pvargColumn?: any): any; - readonly ListCount: number; - ListCursor: any; - ListIndex: any; - ListStyle: fmListStyle; - ListWidth: any; - Locked: boolean; - MatchEntry: fmMatchEntry; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiSelect: fmMultiSelect; - RemoveItem(pvargIndex: any): void; - Selected(pvargIndex: any): boolean; - SpecialEffect: fmSpecialEffect; - Text: string; - TextAlign: fmTextAlign; - TextColumn: any; - TopIndex: any; - readonly Valid: boolean; - Value: any; - } - - class ListBox2 { - private 'MSForms.ListBox2_typekey': ListBox2; - private constructor(); - readonly _Font_Reserved: NewFont; - AddItem(pvargItem?: any, pvargIndex?: any): void; - BackColor: number; - BorderColor: number; - BordersSuppress: boolean; - BorderStyle: fmBorderStyle; - BoundColumn: any; - Clear(): void; - Column(pvargColumn?: any, pvargIndex?: any): any; - ColumnCount: number; - ColumnHeads: boolean; - ColumnWidths: string; - readonly DisplayStyle: fmDisplayStyle; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - IMEMode: fmIMEMode; - IntegralHeight: boolean; - List(pvargIndex?: any, pvargColumn?: any): any; + List(pvargIndex: number, pvargColumn?: number): any; + List(): SafeArray; readonly ListCount: number; ListCursor: any; ListIndex: any; @@ -1258,35 +846,6 @@ declare namespace MSForms { Value: number; } - class MultiPage2 { - private 'MSForms.MultiPage2_typekey': MultiPage2; - private constructor(); - readonly _Font_Reserved: NewFont; - _GetTabFixedHeight(Height: number): void; - _GetTabFixedWidth(Width: number): void; - _SetTabFixedHeight(Height: number): void; - _SetTabFixedWidth(Width: number): void; - BackColor: number; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - MultiRow: boolean; - readonly Pages: Pages; - readonly SelectedItem: Page; - Style: fmTabStyle; - TabFixedHeight: number; - TabFixedWidth: number; - TabOrientation: fmTabOrientation; - Value: number; - } - class NewFont { private 'MSForms.NewFont_typekey': NewFont; private constructor(); @@ -1337,43 +896,6 @@ declare namespace MSForms { WordWrap: boolean; } - class OptionButton2 { - private 'MSForms.OptionButton2_typekey': OptionButton2; - private constructor(); - readonly _Font_Reserved: NewFont; - Accelerator: string; - Alignment: fmAlignment; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BordersSuppress: boolean; - Caption: string; - readonly DisplayStyle: fmDisplayStyle; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - GroupName: string; - Locked: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiSelect: fmMultiSelect; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - SpecialEffect: fmButtonEffect; - TextAlign: fmTextAlign; - TripleState: boolean; - readonly Valid: boolean; - Value: any; - WordWrap: boolean; - } - class Page { private 'MSForms.Page_typekey': Page; private constructor(); @@ -1439,9 +961,7 @@ declare namespace MSForms { Zoom: number; } - class Pages { - private 'MSForms.Pages_typekey': Pages; - private constructor(); + interface Pages { _AddCtrl(clsid: number, bstrName: string, bstrCaption: string): Page; _GetItemByIndex(lIndex: number): Control; _GetItemByName(pstrName: string): Control; @@ -1452,6 +972,7 @@ declare namespace MSForms { Enum(): any; Item(varg: any): any; Remove(varg: any): void; + (varg: any): any; } class ReturnBoolean { @@ -1502,24 +1023,6 @@ declare namespace MSForms { Value: number; } - class ScrollBar2 { - private 'MSForms.ScrollBar2_typekey': ScrollBar2; - private constructor(); - BackColor: number; - Delay: number; - Enabled: boolean; - ForeColor: number; - LargeChange: number; - Max: number; - Min: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Orientation: fmOrientation; - ProportionalThumb: boolean; - SmallChange: number; - Value: number; - } - class SpinButton { private 'MSForms.SpinButton_typekey': SpinButton; private constructor(); @@ -1536,22 +1039,6 @@ declare namespace MSForms { Value: number; } - class SpinButton2 { - private 'MSForms.SpinButton2_typekey': SpinButton2; - private constructor(); - BackColor: number; - Delay: number; - Enabled: boolean; - ForeColor: number; - Max: number; - Min: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Orientation: fmOrientation; - SmallChange: number; - Value: number; - } - class Tab { private 'MSForms.Tab_typekey': Tab; private constructor(); @@ -1565,9 +1052,7 @@ declare namespace MSForms { Visible: boolean; } - class Tabs { - private 'MSForms.Tabs_typekey': Tabs; - private constructor(); + interface Tabs { _Add(bstrName: string, bstrCaption: string): Tab; _GetItemByIndex(lIndex: number): Tab; _GetItemByName(bstr: string): Tab; @@ -1578,6 +1063,7 @@ declare namespace MSForms { Enum(): any; Item(varg: any): any; Remove(varg: any): void; + (varg: any): any; } class TabStrip { @@ -1619,45 +1105,6 @@ declare namespace MSForms { Value: number; } - class TabStrip2 { - private 'MSForms.TabStrip2_typekey': TabStrip2; - private constructor(); - readonly _Font_Reserved: NewFont; - _GetClientHeight(ClientHeight: number): void; - _GetClientLeft(ClientLeft: number): void; - _GetClientTop(ClientTop: number): void; - _GetClientWidth(ClientWidth: number): void; - _GetTabFixedHeight(TabFixedHeight: number): void; - _GetTabFixedWidth(TabFixedWidth: number): void; - _SetTabFixedHeight(TabFixedHeight: number): void; - _SetTabFixedWidth(TabFixedWidth: number): void; - BackColor: number; - readonly ClientHeight: number; - readonly ClientLeft: number; - readonly ClientTop: number; - readonly ClientWidth: number; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiRow: boolean; - readonly SelectedItem: Tab; - Style: fmTabStyle; - TabFixedHeight: number; - TabFixedWidth: number; - TabOrientation: fmTabOrientation; - readonly Tabs: Tabs; - Value: number; - } - class TextBox { private 'MSForms.TextBox_typekey': TextBox; private constructor(); @@ -1720,68 +1167,6 @@ declare namespace MSForms { WordWrap: boolean; } - class TextBox2 { - private 'MSForms.TextBox2_typekey': TextBox2; - private constructor(); - readonly _Font_Reserved: NewFont; - AutoSize: boolean; - AutoTab: boolean; - AutoWordSelect: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BorderColor: number; - BordersSuppress: boolean; - BorderStyle: fmBorderStyle; - readonly CanPaste: boolean; - Copy(): void; - CurLine: number; - readonly CurTargetX: number; - readonly CurTargetY: number; - CurX: number; - CurY: number; - Cut(): void; - readonly DisplayStyle: fmDisplayStyle; - DragBehavior: fmDragBehavior; - DropButtonStyle: fmDropButtonStyle; - Enabled: boolean; - EnterFieldBehavior: fmEnterFieldBehavior; - EnterKeyBehavior: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - HideSelection: boolean; - IMEMode: fmIMEMode; - IntegralHeight: boolean; - readonly LineCount: number; - Locked: boolean; - MaxLength: number; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiLine: boolean; - PasswordChar: string; - Paste(): void; - ScrollBars: fmScrollBars; - SelectionMargin: boolean; - SelLength: number; - SelStart: number; - SelText: string; - ShowDropButtonWhen: fmShowDropButtonWhen; - SpecialEffect: fmSpecialEffect; - TabKeyBehavior: boolean; - Text: string; - TextAlign: fmTextAlign; - readonly TextLength: number; - readonly Valid: boolean; - Value: any; - WordWrap: boolean; - } - class ToggleButton { private 'MSForms.ToggleButton_typekey': ToggleButton; private constructor(); @@ -1819,43 +1204,6 @@ declare namespace MSForms { WordWrap: boolean; } - class ToggleButton2 { - private 'MSForms.ToggleButton2_typekey': ToggleButton2; - private constructor(); - readonly _Font_Reserved: NewFont; - Accelerator: string; - Alignment: fmAlignment; - AutoSize: boolean; - BackColor: number; - BackStyle: fmBackStyle; - BordersSuppress: boolean; - Caption: string; - readonly DisplayStyle: fmDisplayStyle; - Enabled: boolean; - Font: NewFont; - FontBold: boolean; - FontItalic: boolean; - FontName: string; - FontSize: number; - FontStrikethru: boolean; - FontUnderline: boolean; - FontWeight: number; - ForeColor: number; - GroupName: string; - Locked: boolean; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - MultiSelect: fmMultiSelect; - Picture: stdole.StdPicture; - PicturePosition: fmPicturePosition; - SpecialEffect: fmButtonEffect; - TextAlign: fmTextAlign; - TripleState: boolean; - readonly Valid: boolean; - Value: any; - WordWrap: boolean; - } - class UserForm { private 'MSForms.UserForm_typekey': UserForm; private constructor(); @@ -1922,160 +1270,18 @@ declare namespace MSForms { Zoom: number; } - class UserForm2 { - private 'MSForms.UserForm2_typekey': UserForm2; - private constructor(); - readonly _Font_Reserved: NewFont; - _GetGridX(GridX: number): void; - _GetGridY(GridY: number): void; - _GetInsideHeight(InsideHeight: number): void; - _GetInsideWidth(InsideWidth: number): void; - _GetScrollHeight(ScrollHeight: number): void; - _GetScrollLeft(ScrollLeft: number): void; - _GetScrollTop(ScrollTop: number): void; - _GetScrollWidth(ScrollWidth: number): void; - _SetGridX(GridX: number): void; - _SetGridY(GridY: number): void; - _SetScrollHeight(ScrollHeight: number): void; - _SetScrollLeft(ScrollLeft: number): void; - _SetScrollTop(ScrollTop: number): void; - _SetScrollWidth(ScrollWidth: number): void; - readonly ActiveControl: Control; - BackColor: number; - BorderColor: number; - BorderStyle: fmBorderStyle; - readonly CanPaste: boolean; - readonly CanRedo: boolean; - readonly CanUndo: boolean; - Caption: string; - readonly Controls: Controls; - Copy(): void; - Cut(): void; - Cycle: fmCycle; - DesignMode: fmMode; - DrawBuffer: number; - Enabled: boolean; - Font: NewFont; - ForeColor: number; - GridX: number; - GridY: number; - readonly InsideHeight: number; - readonly InsideWidth: number; - KeepScrollBarsVisible: fmScrollBars; - MouseIcon: stdole.StdPicture; - MousePointer: fmMousePointer; - Paste(): void; - Picture: stdole.StdPicture; - PictureAlignment: fmPictureAlignment; - PictureSizeMode: fmPictureSizeMode; - PictureTiling: boolean; - RedoAction(): void; - Repaint(): void; - Scroll(xAction?: any, yAction?: any): void; - ScrollBars: fmScrollBars; - ScrollHeight: number; - ScrollLeft: number; - ScrollTop: number; - ScrollWidth: number; - readonly Selected: Controls; - SetDefaultTabOrder(): void; - ShowGridDots: fmMode; - ShowToolbox: fmMode; - SnapToGrid: fmMode; - SpecialEffect: fmSpecialEffect; - UndoAction(): void; - VerticalScrollBarSide: fmVerticalScrollBarSide; - Zoom: number; - } - namespace EventHelperTypes { - type CheckBox_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; + type Container_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - type CheckBox_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; + type Container_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - type CheckBox_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; + type Container_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - type CheckBox2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; + type Control_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - type CheckBox2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; + type Control_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - type CheckBox2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ComboBox_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ComboBox_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ComboBox_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ComboBox2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ComboBox2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ComboBox2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type CommandButton_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type CommandButton_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type CommandButton_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type CommandButton2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type CommandButton2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type CommandButton2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Frame_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type Frame_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Frame_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Frame_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - type Frame2_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type Frame2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Frame2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Frame2_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - type Image_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type Image_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Image_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Image2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type Image2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Image2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Label_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type Label_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Label_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type Label2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type Label2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type Label2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ListBox_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ListBox_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ListBox_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ListBox2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ListBox2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ListBox2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; + type Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; type MultiPage_BeforeDragOver_ArgNames = ['Index', 'Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; @@ -2085,283 +1291,11 @@ declare namespace MSForms { type MultiPage_Scroll_ArgNames = ['Index', 'ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - type MultiPage2_BeforeDragOver_ArgNames = ['Index', 'Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type MultiPage2_BeforeDropOrPaste_ArgNames = ['Index', 'Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type MultiPage2_Error_ArgNames = ['Index', 'Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type MultiPage2_Scroll_ArgNames = ['Index', 'ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - type OptionButton_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type OptionButton_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type OptionButton_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type OptionButton2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type OptionButton2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type OptionButton2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ScrollBar_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ScrollBar_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ScrollBar_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ScrollBar2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ScrollBar2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ScrollBar2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type SpinButton_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type SpinButton_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type SpinButton_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type SpinButton2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type SpinButton2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type SpinButton2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - type TabStrip_BeforeDragOver_ArgNames = ['Index', 'Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; type TabStrip_BeforeDropOrPaste_ArgNames = ['Index', 'Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - type TabStrip_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type TabStrip2_BeforeDragOver_ArgNames = ['Index', 'Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type TabStrip2_BeforeDropOrPaste_ArgNames = ['Index', 'Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type TabStrip2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type TextBox_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type TextBox_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type TextBox_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type TextBox2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type TextBox2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type TextBox2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ToggleButton_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ToggleButton_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ToggleButton_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type ToggleButton2_BeforeDragOver_ArgNames = ['Cancel', 'Data', 'X', 'Y', 'DragState', 'Effect', 'Shift']; - - type ToggleButton2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type ToggleButton2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type UserForm_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type UserForm_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type UserForm_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type UserForm_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - type UserForm2_BeforeDragOver_ArgNames = ['Cancel', 'Control', 'Data', 'X', 'Y', 'State', 'Effect', 'Shift']; - - type UserForm2_BeforeDropOrPaste_ArgNames = ['Cancel', 'Control', 'Action', 'Data', 'X', 'Y', 'Effect', 'Shift']; - - type UserForm2_Error_ArgNames = ['Number', 'Description', 'SCode', 'Source', 'HelpFile', 'HelpContext', 'CancelDisplay']; - - type UserForm2_Scroll_ArgNames = ['ActionX', 'ActionY', 'RequestDx', 'RequestDy', 'ActualDx', 'ActualDy']; - - interface CheckBox_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CheckBox_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CheckBox_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface CheckBox2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CheckBox2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CheckBox2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ComboBox_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ComboBox_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ComboBox_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ComboBox2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ComboBox2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ComboBox2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface CommandButton_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CommandButton_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CommandButton_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface CommandButton2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CommandButton2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface CommandButton2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Frame_BeforeDragOver_Parameter { + interface Container_BeforeDragOver_Parameter { readonly Cancel: ReturnBoolean; readonly Control: Control; readonly Data: DataObject; @@ -2372,7 +1306,7 @@ declare namespace MSForms { readonly Y: number; } - interface Frame_BeforeDropOrPaste_Parameter { + interface Container_BeforeDropOrPaste_Parameter { readonly Action: fmAction; readonly Cancel: ReturnBoolean; readonly Control: Control; @@ -2383,17 +1317,7 @@ declare namespace MSForms { readonly Y: number; } - interface Frame_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Frame_Scroll_Parameter { + interface Container_Scroll_Parameter { readonly ActionX: fmScrollAction; readonly ActionY: fmScrollAction; readonly ActualDx: ReturnSingle; @@ -2402,48 +1326,7 @@ declare namespace MSForms { readonly RequestDy: number; } - interface Frame2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly State: fmDragState; - readonly X: number; - readonly Y: number; - } - - interface Frame2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Frame2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Frame2_Scroll_Parameter { - readonly ActionX: fmScrollAction; - readonly ActionY: fmScrollAction; - readonly ActualDx: ReturnSingle; - readonly ActualDy: ReturnSingle; - readonly RequestDx: number; - readonly RequestDy: number; - } - - interface Image_BeforeDragOver_Parameter { + interface Control_BeforeDragOver_Parameter { readonly Cancel: ReturnBoolean; readonly Data: DataObject; readonly DragState: fmDragState; @@ -2453,7 +1336,7 @@ declare namespace MSForms { readonly Y: number; } - interface Image_BeforeDropOrPaste_Parameter { + interface Control_BeforeDropOrPaste_Parameter { readonly Action: fmAction; readonly Cancel: ReturnBoolean; readonly Data: DataObject; @@ -2463,157 +1346,7 @@ declare namespace MSForms { readonly Y: number; } - interface Image_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Image2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Image2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Image2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Label_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Label_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Label_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface Label2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Label2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface Label2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ListBox_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ListBox_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ListBox_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ListBox2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ListBox2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ListBox2_Error_Parameter { + interface Error_Parameter { readonly CancelDisplay: ReturnBoolean; readonly Description: ReturnString; readonly HelpContext: number; @@ -2668,231 +1401,6 @@ declare namespace MSForms { readonly RequestDy: number; } - interface MultiPage2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Index: number; - readonly Shift: number; - readonly State: fmDragState; - readonly X: number; - readonly Y: number; - } - - interface MultiPage2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Index: number; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface MultiPage2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Index: number; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface MultiPage2_Scroll_Parameter { - readonly ActionX: fmScrollAction; - readonly ActionY: fmScrollAction; - readonly ActualDx: ReturnSingle; - readonly ActualDy: ReturnSingle; - readonly Index: number; - readonly RequestDx: number; - readonly RequestDy: number; - } - - interface OptionButton_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface OptionButton_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface OptionButton_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface OptionButton2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface OptionButton2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface OptionButton2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ScrollBar_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ScrollBar_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ScrollBar_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ScrollBar2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ScrollBar2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ScrollBar2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface SpinButton_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface SpinButton_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface SpinButton_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface SpinButton2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface SpinButton2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface SpinButton2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - interface TabStrip_BeforeDragOver_Parameter { readonly Cancel: ReturnBoolean; readonly Data: DataObject; @@ -2914,844 +1422,151 @@ declare namespace MSForms { readonly X: number; readonly Y: number; } - - interface TabStrip_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface TabStrip2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Index: number; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TabStrip2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Index: number; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TabStrip2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface TextBox_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TextBox_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TextBox_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface TextBox2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TextBox2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface TextBox2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ToggleButton_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ToggleButton_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ToggleButton_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface ToggleButton2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly DragState: fmDragState; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ToggleButton2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface ToggleButton2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface UserForm_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly State: fmDragState; - readonly X: number; - readonly Y: number; - } - - interface UserForm_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface UserForm_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface UserForm_Scroll_Parameter { - readonly ActionX: fmScrollAction; - readonly ActionY: fmScrollAction; - readonly ActualDx: ReturnSingle; - readonly ActualDy: ReturnSingle; - readonly RequestDx: number; - readonly RequestDy: number; - } - - interface UserForm2_BeforeDragOver_Parameter { - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly State: fmDragState; - readonly X: number; - readonly Y: number; - } - - interface UserForm2_BeforeDropOrPaste_Parameter { - readonly Action: fmAction; - readonly Cancel: ReturnBoolean; - readonly Control: Control; - readonly Data: DataObject; - readonly Effect: ReturnEffect; - readonly Shift: number; - readonly X: number; - readonly Y: number; - } - - interface UserForm2_Error_Parameter { - readonly CancelDisplay: ReturnBoolean; - readonly Description: ReturnString; - readonly HelpContext: number; - readonly HelpFile: string; - readonly Number: number; - readonly SCode: number; - readonly Source: string; - } - - interface UserForm2_Scroll_Parameter { - readonly ActionX: fmScrollAction; - readonly ActionY: fmScrollAction; - readonly ActualDx: ReturnSingle; - readonly ActualDy: ReturnSingle; - readonly RequestDx: number; - readonly RequestDy: number; - } } } interface ActiveXObject { - on( - obj: MSForms.CheckBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.CheckBox_BeforeDragOver_ArgNames, handler: ( - this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.CheckBox_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.CheckBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.CheckBox_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.CheckBox_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.CheckBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.CheckBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.CheckBox, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.CheckBox, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.CheckBox, event: 'Error', argNames: MSForms.EventHelperTypes.CheckBox_Error_ArgNames, handler: ( - this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.CheckBox_Error_Parameter) => void): void; - on( - obj: MSForms.CheckBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.CheckBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.CheckBox, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.CheckBox, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.CheckBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.CheckBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.CheckBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.CheckBox, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.CheckBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.CheckBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.CheckBox2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.CheckBox2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.CheckBox2, parameter: MSForms.EventHelperTypes.CheckBox2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.CheckBox2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.CheckBox2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.CheckBox2, parameter: MSForms.EventHelperTypes.CheckBox2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.CheckBox2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.CheckBox2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.CheckBox2, event: 'Error', argNames: MSForms.EventHelperTypes.CheckBox2_Error_ArgNames, handler: ( - this: MSForms.CheckBox2, parameter: MSForms.EventHelperTypes.CheckBox2_Error_Parameter) => void): void; - on( - obj: MSForms.CheckBox2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.CheckBox2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.CheckBox2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.CheckBox2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.CheckBox2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.CheckBox2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ComboBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ComboBox_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.ComboBox_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ComboBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ComboBox_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.ComboBox_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.CheckBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.CheckBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.ComboBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.ComboBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.ComboBox, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ComboBox, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ComboBox, event: 'Error', argNames: MSForms.EventHelperTypes.ComboBox_Error_ArgNames, handler: ( - this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.ComboBox_Error_Parameter) => void): void; - on( - obj: MSForms.ComboBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ComboBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.ComboBox, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.ComboBox, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.ComboBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.ComboBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.ComboBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ComboBox, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ComboBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ComboBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ComboBox2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ComboBox2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ComboBox2, parameter: MSForms.EventHelperTypes.ComboBox2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ComboBox2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ComboBox2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ComboBox2, parameter: MSForms.EventHelperTypes.ComboBox2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.ComboBox2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ComboBox2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ComboBox2, event: 'Error', argNames: MSForms.EventHelperTypes.ComboBox2_Error_ArgNames, handler: ( - this: MSForms.ComboBox2, parameter: MSForms.EventHelperTypes.ComboBox2_Error_Parameter) => void): void; - on( - obj: MSForms.ComboBox2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ComboBox2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ComboBox2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ComboBox2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ComboBox2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ComboBox2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.CommandButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.CommandButton_BeforeDragOver_ArgNames, - handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.CommandButton_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.CommandButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.CommandButton_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.CommandButton_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.ComboBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.ComboBox, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.CommandButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.CommandButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.CommandButton, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.CommandButton, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.CommandButton, event: 'Error', argNames: MSForms.EventHelperTypes.CommandButton_Error_ArgNames, handler: ( - this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.CommandButton_Error_Parameter) => void): void; - on( - obj: MSForms.CommandButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.CommandButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.CommandButton, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.CommandButton, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.CommandButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.CommandButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.CommandButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.CommandButton, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.CommandButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.CommandButton, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.CommandButton2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.CommandButton2_BeforeDragOver_ArgNames, - handler: (this: MSForms.CommandButton2, parameter: MSForms.EventHelperTypes.CommandButton2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.CommandButton2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.CommandButton2_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.CommandButton2, parameter: MSForms.EventHelperTypes.CommandButton2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.CommandButton2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.CommandButton2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.CommandButton2, event: 'Error', argNames: MSForms.EventHelperTypes.CommandButton2_Error_ArgNames, handler: ( - this: MSForms.CommandButton2, parameter: MSForms.EventHelperTypes.CommandButton2_Error_Parameter) => void): void; - on( - obj: MSForms.CommandButton2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.CommandButton2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.CommandButton2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.CommandButton2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.CommandButton2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.CommandButton2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on(obj: MSForms.Control, event: 'BeforeUpdate' | 'Exit', argNames: ['Cancel'], handler: (this: MSForms.Control, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; + on(obj: MSForms.CommandButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.CommandButton, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.Control, event: 'BeforeUpdate' | 'Exit', argNames: ['Cancel'], handler: (this: MSForms.Control, parameter: { readonly Cancel: MSForms.ReturnBoolean }) => void): void; on(obj: MSForms.Frame, event: 'AddControl' | 'RemoveControl', argNames: ['Control'], handler: (this: MSForms.Frame, parameter: {readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.Frame, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Frame_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Frame_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Frame, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Frame_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Frame_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Container_BeforeDragOver_ArgNames, handler: (this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Container_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Container_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Container_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.Frame, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Frame, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Frame, event: 'Error', argNames: MSForms.EventHelperTypes.Frame_Error_ArgNames, handler: ( - this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Frame_Error_Parameter) => void): void; - on( - obj: MSForms.Frame, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.Frame, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.Frame, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.Frame, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.Frame, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.Frame, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.Frame, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Frame, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Frame, event: 'Scroll', argNames: MSForms.EventHelperTypes.Frame_Scroll_ArgNames, handler: ( - this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Frame_Scroll_Parameter) => void): void; - on(obj: MSForms.Frame, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.Frame, parameter: {Percent: number}) => void): void; - on(obj: MSForms.Frame2, event: 'AddControl' | 'RemoveControl', argNames: ['Control'], handler: (this: MSForms.Frame2, parameter: {readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.Frame2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Frame2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Frame2, parameter: MSForms.EventHelperTypes.Frame2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Frame2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Frame2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Frame2, parameter: MSForms.EventHelperTypes.Frame2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.Frame2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Frame2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Frame2, event: 'Error', argNames: MSForms.EventHelperTypes.Frame2_Error_ArgNames, handler: ( - this: MSForms.Frame2, parameter: MSForms.EventHelperTypes.Frame2_Error_Parameter) => void): void; - on( - obj: MSForms.Frame2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.Frame2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.Frame2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.Frame2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.Frame2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Frame2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Frame2, event: 'Scroll', argNames: MSForms.EventHelperTypes.Frame2_Scroll_ArgNames, handler: ( - this: MSForms.Frame2, parameter: MSForms.EventHelperTypes.Frame2_Scroll_Parameter) => void): void; - on(obj: MSForms.Frame2, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.Frame2, parameter: {Percent: number}) => void): void; - on( - obj: MSForms.Image, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Image_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Image, parameter: MSForms.EventHelperTypes.Image_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Image, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Image_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Image, parameter: MSForms.EventHelperTypes.Image_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.Frame, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.Frame, event: 'Scroll', argNames: MSForms.EventHelperTypes.Container_Scroll_ArgNames, handler: (this: MSForms.Frame, parameter: MSForms.EventHelperTypes.Container_Scroll_Parameter) => void): void; + on(obj: MSForms.Frame, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.Frame, parameter: { Percent: number }) => void): void; + on(obj: MSForms.Image, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.Image, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.Image, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.Image, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.Image, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Image, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Image, event: 'Error', argNames: MSForms.EventHelperTypes.Image_Error_ArgNames, handler: ( - this: MSForms.Image, parameter: MSForms.EventHelperTypes.Image_Error_Parameter) => void): void; - on( - obj: MSForms.Image, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Image, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Image2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Image2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Image2, parameter: MSForms.EventHelperTypes.Image2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Image2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Image2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Image2, parameter: MSForms.EventHelperTypes.Image2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.Image2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Image2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Image2, event: 'Error', argNames: MSForms.EventHelperTypes.Image2_Error_ArgNames, handler: ( - this: MSForms.Image2, parameter: MSForms.EventHelperTypes.Image2_Error_Parameter) => void): void; - on( - obj: MSForms.Image2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Image2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Label, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Label_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Label, parameter: MSForms.EventHelperTypes.Label_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Label, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Label_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Label, parameter: MSForms.EventHelperTypes.Label_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.Image, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.Image, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.Image, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.Image, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.Label, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.Label, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.Label, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.Label, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.Label, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Label, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Label, event: 'Error', argNames: MSForms.EventHelperTypes.Label_Error_ArgNames, handler: ( - this: MSForms.Label, parameter: MSForms.EventHelperTypes.Label_Error_Parameter) => void): void; - on( - obj: MSForms.Label, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Label, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.Label2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Label2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.Label2, parameter: MSForms.EventHelperTypes.Label2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.Label2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Label2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.Label2, parameter: MSForms.EventHelperTypes.Label2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.Label2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.Label2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.Label2, event: 'Error', argNames: MSForms.EventHelperTypes.Label2_Error_ArgNames, handler: ( - this: MSForms.Label2, parameter: MSForms.EventHelperTypes.Label2_Error_Parameter) => void): void; - on( - obj: MSForms.Label2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.Label2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ListBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ListBox_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.ListBox_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ListBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ListBox_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.ListBox_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.Label, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.Label, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.Label, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.Label, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.ListBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.ListBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.ListBox, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ListBox, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ListBox, event: 'Error', argNames: MSForms.EventHelperTypes.ListBox_Error_ArgNames, handler: ( - this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.ListBox_Error_Parameter) => void): void; - on( - obj: MSForms.ListBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ListBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.ListBox, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.ListBox, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.ListBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.ListBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.ListBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ListBox, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ListBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ListBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ListBox2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ListBox2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ListBox2, parameter: MSForms.EventHelperTypes.ListBox2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ListBox2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ListBox2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ListBox2, parameter: MSForms.EventHelperTypes.ListBox2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.ListBox2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ListBox2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ListBox2, event: 'Error', argNames: MSForms.EventHelperTypes.ListBox2_Error_ArgNames, handler: ( - this: MSForms.ListBox2, parameter: MSForms.EventHelperTypes.ListBox2_Error_Parameter) => void): void; - on( - obj: MSForms.ListBox2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ListBox2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ListBox2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ListBox2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ListBox2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ListBox2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.MultiPage, event: 'AddControl' | 'RemoveControl', argNames: ['Index', 'Control'], handler: ( - this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.MultiPage, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.MultiPage_BeforeDragOver_ArgNames, handler: ( - this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.MultiPage, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.MultiPage_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.ListBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.ListBox, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.MultiPage, event: 'AddControl' | 'RemoveControl', argNames: ['Index', 'Control'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Control: MSForms.Control}) => void): void; + on(obj: MSForms.MultiPage, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.MultiPage_BeforeDragOver_ArgNames, handler: (this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.MultiPage, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.MultiPage_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.MultiPage, event: 'Click' | 'Layout', argNames: ['Index'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number}) => void): void; - on( - obj: MSForms.MultiPage, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: ( - this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.MultiPage, event: 'Error', argNames: MSForms.EventHelperTypes.MultiPage_Error_ArgNames, handler: ( - this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_Error_Parameter) => void): void; - on( - obj: MSForms.MultiPage, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.MultiPage, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.MultiPage, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; + on(obj: MSForms.MultiPage, event: 'Error', argNames: MSForms.EventHelperTypes.MultiPage_Error_ArgNames, handler: (this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_Error_Parameter) => void): void; + on(obj: MSForms.MultiPage, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.MultiPage, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.MultiPage, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.MultiPage, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.MultiPage, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.MultiPage, event: 'Scroll', argNames: MSForms.EventHelperTypes.MultiPage_Scroll_ArgNames, handler: ( - this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_Scroll_Parameter) => void): void; - on(obj: MSForms.MultiPage, event: 'Zoom', argNames: ['Index', 'Percent'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number, Percent: number}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'AddControl' | 'RemoveControl', argNames: ['Index', 'Control'], handler: ( - this: MSForms.MultiPage2, parameter: {readonly Index: number, readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.MultiPage2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.MultiPage2, parameter: MSForms.EventHelperTypes.MultiPage2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.MultiPage2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.MultiPage2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.MultiPage2, parameter: MSForms.EventHelperTypes.MultiPage2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.MultiPage2, event: 'Click' | 'Layout', argNames: ['Index'], handler: (this: MSForms.MultiPage2, parameter: {readonly Index: number}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: ( - this: MSForms.MultiPage2, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'Error', argNames: MSForms.EventHelperTypes.MultiPage2_Error_ArgNames, handler: ( - this: MSForms.MultiPage2, parameter: MSForms.EventHelperTypes.MultiPage2_Error_Parameter) => void): void; - on( - obj: MSForms.MultiPage2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.MultiPage2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.MultiPage2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.MultiPage2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.MultiPage2, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.MultiPage2, event: 'Scroll', argNames: MSForms.EventHelperTypes.MultiPage2_Scroll_ArgNames, handler: ( - this: MSForms.MultiPage2, parameter: MSForms.EventHelperTypes.MultiPage2_Scroll_Parameter) => void): void; - on(obj: MSForms.MultiPage2, event: 'Zoom', argNames: ['Index', 'Percent'], handler: (this: MSForms.MultiPage2, parameter: {readonly Index: number, Percent: number}) => void): void; - on( - obj: MSForms.OptionButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.OptionButton_BeforeDragOver_ArgNames, handler: ( - this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.OptionButton_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.OptionButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.OptionButton_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.OptionButton_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.MultiPage, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.MultiPage, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.MultiPage, event: 'Scroll', argNames: MSForms.EventHelperTypes.MultiPage_Scroll_ArgNames, handler: (this: MSForms.MultiPage, parameter: MSForms.EventHelperTypes.MultiPage_Scroll_Parameter) => void): void; + on(obj: MSForms.MultiPage, event: 'Zoom', argNames: ['Index', 'Percent'], handler: (this: MSForms.MultiPage, parameter: { readonly Index: number, Percent: number }) => void): void; + on(obj: MSForms.OptionButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.OptionButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.OptionButton, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.OptionButton, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.OptionButton, event: 'Error', argNames: MSForms.EventHelperTypes.OptionButton_Error_ArgNames, handler: ( - this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.OptionButton_Error_Parameter) => void): void; - on( - obj: MSForms.OptionButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.OptionButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.OptionButton, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.OptionButton, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.OptionButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.OptionButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.OptionButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.OptionButton, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.OptionButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.OptionButton, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.OptionButton2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.OptionButton2_BeforeDragOver_ArgNames, - handler: (this: MSForms.OptionButton2, parameter: MSForms.EventHelperTypes.OptionButton2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.OptionButton2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.OptionButton2_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.OptionButton2, parameter: MSForms.EventHelperTypes.OptionButton2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.OptionButton2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.OptionButton2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.OptionButton2, event: 'Error', argNames: MSForms.EventHelperTypes.OptionButton2_Error_ArgNames, handler: ( - this: MSForms.OptionButton2, parameter: MSForms.EventHelperTypes.OptionButton2_Error_Parameter) => void): void; - on( - obj: MSForms.OptionButton2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.OptionButton2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.OptionButton2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.OptionButton2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.OptionButton2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.OptionButton2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ScrollBar, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ScrollBar_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.ScrollBar_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ScrollBar, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ScrollBar_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.ScrollBar_BeforeDropOrPaste_Parameter) => void): void; - on( - obj: MSForms.ScrollBar, event: 'Error', argNames: MSForms.EventHelperTypes.ScrollBar_Error_ArgNames, handler: ( - this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.ScrollBar_Error_Parameter) => void): void; - on( - obj: MSForms.ScrollBar, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ScrollBar, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ScrollBar, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ScrollBar, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ScrollBar2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ScrollBar2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ScrollBar2, parameter: MSForms.EventHelperTypes.ScrollBar2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ScrollBar2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ScrollBar2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.ScrollBar2, parameter: MSForms.EventHelperTypes.ScrollBar2_BeforeDropOrPaste_Parameter) => void): void; - on( - obj: MSForms.ScrollBar2, event: 'Error', argNames: MSForms.EventHelperTypes.ScrollBar2_Error_ArgNames, handler: ( - this: MSForms.ScrollBar2, parameter: MSForms.EventHelperTypes.ScrollBar2_Error_Parameter) => void): void; - on( - obj: MSForms.ScrollBar2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ScrollBar2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ScrollBar2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ScrollBar2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.SpinButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.SpinButton_BeforeDragOver_ArgNames, handler: ( - this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.SpinButton_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.SpinButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.SpinButton_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.SpinButton_BeforeDropOrPaste_Parameter) => void): void; - on( - obj: MSForms.SpinButton, event: 'Error', argNames: MSForms.EventHelperTypes.SpinButton_Error_ArgNames, handler: ( - this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.SpinButton_Error_Parameter) => void): void; - on( - obj: MSForms.SpinButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.SpinButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.OptionButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.OptionButton, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.ScrollBar, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.ScrollBar, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.ScrollBar, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.ScrollBar, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.ScrollBar, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.ScrollBar, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.ScrollBar, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ScrollBar, parameter: { readonly KeyAscii: MSForms.ReturnInteger }) => void): void; + on(obj: MSForms.SpinButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.SpinButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.SpinButton, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.SpinButton, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.SpinButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.SpinButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.SpinButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.SpinButton, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.SpinButton2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.SpinButton2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.SpinButton2, parameter: MSForms.EventHelperTypes.SpinButton2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.SpinButton2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.SpinButton2_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.SpinButton2, parameter: MSForms.EventHelperTypes.SpinButton2_BeforeDropOrPaste_Parameter) => void): void; - on( - obj: MSForms.SpinButton2, event: 'Error', argNames: MSForms.EventHelperTypes.SpinButton2_Error_ArgNames, handler: ( - this: MSForms.SpinButton2, parameter: MSForms.EventHelperTypes.SpinButton2_Error_Parameter) => void): void; - on( - obj: MSForms.SpinButton2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.SpinButton2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.SpinButton2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.SpinButton2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TabStrip, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TabStrip_BeforeDragOver_ArgNames, handler: ( - this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.TabStrip, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TabStrip_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.TabStrip, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TabStrip_BeforeDragOver_ArgNames, handler: (this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.TabStrip, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TabStrip_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.TabStrip, event: 'Click', argNames: ['Index'], handler: (this: MSForms.TabStrip, parameter: {readonly Index: number}) => void): void; - on( - obj: MSForms.TabStrip, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: ( - this: MSForms.TabStrip, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.TabStrip, event: 'Error', argNames: MSForms.EventHelperTypes.TabStrip_Error_ArgNames, handler: ( - this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.TabStrip_Error_Parameter) => void): void; - on( - obj: MSForms.TabStrip, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.TabStrip, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.TabStrip, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: (this: MSForms.TabStrip, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; + on(obj: MSForms.TabStrip, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.TabStrip, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.TabStrip, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.TabStrip, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.TabStrip, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.TabStrip, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TabStrip, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.TabStrip, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.TabStrip2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TabStrip2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.TabStrip2, parameter: MSForms.EventHelperTypes.TabStrip2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.TabStrip2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TabStrip2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.TabStrip2, parameter: MSForms.EventHelperTypes.TabStrip2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.TabStrip2, event: 'Click', argNames: ['Index'], handler: (this: MSForms.TabStrip2, parameter: {readonly Index: number}) => void): void; - on( - obj: MSForms.TabStrip2, event: 'DblClick', argNames: ['Index', 'Cancel'], handler: ( - this: MSForms.TabStrip2, parameter: {readonly Index: number, readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.TabStrip2, event: 'Error', argNames: MSForms.EventHelperTypes.TabStrip2_Error_ArgNames, handler: ( - this: MSForms.TabStrip2, parameter: MSForms.EventHelperTypes.TabStrip2_Error_Parameter) => void): void; - on( - obj: MSForms.TabStrip2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.TabStrip2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.TabStrip2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.TabStrip2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TabStrip2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.TabStrip2, parameter: {readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.TextBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TextBox_BeforeDragOver_ArgNames, handler: ( - this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.TextBox_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.TextBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TextBox_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.TextBox_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.TabStrip, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Index', 'Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.TabStrip, parameter: { readonly Index: number, readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.TextBox, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.TextBox, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.TextBox, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.TextBox, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.TextBox, event: 'Error', argNames: MSForms.EventHelperTypes.TextBox_Error_ArgNames, handler: ( - this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.TextBox_Error_Parameter) => void): void; - on( - obj: MSForms.TextBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.TextBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.TextBox, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.TextBox, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.TextBox, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.TextBox, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.TextBox, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.TextBox, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TextBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.TextBox, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.TextBox2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.TextBox2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.TextBox2, parameter: MSForms.EventHelperTypes.TextBox2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.TextBox2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.TextBox2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.TextBox2, parameter: MSForms.EventHelperTypes.TextBox2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.TextBox2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.TextBox2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.TextBox2, event: 'Error', argNames: MSForms.EventHelperTypes.TextBox2_Error_ArgNames, handler: ( - this: MSForms.TextBox2, parameter: MSForms.EventHelperTypes.TextBox2_Error_Parameter) => void): void; - on( - obj: MSForms.TextBox2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.TextBox2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.TextBox2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.TextBox2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.TextBox2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.TextBox2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ToggleButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ToggleButton_BeforeDragOver_ArgNames, handler: ( - this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.ToggleButton_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ToggleButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ToggleButton_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.ToggleButton_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.TextBox, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.TextBox, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; + on(obj: MSForms.ToggleButton, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Control_BeforeDragOver_ArgNames, handler: (this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.Control_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.ToggleButton, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.Control_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.ToggleButton, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ToggleButton, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ToggleButton, event: 'Error', argNames: MSForms.EventHelperTypes.ToggleButton_Error_ArgNames, handler: ( - this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.ToggleButton_Error_Parameter) => void): void; - on( - obj: MSForms.ToggleButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ToggleButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.ToggleButton, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.ToggleButton, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.ToggleButton, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.ToggleButton, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.ToggleButton, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ToggleButton, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ToggleButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ToggleButton, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.ToggleButton2_BeforeDragOver_ArgNames, - handler: (this: MSForms.ToggleButton2, parameter: MSForms.EventHelperTypes.ToggleButton2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.ToggleButton2_BeforeDropOrPaste_ArgNames, - handler: (this: MSForms.ToggleButton2, parameter: MSForms.EventHelperTypes.ToggleButton2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.ToggleButton2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.ToggleButton2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'Error', argNames: MSForms.EventHelperTypes.ToggleButton2_Error_ArgNames, handler: ( - this: MSForms.ToggleButton2, parameter: MSForms.EventHelperTypes.ToggleButton2_Error_Parameter) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.ToggleButton2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.ToggleButton2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.ToggleButton2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.ToggleButton2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.ToggleButton2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.ToggleButton, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.ToggleButton, parameter: { readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number }) => void): void; on(obj: MSForms.UserForm, event: 'AddControl' | 'RemoveControl', argNames: ['Control'], handler: (this: MSForms.UserForm, parameter: {readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.UserForm, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.UserForm_BeforeDragOver_ArgNames, handler: ( - this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.UserForm_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.UserForm, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.UserForm_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.UserForm_BeforeDropOrPaste_Parameter) => void): void; + on(obj: MSForms.UserForm, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.Container_BeforeDragOver_ArgNames, handler: (this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.Container_BeforeDragOver_Parameter) => void): void; + on(obj: MSForms.UserForm, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.Container_BeforeDropOrPaste_ArgNames, handler: (this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.Container_BeforeDropOrPaste_Parameter) => void): void; on(obj: MSForms.UserForm, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.UserForm, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.UserForm, event: 'Error', argNames: MSForms.EventHelperTypes.UserForm_Error_ArgNames, handler: ( - this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.UserForm_Error_Parameter) => void): void; - on( - obj: MSForms.UserForm, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.UserForm, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; + on(obj: MSForms.UserForm, event: 'Error', argNames: MSForms.EventHelperTypes.Error_ArgNames, handler: (this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.Error_Parameter) => void): void; + on(obj: MSForms.UserForm, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: (this: MSForms.UserForm, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; on(obj: MSForms.UserForm, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.UserForm, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.UserForm, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.UserForm, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.UserForm, event: 'Scroll', argNames: MSForms.EventHelperTypes.UserForm_Scroll_ArgNames, handler: ( - this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.UserForm_Scroll_Parameter) => void): void; - on(obj: MSForms.UserForm, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.UserForm, parameter: {Percent: number}) => void): void; - on(obj: MSForms.UserForm2, event: 'AddControl' | 'RemoveControl', argNames: ['Control'], handler: (this: MSForms.UserForm2, parameter: {readonly Control: MSForms.Control}) => void): void; - on( - obj: MSForms.UserForm2, event: 'BeforeDragOver', argNames: MSForms.EventHelperTypes.UserForm2_BeforeDragOver_ArgNames, handler: ( - this: MSForms.UserForm2, parameter: MSForms.EventHelperTypes.UserForm2_BeforeDragOver_Parameter) => void): void; - on( - obj: MSForms.UserForm2, event: 'BeforeDropOrPaste', argNames: MSForms.EventHelperTypes.UserForm2_BeforeDropOrPaste_ArgNames, handler: ( - this: MSForms.UserForm2, parameter: MSForms.EventHelperTypes.UserForm2_BeforeDropOrPaste_Parameter) => void): void; - on(obj: MSForms.UserForm2, event: 'DblClick', argNames: ['Cancel'], handler: (this: MSForms.UserForm2, parameter: {readonly Cancel: MSForms.ReturnBoolean}) => void): void; - on( - obj: MSForms.UserForm2, event: 'Error', argNames: MSForms.EventHelperTypes.UserForm2_Error_ArgNames, handler: ( - this: MSForms.UserForm2, parameter: MSForms.EventHelperTypes.UserForm2_Error_Parameter) => void): void; - on( - obj: MSForms.UserForm2, event: 'KeyDown' | 'KeyUp', argNames: ['KeyCode', 'Shift'], handler: ( - this: MSForms.UserForm2, parameter: {readonly KeyCode: MSForms.ReturnInteger, readonly Shift: number}) => void): void; - on(obj: MSForms.UserForm2, event: 'KeyPress', argNames: ['KeyAscii'], handler: (this: MSForms.UserForm2, parameter: {readonly KeyAscii: MSForms.ReturnInteger}) => void): void; - on( - obj: MSForms.UserForm2, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: ( - this: MSForms.UserForm2, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; - on( - obj: MSForms.UserForm2, event: 'Scroll', argNames: MSForms.EventHelperTypes.UserForm2_Scroll_ArgNames, handler: ( - this: MSForms.UserForm2, parameter: MSForms.EventHelperTypes.UserForm2_Scroll_Parameter) => void): void; - on(obj: MSForms.UserForm2, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.UserForm2, parameter: {Percent: number}) => void): void; + on(obj: MSForms.UserForm, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'X', 'Y'], handler: (this: MSForms.UserForm, parameter: {readonly Button: number, readonly Shift: number, readonly X: number, readonly Y: number}) => void): void; + on(obj: MSForms.UserForm, event: 'Scroll', argNames: MSForms.EventHelperTypes.Container_Scroll_ArgNames, handler: (this: MSForms.UserForm, parameter: MSForms.EventHelperTypes.Container_Scroll_Parameter) => void): void; + on(obj: MSForms.UserForm, event: 'Zoom', argNames: ['Percent'], handler: (this: MSForms.UserForm, parameter: { Percent: number }) => void): void; on(obj: MSForms.CheckBox, event: 'Change' | 'Click', handler: (this: MSForms.CheckBox, parameter: {}) => void): void; - on(obj: MSForms.CheckBox2, event: 'Change' | 'Click', handler: (this: MSForms.CheckBox2, parameter: {}) => void): void; on(obj: MSForms.ComboBox, event: 'Change' | 'Click' | 'DropButtonClick', handler: (this: MSForms.ComboBox, parameter: {}) => void): void; - on(obj: MSForms.ComboBox2, event: 'Change' | 'Click' | 'DropButtonClick', handler: (this: MSForms.ComboBox2, parameter: {}) => void): void; on(obj: MSForms.CommandButton, event: 'Click', handler: (this: MSForms.CommandButton, parameter: {}) => void): void; - on(obj: MSForms.CommandButton2, event: 'Click', handler: (this: MSForms.CommandButton2, parameter: {}) => void): void; on(obj: MSForms.Control, event: 'AfterUpdate' | 'Enter', handler: (this: MSForms.Control, parameter: {}) => void): void; on(obj: MSForms.Frame, event: 'Click' | 'Layout', handler: (this: MSForms.Frame, parameter: {}) => void): void; - on(obj: MSForms.Frame2, event: 'Click' | 'Layout', handler: (this: MSForms.Frame2, parameter: {}) => void): void; on(obj: MSForms.HTMLCheckbox, event: 'Click', handler: (this: MSForms.HTMLCheckbox, parameter: {}) => void): void; - on(obj: MSForms.HTMLCheckbox2, event: 'Click', handler: (this: MSForms.HTMLCheckbox2, parameter: {}) => void): void; on(obj: MSForms.HTMLHidden, event: 'Click', handler: (this: MSForms.HTMLHidden, parameter: {}) => void): void; - on(obj: MSForms.HTMLHidden2, event: 'Click', handler: (this: MSForms.HTMLHidden2, parameter: {}) => void): void; on(obj: MSForms.HTMLImage, event: 'Click', handler: (this: MSForms.HTMLImage, parameter: {}) => void): void; - on(obj: MSForms.HTMLImage2, event: 'Click', handler: (this: MSForms.HTMLImage2, parameter: {}) => void): void; on(obj: MSForms.HTMLOption, event: 'Click', handler: (this: MSForms.HTMLOption, parameter: {}) => void): void; - on(obj: MSForms.HTMLOption2, event: 'Click', handler: (this: MSForms.HTMLOption2, parameter: {}) => void): void; on(obj: MSForms.HTMLPassword, event: 'Click', handler: (this: MSForms.HTMLPassword, parameter: {}) => void): void; - on(obj: MSForms.HTMLPassword2, event: 'Click', handler: (this: MSForms.HTMLPassword2, parameter: {}) => void): void; on(obj: MSForms.HTMLReset, event: 'Click', handler: (this: MSForms.HTMLReset, parameter: {}) => void): void; - on(obj: MSForms.HTMLReset2, event: 'Click', handler: (this: MSForms.HTMLReset2, parameter: {}) => void): void; on(obj: MSForms.HTMLSelect, event: 'Click', handler: (this: MSForms.HTMLSelect, parameter: {}) => void): void; - on(obj: MSForms.HTMLSelect2, event: 'Click', handler: (this: MSForms.HTMLSelect2, parameter: {}) => void): void; on(obj: MSForms.HTMLSubmit, event: 'Click', handler: (this: MSForms.HTMLSubmit, parameter: {}) => void): void; - on(obj: MSForms.HTMLSubmit2, event: 'Click', handler: (this: MSForms.HTMLSubmit2, parameter: {}) => void): void; on(obj: MSForms.HTMLText, event: 'Click', handler: (this: MSForms.HTMLText, parameter: {}) => void): void; - on(obj: MSForms.HTMLText2, event: 'Click', handler: (this: MSForms.HTMLText2, parameter: {}) => void): void; on(obj: MSForms.HTMLTextArea, event: 'Click', handler: (this: MSForms.HTMLTextArea, parameter: {}) => void): void; - on(obj: MSForms.HTMLTextArea2, event: 'Click', handler: (this: MSForms.HTMLTextArea2, parameter: {}) => void): void; on(obj: MSForms.Image, event: 'Click', handler: (this: MSForms.Image, parameter: {}) => void): void; - on(obj: MSForms.Image2, event: 'Click', handler: (this: MSForms.Image2, parameter: {}) => void): void; on(obj: MSForms.Label, event: 'Click', handler: (this: MSForms.Label, parameter: {}) => void): void; - on(obj: MSForms.Label2, event: 'Click', handler: (this: MSForms.Label2, parameter: {}) => void): void; on(obj: MSForms.ListBox, event: 'Change' | 'Click', handler: (this: MSForms.ListBox, parameter: {}) => void): void; - on(obj: MSForms.ListBox2, event: 'Change' | 'Click', handler: (this: MSForms.ListBox2, parameter: {}) => void): void; on(obj: MSForms.MultiPage, event: 'Change', handler: (this: MSForms.MultiPage, parameter: {}) => void): void; - on(obj: MSForms.MultiPage2, event: 'Change', handler: (this: MSForms.MultiPage2, parameter: {}) => void): void; on(obj: MSForms.OptionButton, event: 'Change' | 'Click', handler: (this: MSForms.OptionButton, parameter: {}) => void): void; - on(obj: MSForms.OptionButton2, event: 'Change' | 'Click', handler: (this: MSForms.OptionButton2, parameter: {}) => void): void; on(obj: MSForms.ScrollBar, event: 'Change' | 'Scroll', handler: (this: MSForms.ScrollBar, parameter: {}) => void): void; - on(obj: MSForms.ScrollBar2, event: 'Change' | 'Scroll', handler: (this: MSForms.ScrollBar2, parameter: {}) => void): void; on(obj: MSForms.SpinButton, event: 'Change' | 'SpinDown' | 'SpinUp', handler: (this: MSForms.SpinButton, parameter: {}) => void): void; - on(obj: MSForms.SpinButton2, event: 'Change' | 'SpinDown' | 'SpinUp', handler: (this: MSForms.SpinButton2, parameter: {}) => void): void; on(obj: MSForms.TabStrip, event: 'Change', handler: (this: MSForms.TabStrip, parameter: {}) => void): void; - on(obj: MSForms.TabStrip2, event: 'Change', handler: (this: MSForms.TabStrip2, parameter: {}) => void): void; on(obj: MSForms.TextBox, event: 'Change' | 'DropButtonClick', handler: (this: MSForms.TextBox, parameter: {}) => void): void; - on(obj: MSForms.TextBox2, event: 'Change' | 'DropButtonClick', handler: (this: MSForms.TextBox2, parameter: {}) => void): void; on(obj: MSForms.ToggleButton, event: 'Change' | 'Click', handler: (this: MSForms.ToggleButton, parameter: {}) => void): void; - on(obj: MSForms.ToggleButton2, event: 'Change' | 'Click', handler: (this: MSForms.ToggleButton2, parameter: {}) => void): void; on(obj: MSForms.UserForm, event: 'Click' | 'Layout', handler: (this: MSForms.UserForm, parameter: {}) => void): void; - on(obj: MSForms.UserForm2, event: 'Click' | 'Layout', handler: (this: MSForms.UserForm2, parameter: {}) => void): void; - set(obj: MSForms.ComboBox | MSForms.ComboBox2 | MSForms.ListBox | MSForms.ListBox2, propertyName: 'Column' | 'List', parameterTypes: [number | undefined, number] | [number] | never[], - newValue: any): void; - set(obj: MSForms.ListBox | MSForms.ListBox2, propertyName: 'Selected', parameterTypes: [any], newValue: boolean): void; + set(obj: MSForms.ComboBox | MSForms.ListBox, propertyName: 'Column' | 'List', parameterTypes: [number, number] | [number], newValue: any): void; + set(obj: MSForms.ComboBox | MSForms.ListBox, propertyName: 'Column' | 'List', parameterTypes: number[], newValue: SafeArray): void; + set(obj: MSForms.ListBox, propertyName: 'Selected', parameterTypes: [any], newValue: boolean): void; new(progid: K): ActiveXObjectNameMap[K]; } interface ActiveXObjectNameMap { 'Forms.Image': MSForms.Image; } - -interface EnumeratorConstructor { - new(col: MSForms.Controls | MSForms.Pages | MSForms.Tabs): Enumerator; // tslint:disable-line:use-default-type-parameter -} - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-msforms/tslint.json b/types/activex-msforms/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-msforms/tslint.json +++ b/types/activex-msforms/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-mshtml/index.d.ts b/types/activex-mshtml/index.d.ts index 01c6007620..94466927d7 100644 --- a/types/activex-mshtml/index.d.ts +++ b/types/activex-mshtml/index.d.ts @@ -2885,11 +2885,10 @@ declare namespace MSHTML { update(): void; } - class BlockFormats { - private 'MSHTML.BlockFormats_typekey': BlockFormats; - private constructor(); + interface BlockFormats { readonly Count: number; item(pvarIndex: any): string; + (pvarIndex: any): string; } class CanvasGradient { @@ -2975,7 +2974,7 @@ declare namespace MSHTML { private 'MSHTML.CClientCaps_typekey': CClientCaps; private constructor(); - /** @param string [bStrVer=''] */ + /** @param bStrVer [bStrVer=''] */ addComponentRequest(bstrName: string, bstrURL: string, bStrVer?: string): void; readonly availHeight: number; readonly availWidth: number; @@ -2991,7 +2990,7 @@ declare namespace MSHTML { getComponentVersion(bstrName: string, bstrURL: string): string; readonly height: number; - /** @param string [bStrVer=''] */ + /** @param bStrVer [bStrVer=''] */ isComponentInstalled(bstrName: string, bstrURL: string, bStrVer?: string): boolean; readonly javaEnabled: boolean; readonly onLine: boolean; @@ -3025,7 +3024,7 @@ declare namespace MSHTML { readonly dataTransfer: IHTMLDataTransfer; fromElement: IHTMLElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; keyCode: number; readonly nextPage: string; @@ -3037,14 +3036,14 @@ declare namespace MSHTML { reason: number; recordset: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; repeat: boolean; returnValue: any; screenX: number; screenY: number; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; shiftKey: boolean; shiftLeft: boolean; @@ -3086,7 +3085,7 @@ declare namespace MSHTML { readonly 'constructor': any; readonly length: number; - /** @param boolean [reload=false] */ + /** @param reload [reload=false] */ refresh(reload?: boolean): void; } @@ -3230,13 +3229,12 @@ declare namespace MSHTML { readonly type: string; } - class DOMChildrenCollection { - private 'MSHTML.DOMChildrenCollection_typekey': DOMChildrenCollection; - private constructor(); + interface DOMChildrenCollection { readonly 'constructor': any; ie9_item(index: number): any; item(index: number): any; readonly length: number; + (index: number): any; } class DOMCloseEvent { @@ -3348,7 +3346,7 @@ declare namespace MSHTML { readonly publicId: any; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -3376,14 +3374,9 @@ declare namespace MSHTML { readonly eventPhase: number; readonly fromElement: IHTMLElement; getModifierState(keyArg: string): boolean; - initDragEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, - relatedTargetArg: IEventTarget, dataTransferArg: IHTMLDataTransfer): void; + initDragEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget, dataTransferArg: IHTMLDataTransfer): void; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMouseEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; + initMouseEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; readonly isTrusted: boolean; readonly layerX: number; @@ -3479,8 +3472,7 @@ declare namespace MSHTML { getModifierState(keyArg: string): boolean; readonly ie9_char: any; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initKeyboardEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void; + initKeyboardEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; readonly isTrusted: boolean; readonly key: string; @@ -3544,9 +3536,7 @@ declare namespace MSHTML { readonly fromElement: IHTMLElement; getModifierState(keyArg: string): boolean; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMouseEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; + initMouseEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; readonly isTrusted: boolean; readonly layerX: number; @@ -3593,12 +3583,8 @@ declare namespace MSHTML { readonly fromElement: IHTMLElement; getModifierState(keyArg: string): boolean; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMouseEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; - initMouseWheelEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: IEventTarget, modifiersListArg: string, wheelDeltaArg: number): void; + initMouseEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; + initMouseWheelEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: IEventTarget, modifiersListArg: string, wheelDeltaArg: number): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; readonly isTrusted: boolean; readonly layerX: number; @@ -3711,8 +3697,7 @@ declare namespace MSHTML { readonly defaultPrevented: boolean; readonly eventPhase: number; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMutationEvent( - eventType: string, canBubble: boolean, cancelable: boolean, relatedNodeArg: any, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void; + initMutationEvent(eventType: string, canBubble: boolean, cancelable: boolean, relatedNodeArg: any, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void; readonly isTrusted: boolean; readonly newValue: string; preventDefault(): void; @@ -3732,10 +3717,9 @@ declare namespace MSHTML { parseFromString(xmlSource: string, mimeType: string): IHTMLDocument2; } - class DOMParserFactory { - private 'MSHTML.DOMParserFactory_typekey': DOMParserFactory; - private constructor(); + interface DOMParserFactory { create(): IDOMParser; + (): IDOMParser; } class DOMProcessingInstruction { @@ -3773,7 +3757,7 @@ declare namespace MSHTML { readonly previousSibling: IHTMLDOMNode; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -3838,8 +3822,7 @@ declare namespace MSHTML { readonly defaultPrevented: boolean; readonly eventPhase: number; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initStorageEvent( - eventType: string, canBubble: boolean, cancelable: boolean, keyArg: string, oldValueArg: string, newValueArg: string, urlArg: string, storageAreaArg: IHTMLStorage): void; + initStorageEvent(eventType: string, canBubble: boolean, cancelable: boolean, keyArg: string, oldValueArg: string, newValueArg: string, urlArg: string, storageAreaArg: IHTMLStorage): void; readonly isTrusted: boolean; readonly key: string; readonly newValue: string; @@ -3928,14 +3911,9 @@ declare namespace MSHTML { readonly fromElement: IHTMLElement; getModifierState(keyArg: string): boolean; initEvent(eventType: string, canBubble: boolean, cancelable: boolean): void; - initMouseEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; + initMouseEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: IEventTarget): void; initUIEvent(eventType: string, canBubble: boolean, cancelable: boolean, view: IHTMLWindow2, detail: number): void; - initWheelEvent( - eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, - clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: IEventTarget, modifiersListArg: string, deltaX: number, deltaY: number, - deltaZ: number, deltaMode: number): void; + initWheelEvent(eventType: string, canBubble: boolean, cancelable: boolean, viewArg: IHTMLWindow2, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: IEventTarget, modifiersListArg: string, deltaX: number, deltaY: number, deltaZ: number, deltaMode: number): void; readonly isTrusted: boolean; readonly layerX: number; readonly layerY: number; @@ -3967,25 +3945,22 @@ declare namespace MSHTML { private constructor(); } - class FontNames { - private 'MSHTML.FontNames_typekey': FontNames; - private constructor(); + interface FontNames { readonly Count: number; item(pvarIndex: any): string; + (pvarIndex: any): string; } - class FramesCollection { - private 'MSHTML.FramesCollection_typekey': FramesCollection; - private constructor(); + interface FramesCollection { item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } - class HTCAttachBehavior { - private 'MSHTML.HTCAttachBehavior_typekey': HTCAttachBehavior; - private constructor(); + interface HTCAttachBehavior { detachEvent(): void; FireEvent(evt: any): void; + (evt: any): void; } class HTCDefaultDispatch { @@ -4098,7 +4073,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -4317,7 +4292,7 @@ declare namespace MSHTML { rel: string; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -4326,7 +4301,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -4343,16 +4318,16 @@ declare namespace MSHTML { search: string; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; shape: string; readonly sourceIndex: number; @@ -4468,7 +4443,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -4666,7 +4641,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -4675,7 +4650,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -4691,16 +4666,16 @@ declare namespace MSHTML { search: string; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; shape: string; readonly sourceIndex: number; @@ -4718,9 +4693,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLAreasCollection { - private 'MSHTML.HTMLAreasCollection_typekey': HTMLAreasCollection; - private constructor(); + interface HTMLAreasCollection { add(element: IHTMLElement, before?: any): void; readonly 'constructor': any; ie8_item(index: number): IHTMLElement2; @@ -4730,15 +4703,14 @@ declare namespace MSHTML { length: number; namedItem(name: string): any; - /** @param number [index=-1] */ + /** @param index [index=-1] */ remove(index?: number): void; tags(tagName: any): any; urns(urn: any): any; + (name?: any, index?: any): any; } - class HTMLAttributeCollection { - private 'MSHTML.HTMLAttributeCollection_typekey': HTMLAttributeCollection; - private constructor(); + interface HTMLAttributeCollection { readonly 'constructor': any; getNamedItem(bstrName: string): IHTMLDOMAttribute; getNamedItemNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -4758,6 +4730,7 @@ declare namespace MSHTML { removeNamedItemNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; setNamedItem(ppNode: IHTMLDOMAttribute): IHTMLDOMAttribute; setNamedItemNS(pNodeIn: IHTMLDOMAttribute2): IHTMLDOMAttribute2; + (name?: any): any; } class HTMLAudioElement { @@ -4848,7 +4821,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -5065,7 +5038,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -5074,7 +5047,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -5091,16 +5064,16 @@ declare namespace MSHTML { readonly seeking: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -5120,10 +5093,9 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLAudioElementFactory { - private 'MSHTML.HTMLAudioElementFactory_typekey': HTMLAudioElementFactory; - private constructor(); + interface HTMLAudioElementFactory { create(src?: any): IHTMLAudioElement; + (src?: any): IHTMLAudioElement; } class HTMLBaseElement { @@ -5196,7 +5168,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -5385,7 +5357,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -5394,7 +5366,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -5409,16 +5381,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -5507,7 +5479,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -5694,7 +5666,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -5703,7 +5675,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -5718,16 +5690,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: number; readonly sourceIndex: number; @@ -5815,7 +5787,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -6003,7 +5975,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -6012,7 +5984,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -6027,16 +5999,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -6126,7 +6098,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -6314,7 +6286,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -6323,7 +6295,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -6338,16 +6310,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -6440,7 +6412,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -6641,7 +6613,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -6650,7 +6622,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -6667,16 +6639,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -6766,7 +6738,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -6953,7 +6925,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -6962,7 +6934,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -6977,16 +6949,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -7078,7 +7050,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -7282,7 +7254,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -7291,7 +7263,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -7306,16 +7278,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -7405,7 +7377,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -7594,7 +7566,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -7603,7 +7575,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -7618,16 +7590,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -7719,7 +7691,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -7912,7 +7884,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -7921,7 +7893,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -7937,16 +7909,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -7992,10 +7964,10 @@ declare namespace MSHTML { readonly cssRules: IHTMLStyleSheetRulesCollection; cssText: string; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ deleteRule(lIndex?: number): void; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ insertRule(bstrRule: string, lIndex?: number): number; media: any; readonly parentRule: IHTMLCSSRule; @@ -8023,9 +7995,7 @@ declare namespace MSHTML { readonly type: number; } - class HTMLCSSStyleDeclaration { - private 'MSHTML.HTMLCSSStyleDeclaration_typekey': HTMLCSSStyleDeclaration; - private constructor(); + interface HTMLCSSStyleDeclaration { accelerator: string; alignContent: string; alignItems: string; @@ -8306,7 +8276,7 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; stopColor: any; stopOpacity: any; @@ -8400,11 +8370,10 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } - class HTMLCurrentStyle { - private 'MSHTML.HTMLCurrentStyle_typekey': HTMLCurrentStyle; - private constructor(); + interface HTMLCurrentStyle { readonly accelerator: string; alignContent: string; alignItems: string; @@ -8496,7 +8465,7 @@ declare namespace MSHTML { readonly fontVariant: string; readonly fontWeight: any; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getPropertyPriority(bstrPropertyName: string): string; getPropertyValue(bstrPropertyName: string): string; @@ -8642,7 +8611,7 @@ declare namespace MSHTML { readonly scrollbarShadowColor: any; readonly scrollbarTrackColor: any; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; readonly styleFloat: string; readonly tableLayout: string; @@ -8725,6 +8694,7 @@ declare namespace MSHTML { readonly writingMode: string; readonly zIndex: any; readonly zoom: any; + (index: number): string; } class HTMLDDElement { @@ -8797,7 +8767,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -8985,7 +8955,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -8994,7 +8964,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -9009,16 +8979,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -9140,7 +9110,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -9343,7 +9313,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -9352,7 +9322,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -9367,16 +9337,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -9468,7 +9438,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -9670,7 +9640,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -9679,7 +9649,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -9694,16 +9664,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -9800,7 +9770,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -9987,7 +9957,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -9996,7 +9966,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -10011,16 +9981,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -10078,8 +10048,8 @@ declare namespace MSHTML { createRenderStyle(v: string): IHTMLRenderStyle; /** - * @param string [bstrHref=''] - * @param number [lIndex=-1] + * @param bstrHref [bstrHref=''] + * @param lIndex [lIndex=-1] */ createStyleSheet(bstrHref?: string, lIndex?: number): IHTMLStyleSheet; createTextNode(text: string): IHTMLDOMNode; @@ -10099,7 +10069,7 @@ declare namespace MSHTML { elementsFromRect(left: number, top: number, width: number, height: number): IHTMLDOMChildrenCollection; readonly embeds: IHTMLElementCollection; - /** @param boolean [showUI=false] */ + /** @param showUI [showUI=false] */ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; execCommandShowHelp(cmdID: string): boolean; expando: boolean; @@ -10257,7 +10227,7 @@ declare namespace MSHTML { onvolumechange: any; onwaiting: any; - /** @param string [url='text/html'] */ + /** @param url [url='text/html'] */ open(url?: string, name?: any, features?: any, replace?: any): any; readonly ownerDocument: any; readonly parentNode: IHTMLDOMNode; @@ -10276,14 +10246,14 @@ declare namespace MSHTML { querySelectorAll(v: string): IHTMLDOMChildrenCollection; readonly readyState: string; - /** @param boolean [fForce=false] */ + /** @param fForce [fForce=false] */ recalc(fForce?: boolean): void; readonly referrer: string; releaseCapture(): void; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; removeEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -10470,7 +10440,7 @@ declare namespace MSHTML { removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; removeEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceData(offset: number, Count: number, bstrstring: string): void; @@ -10484,10 +10454,9 @@ declare namespace MSHTML { readonly wholeText: string; } - class HTMLDOMXmlSerializerFactory { - private 'MSHTML.HTMLDOMXmlSerializerFactory_typekey': HTMLDOMXmlSerializerFactory; - private constructor(); + interface HTMLDOMXmlSerializerFactory { create(): IDOMXmlSerializer; + (): IDOMXmlSerializer; } class HTMLDTElement { @@ -10560,7 +10529,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -10748,7 +10717,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -10757,7 +10726,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -10772,16 +10741,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -10797,9 +10766,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLElementCollection { - private 'MSHTML.HTMLElementCollection_typekey': HTMLElementCollection; - private constructor(); + interface HTMLElementCollection { readonly 'constructor': any; ie8_item(index: number): IHTMLElement2; readonly ie8_length: number; @@ -10810,6 +10777,7 @@ declare namespace MSHTML { tags(tagName: any): any; toString(): string; urns(urn: any): any; + (name?: any, index?: any): any; } class HTMLEmbed { @@ -10882,7 +10850,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -11077,7 +11045,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -11086,7 +11054,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -11101,16 +11069,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -11201,7 +11169,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -11388,7 +11356,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -11397,7 +11365,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -11412,16 +11380,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -11509,7 +11477,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -11696,7 +11664,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -11705,7 +11673,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -11720,16 +11688,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: any; readonly sourceIndex: number; @@ -11746,9 +11714,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLFormElement { - private 'MSHTML.HTMLFormElement_typekey': HTMLFormElement; - private constructor(); + interface HTMLFormElement { acceptCharset: string; accessKey: string; action: string; @@ -11759,14 +11725,14 @@ declare namespace MSHTML { appendItemSeparator(): void; /** - * @param string [name=''] - * @param string [filename=''] + * @param name [name=''] + * @param filename [filename=''] */ appendNameFilePair(name?: string, filename?: string): void; /** - * @param string [name=''] - * @param string [value=''] + * @param name [name=''] + * @param value [value=''] */ appendNameValuePair(name?: string, value?: string): void; applyElement(apply: IHTMLElement, where: string): IHTMLElement; @@ -11833,7 +11799,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -12026,7 +11992,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -12035,7 +12001,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -12051,16 +12017,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -12078,6 +12044,7 @@ declare namespace MSHTML { readonly uniqueNumber: number; urns(urn: any): any; xmsAcceleratorKey: string; + (name?: any, index?: any): any; } class HTMLFrameBase { @@ -12155,7 +12122,7 @@ declare namespace MSHTML { frameSpacing: any; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -12347,7 +12314,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -12356,7 +12323,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -12372,16 +12339,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -12479,7 +12446,7 @@ declare namespace MSHTML { frameSpacing: any; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -12691,7 +12658,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -12700,7 +12667,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -12716,16 +12683,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -12819,7 +12786,7 @@ declare namespace MSHTML { frameSpacing: any; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -13016,7 +12983,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -13025,7 +12992,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -13041,16 +13008,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -13136,7 +13103,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -13325,7 +13292,7 @@ declare namespace MSHTML { readonly recordset: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -13334,7 +13301,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -13349,16 +13316,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -13444,7 +13411,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -13633,7 +13600,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -13642,7 +13609,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -13657,16 +13624,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -13754,7 +13721,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -13941,7 +13908,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -13950,7 +13917,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -13965,16 +13932,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -14072,7 +14039,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -14260,7 +14227,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -14269,7 +14236,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -14284,16 +14251,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: any; readonly sourceIndex: number; @@ -14381,7 +14348,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -14568,7 +14535,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -14577,7 +14544,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -14592,16 +14559,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -14699,7 +14666,7 @@ declare namespace MSHTML { frameSpacing: any; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -14912,7 +14879,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -14921,7 +14888,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -14937,16 +14904,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -14966,10 +14933,9 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLImageElementFactory { - private 'MSHTML.HTMLImageElementFactory_typekey': HTMLImageElementFactory; - private constructor(); + interface HTMLImageElementFactory { create(width?: any, height?: any): IHTMLImgElement; + (width?: any, height?: any): IHTMLImgElement; } class HTMLImg { @@ -15055,7 +15021,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -15276,7 +15242,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -15285,7 +15251,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -15300,16 +15266,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -15354,7 +15320,7 @@ declare namespace MSHTML { focus(): void; readonly form: IHTMLFormElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -15401,12 +15367,12 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; status: any; @@ -15504,7 +15470,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -15720,7 +15686,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -15729,7 +15695,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -15747,16 +15713,16 @@ declare namespace MSHTML { selectionStart: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; setSelectionRange(start: number, end: number): void; size: number; @@ -15767,10 +15733,10 @@ declare namespace MSHTML { status: boolean; step: string; - /** @param number [n=1] */ + /** @param n [n=1] */ stepDown(n?: number): void; - /** @param number [n=1] */ + /** @param n [n=1] */ stepUp(n?: number): void; readonly style: IHTMLStyle; swapNode(otherNode: IHTMLDOMNode): IHTMLDOMNode; @@ -15813,7 +15779,7 @@ declare namespace MSHTML { focus(): void; readonly form: IHTMLFormElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -15863,13 +15829,13 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; select(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; size: number; readonly sourceIndex: number; @@ -15908,7 +15874,7 @@ declare namespace MSHTML { readonly filters: IHTMLFiltersCollection; focus(): void; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; height: number; hspace: number; @@ -15963,12 +15929,12 @@ declare namespace MSHTML { readonly readyState: string; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; src: string; @@ -16010,7 +15976,7 @@ declare namespace MSHTML { focus(): void; readonly form: IHTMLFormElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -16061,13 +16027,13 @@ declare namespace MSHTML { readOnly: boolean; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; select(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; size: number; readonly sourceIndex: number; @@ -16153,7 +16119,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -16341,7 +16307,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -16350,7 +16316,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -16365,16 +16331,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -16465,7 +16431,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -16668,7 +16634,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -16677,7 +16643,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -16692,16 +16658,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -16794,7 +16760,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -16996,7 +16962,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -17005,7 +16971,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -17020,16 +16986,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -17116,7 +17082,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -17303,7 +17269,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -17312,7 +17278,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -17327,16 +17293,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -17425,7 +17391,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -17617,7 +17583,7 @@ declare namespace MSHTML { rel: string; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -17626,7 +17592,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -17642,16 +17608,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sheet: IHTMLStyleSheet; readonly sourceIndex: number; @@ -17742,7 +17708,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -17929,7 +17895,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -17938,7 +17904,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -17953,16 +17919,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -17991,7 +17957,7 @@ declare namespace MSHTML { port: string; protocol: string; - /** @param boolean [flag=false] */ + /** @param flag [flag=false] */ reload(flag?: boolean): void; replace(bstr: string): void; search: string; @@ -18069,7 +18035,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -18257,7 +18223,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -18266,7 +18232,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -18281,16 +18247,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -18383,7 +18349,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -18591,7 +18557,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -18600,7 +18566,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -18617,16 +18583,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -18736,7 +18702,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -18953,7 +18919,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -18962,7 +18928,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -18979,16 +18945,16 @@ declare namespace MSHTML { readonly seeking: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -19086,7 +19052,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -19276,7 +19242,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -19285,7 +19251,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -19301,16 +19267,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -19366,13 +19332,12 @@ declare namespace MSHTML { readonly urn: string; } - class HTMLNamespaceCollection { - private 'MSHTML.HTMLNamespaceCollection_typekey': HTMLNamespaceCollection; - private constructor(); + interface HTMLNamespaceCollection { add(bstrNamespace: string, bstrUrn: string, implementationUrl?: any): any; readonly 'constructor': any; item(index: any): any; readonly length: number; + (index: any): any; } class HTMLNavigator { @@ -19473,7 +19438,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -19661,7 +19626,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -19670,7 +19635,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -19685,16 +19650,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -19780,7 +19745,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -19967,7 +19932,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -19976,7 +19941,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -19991,16 +19956,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -20104,7 +20069,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -20316,7 +20281,7 @@ declare namespace MSHTML { recordset: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -20325,7 +20290,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -20340,16 +20305,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -20442,7 +20407,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -20629,7 +20594,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -20638,7 +20603,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -20653,16 +20618,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -20706,7 +20671,7 @@ declare namespace MSHTML { focus(): void; readonly form: IHTMLFormElement; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; indeterminate: boolean; @@ -20755,12 +20720,12 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeFilter(pUnk: any): void; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; status: boolean; @@ -20849,7 +20814,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -21054,7 +21019,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -21063,7 +21028,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -21079,16 +21044,16 @@ declare namespace MSHTML { selected: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -21107,10 +21072,9 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLOptionElementFactory { - private 'MSHTML.HTMLOptionElementFactory_typekey': HTMLOptionElementFactory; - private constructor(); + interface HTMLOptionElementFactory { create(text?: any, value?: any, defaultSelected?: any, selected?: any): IHTMLOptionElement; + (text?: any, value?: any, defaultSelected?: any, selected?: any): IHTMLOptionElement; } class HTMLParaElement { @@ -21185,7 +21149,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -21372,7 +21336,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -21381,7 +21345,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -21396,16 +21360,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -21491,7 +21455,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -21680,7 +21644,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -21689,7 +21653,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -21704,16 +21668,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -21850,7 +21814,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -22038,7 +22002,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -22047,7 +22011,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -22062,16 +22026,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -22172,7 +22136,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -22376,7 +22340,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -22385,7 +22349,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -22400,16 +22364,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -22519,7 +22483,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -22723,7 +22687,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -22732,7 +22696,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -22749,16 +22713,16 @@ declare namespace MSHTML { select(): void; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -22779,9 +22743,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLRuleStyle { - private 'MSHTML.HTMLRuleStyle_typekey': HTMLRuleStyle; - private constructor(); + interface HTMLRuleStyle { accelerator: string; alignContent: string; alignItems: string; @@ -22881,7 +22843,7 @@ declare namespace MSHTML { fontVariant: string; fontWeight: string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getPropertyPriority(bstrPropertyName: string): string; getPropertyValue(bstrPropertyName: string): string; @@ -23021,7 +22983,7 @@ declare namespace MSHTML { posRight: number; quotes: string; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeProperty(bstrPropertyName: string): string; right: any; @@ -23037,10 +22999,10 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; styleFloat: string; tableLayout: string; @@ -23128,6 +23090,7 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } class HTMLScreen { @@ -23224,7 +23187,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -23413,7 +23376,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -23422,7 +23385,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -23437,16 +23400,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -23466,9 +23429,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLSelectElement { - private 'MSHTML.HTMLSelectElement_typekey': HTMLSelectElement; - private constructor(); + interface HTMLSelectElement { accessKey: string; add(element: IHTMLElement, before?: any): void; addBehavior(bstrURL: string, pvarFactory?: any): number; @@ -23542,7 +23503,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -23753,10 +23714,10 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [index=-1] */ + /** @param index [index=-1] */ remove(index?: number): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -23765,7 +23726,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -23781,16 +23742,16 @@ declare namespace MSHTML { selectedIndex: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: number; readonly sourceIndex: number; @@ -23810,6 +23771,7 @@ declare namespace MSHTML { urns(urn: any): any; value: string; xmsAcceleratorKey: string; + (name?: any, index?: any): any; } class HTMLSemanticElement { @@ -23882,7 +23844,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -24069,7 +24031,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -24078,7 +24040,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -24093,16 +24055,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -24192,7 +24154,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -24395,7 +24357,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -24404,7 +24366,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -24419,16 +24381,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -24521,7 +24483,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -24723,7 +24685,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -24732,7 +24694,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -24747,16 +24709,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -24848,7 +24810,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -25050,7 +25012,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -25059,7 +25021,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -25074,16 +25036,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -25114,9 +25076,7 @@ declare namespace MSHTML { setItem(bstrKey: string, bstrValue: string): void; } - class HTMLStyle { - private 'MSHTML.HTMLStyle_typekey': HTMLStyle; - private constructor(); + interface HTMLStyle { accelerator: string; alignContent: string; alignItems: string; @@ -25216,7 +25176,7 @@ declare namespace MSHTML { fontVariant: string; fontWeight: string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getExpression(propname: string): any; getPropertyPriority(bstrPropertyName: string): string; @@ -25365,7 +25325,7 @@ declare namespace MSHTML { posWidth: number; quotes: string; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeExpression(propname: string): boolean; removeProperty(bstrPropertyName: string): string; @@ -25382,13 +25342,13 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; styleFloat: string; tableLayout: string; @@ -25477,6 +25437,7 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } class HTMLStyleElement { @@ -25549,7 +25510,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -25737,7 +25698,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -25746,7 +25707,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -25761,16 +25722,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sheet: IHTMLStyleSheet; readonly sourceIndex: number; @@ -25811,19 +25772,19 @@ declare namespace MSHTML { private 'MSHTML.HTMLStyleSheet_typekey': HTMLStyleSheet; private constructor(); - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addImport(bstrURL: string, lIndex?: number): number; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number; readonly 'constructor': any; readonly cssRules: IHTMLStyleSheetRulesCollection; cssText: string; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ deleteRule(lIndex?: number): void; disabled: boolean; href: string; @@ -25835,7 +25796,7 @@ declare namespace MSHTML { readonly ie9_type: string; readonly imports: IHTMLStyleSheetsCollection; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ insertRule(bstrRule: string, lIndex?: number): number; readonly isAlternate: boolean; readonly isPrefAlternate: boolean; @@ -25867,12 +25828,11 @@ declare namespace MSHTML { readonly type: number; } - class HTMLStyleSheetPagesCollection { - private 'MSHTML.HTMLStyleSheetPagesCollection_typekey': HTMLStyleSheetPagesCollection; - private constructor(); + interface HTMLStyleSheetPagesCollection { readonly 'constructor': any; item(index: number): IHTMLStyleSheetPage; readonly length: number; + (index: number): IHTMLStyleSheetPage; } class HTMLStyleSheetRule { @@ -25890,33 +25850,30 @@ declare namespace MSHTML { readonly type: number; } - class HTMLStyleSheetRulesAppliedCollection { - private 'MSHTML.HTMLStyleSheetRulesAppliedCollection_typekey': HTMLStyleSheetRulesAppliedCollection; - private constructor(); + interface HTMLStyleSheetRulesAppliedCollection { item(index: number): IHTMLStyleSheetRule; readonly length: number; propertyAppliedBy(name: string): IHTMLStyleSheetRule; propertyAppliedTrace(name: string, index: number): IHTMLStyleSheetRule; propertyAppliedTraceLength(name: string): number; + (index: number): IHTMLStyleSheetRule; } - class HTMLStyleSheetRulesCollection { - private 'MSHTML.HTMLStyleSheetRulesCollection_typekey': HTMLStyleSheetRulesCollection; - private constructor(); + interface HTMLStyleSheetRulesCollection { readonly 'constructor': any; ie9_item(index: number): IHTMLCSSRule; readonly ie9_length: number; item(index: number): IHTMLStyleSheetRule; readonly length: number; + (index: number): IHTMLStyleSheetRule; } - class HTMLStyleSheetsCollection { - private 'MSHTML.HTMLStyleSheetsCollection_typekey': HTMLStyleSheetsCollection; - private constructor(); + interface HTMLStyleSheetsCollection { readonly 'constructor': any; ie9_item(index: number): any; item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } class HTMLTable { @@ -26000,7 +25957,7 @@ declare namespace MSHTML { dataSrc: string; deleteCaption(): void; - /** @param number [index=-1] */ + /** @param index [index=-1] */ deleteRow(index?: number): void; deleteTFoot(): void; deleteTHead(): void; @@ -26018,7 +25975,7 @@ declare namespace MSHTML { frame: string; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -26046,7 +26003,7 @@ declare namespace MSHTML { ie9_appendChild(newChild: IHTMLDOMNode): IHTMLDOMNode; ie9_caption: IHTMLTableCaption; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_deleteRow(index?: number): void; ie9_getAttribute(strAttributeName: string): any; ie9_getAttributeNode(strAttributeName: string): IHTMLDOMAttribute2; @@ -26054,7 +26011,7 @@ declare namespace MSHTML { ie9_hasAttributes(): boolean; ie9_insertBefore(newChild: IHTMLDOMNode, refChild?: any): IHTMLDOMNode; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_insertRow(index?: number): any; readonly ie9_nodeName: string; ie9_removeAttribute(strAttributeName: string): void; @@ -26073,7 +26030,7 @@ declare namespace MSHTML { insertAdjacentText(where: string, text: string): void; insertBefore(newChild: IHTMLDOMNode, refChild?: any): IHTMLDOMNode; - /** @param number [index=-1] */ + /** @param index [index=-1] */ insertRow(index?: number): any; readonly isContentEditable: boolean; isDefaultNamespace(pvarNamespace: any): boolean; @@ -26093,8 +26050,8 @@ declare namespace MSHTML { mergeAttributes(mergeThis: IHTMLElement, pvarFlags?: any): void; /** - * @param number [indexFrom=-1] - * @param number [indexTo=-1] + * @param indexFrom [indexFrom=-1] + * @param indexTo [indexTo=-1] */ moveRow(indexFrom?: number, indexTo?: number): any; msMatchesSelector(v: string): boolean; @@ -26243,7 +26200,7 @@ declare namespace MSHTML { refresh(): void; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -26252,7 +26209,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -26269,16 +26226,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -26371,7 +26328,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -26558,7 +26515,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -26567,7 +26524,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -26582,16 +26539,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -26690,7 +26647,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -26882,7 +26839,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -26891,7 +26848,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -26908,16 +26865,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -27008,7 +26965,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -27197,7 +27154,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -27206,7 +27163,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -27221,16 +27178,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; span: number; @@ -27316,7 +27273,7 @@ declare namespace MSHTML { createControlRange(): any; readonly currentStyle: IHTMLCurrentStyle; - /** @param number [index=-1] */ + /** @param index [index=-1] */ deleteCell(index?: number): void; detachEvent(event: string, pdisp: any): void; dir: string; @@ -27330,7 +27287,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -27358,14 +27315,14 @@ declare namespace MSHTML { ie9_ch: string; ie9_chOff: string; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_deleteCell(index?: number): void; ie9_getAttribute(strAttributeName: string): any; ie9_getAttributeNode(strAttributeName: string): IHTMLDOMAttribute2; ie9_hasAttribute(name: string): boolean; ie9_hasAttributes(): boolean; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_insertCell(index?: number): any; readonly ie9_nodeName: string; ie9_removeAttribute(strAttributeName: string): void; @@ -27380,7 +27337,7 @@ declare namespace MSHTML { insertAdjacentText(where: string, text: string): void; insertBefore(newChild: IHTMLDOMNode, refChild?: any): IHTMLDOMNode; - /** @param number [index=-1] */ + /** @param index [index=-1] */ insertCell(index?: number): any; readonly isContentEditable: boolean; readonly isDisabled: boolean; @@ -27529,7 +27486,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -27538,7 +27495,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -27555,16 +27512,16 @@ declare namespace MSHTML { readonly sectionRowIndex: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -27644,7 +27601,7 @@ declare namespace MSHTML { createControlRange(): any; readonly currentStyle: IHTMLCurrentStyle; - /** @param number [index=-1] */ + /** @param index [index=-1] */ deleteRow(index?: number): void; detachEvent(event: string, pdisp: any): void; dir: string; @@ -27658,7 +27615,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -27685,14 +27642,14 @@ declare namespace MSHTML { ie9_ch: string; ie9_chOff: string; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_deleteRow(index?: number): void; ie9_getAttribute(strAttributeName: string): any; ie9_getAttributeNode(strAttributeName: string): IHTMLDOMAttribute2; ie9_hasAttribute(name: string): boolean; ie9_hasAttributes(): boolean; - /** @param number [index=-1] */ + /** @param index [index=-1] */ ie9_insertRow(index?: number): any; readonly ie9_nodeName: string; ie9_removeAttribute(strAttributeName: string): void; @@ -27707,7 +27664,7 @@ declare namespace MSHTML { insertAdjacentText(where: string, text: string): void; insertBefore(newChild: IHTMLDOMNode, refChild?: any): IHTMLDOMNode; - /** @param number [index=-1] */ + /** @param index [index=-1] */ insertRow(index?: number): any; readonly isContentEditable: boolean; readonly isDisabled: boolean; @@ -27719,8 +27676,8 @@ declare namespace MSHTML { mergeAttributes(mergeThis: IHTMLElement, pvarFlags?: any): void; /** - * @param number [indexFrom=-1] - * @param number [indexTo=-1] + * @param indexFrom [indexFrom=-1] + * @param indexTo [indexTo=-1] */ moveRow(indexFrom?: number, indexTo?: number): any; msMatchesSelector(v: string): boolean; @@ -27862,7 +27819,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -27871,7 +27828,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -27887,16 +27844,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -27991,7 +27948,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -28195,7 +28152,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -28204,7 +28161,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -28223,16 +28180,16 @@ declare namespace MSHTML { selectionStart: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; setSelectionRange(start: number, end: number): void; readonly sourceIndex: number; @@ -28324,7 +28281,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -28511,7 +28468,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -28520,7 +28477,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -28535,16 +28492,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -28640,7 +28597,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -28827,7 +28784,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -28836,7 +28793,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -28851,16 +28808,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -28948,7 +28905,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -29135,7 +29092,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -29144,7 +29101,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -29159,16 +29116,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -29255,7 +29212,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -29442,7 +29399,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -29451,7 +29408,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -29466,16 +29423,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -29491,12 +29448,11 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLUrnCollection { - private 'MSHTML.HTMLUrnCollection_typekey': HTMLUrnCollection; - private constructor(); + interface HTMLUrnCollection { readonly 'constructor': any; item(index: number): string; readonly length: number; + (index: number): string; } class HTMLVideoElement { @@ -29587,7 +29543,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -29806,7 +29762,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -29815,7 +29771,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -29832,16 +29788,16 @@ declare namespace MSHTML { readonly seeking: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -29864,9 +29820,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLW3CComputedStyle { - private 'MSHTML.HTMLW3CComputedStyle_typekey': HTMLW3CComputedStyle; - private constructor(); + interface HTMLW3CComputedStyle { accelerator: string; alignContent: string; alignItems: string; @@ -30145,7 +30099,7 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; stopColor: any; stopOpacity: any; @@ -30239,14 +30193,13 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } - class HTMLWindow2 { - private 'MSHTML.HTMLWindow2_typekey': HTMLWindow2; - private constructor(); + interface HTMLWindow2 { addEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param string [message=''] */ + /** @param message [message=''] */ alert(message?: string): void; readonly applicationCache: applicationCache; attachEvent(event: string, pdisp: any): boolean; @@ -30258,7 +30211,7 @@ declare namespace MSHTML { close(): void; readonly closed: boolean; - /** @param string [message=''] */ + /** @param message [message=''] */ confirm(message?: string): boolean; readonly 'constructor': any; createPopup(varArgIn?: any): any; @@ -30268,14 +30221,14 @@ declare namespace MSHTML { readonly document: IHTMLDocument2; readonly event: IHTMLEventObj; - /** @param string [language='JScript'] */ + /** @param language [language='JScript'] */ execScript(code: string, language?: string): any; readonly external: any; focus(): void; readonly frameElement: IHTMLFrameBase; readonly frames: FramesCollection; - /** @param string [bstrPseudoElt=''] */ + /** @param bstrPseudoElt [bstrPseudoElt=''] */ getComputedStyle(varArgIn: IHTMLDOMNode, bstrPseudoElt?: string): IHTMLCSSStyleDeclaration; getSelection(): IHTMLSelection; readonly history: IOmHistory; @@ -30376,10 +30329,10 @@ declare namespace MSHTML { onwaiting: any; /** - * @param string [url=''] - * @param string [name=''] - * @param string [features=''] - * @param boolean [replace=false] + * @param url [url=''] + * @param name [name=''] + * @param features [features=''] + * @param replace [replace=false] */ open(url?: string, name?: string, features?: string, replace?: boolean): IHTMLWindow2; opener: any; @@ -30393,8 +30346,8 @@ declare namespace MSHTML { print(): void; /** - * @param string [message=''] - * @param string [defstr='undefined'] + * @param message [message=''] + * @param defstr [defstr='undefined'] */ prompt(message?: string, defstr?: string): any; removeEventListener(type: string, listener: any, useCapture: boolean): void; @@ -30413,11 +30366,11 @@ declare namespace MSHTML { setInterval(expression: any, msec: number, language?: any): number; setTimeout(expression: any, msec: number, language?: any): number; - /** @param string [features=''] */ + /** @param features [features=''] */ showHelp(helpURL: string, helpArg: any, features?: string): void; showModalDialog(dialog: string, varArgIn?: any, varOptions?: any): any; - /** @param string [url=''] */ + /** @param url [url=''] */ showModelessDialog(url?: string, varArgIn?: any, options?: any): IHTMLWindow2; status: string; readonly styleMedia: IHTMLStyleMedia; @@ -30425,14 +30378,13 @@ declare namespace MSHTML { toStaticHTML(bstrHTML: string): string; toString(): string; readonly window: IHTMLWindow2; + (pvarIndex: any): any; } - class HTMLWindowProxy { - private 'MSHTML.HTMLWindowProxy_typekey': HTMLWindowProxy; - private constructor(); + interface HTMLWindowProxy { addEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param string [message=''] */ + /** @param message [message=''] */ alert(message?: string): void; readonly applicationCache: applicationCache; attachEvent(event: string, pdisp: any): boolean; @@ -30444,7 +30396,7 @@ declare namespace MSHTML { close(): void; readonly closed: boolean; - /** @param string [message=''] */ + /** @param message [message=''] */ confirm(message?: string): boolean; readonly 'constructor': any; createPopup(varArgIn?: any): any; @@ -30454,14 +30406,14 @@ declare namespace MSHTML { readonly document: IHTMLDocument2; readonly event: IHTMLEventObj; - /** @param string [language='JScript'] */ + /** @param language [language='JScript'] */ execScript(code: string, language?: string): any; readonly external: any; focus(): void; readonly frameElement: IHTMLFrameBase; readonly frames: FramesCollection; - /** @param string [bstrPseudoElt=''] */ + /** @param bstrPseudoElt [bstrPseudoElt=''] */ getComputedStyle(varArgIn: IHTMLDOMNode, bstrPseudoElt?: string): IHTMLCSSStyleDeclaration; getSelection(): IHTMLSelection; readonly history: IOmHistory; @@ -30562,10 +30514,10 @@ declare namespace MSHTML { onwaiting: any; /** - * @param string [url=''] - * @param string [name=''] - * @param string [features=''] - * @param boolean [replace=false] + * @param url [url=''] + * @param name [name=''] + * @param features [features=''] + * @param replace [replace=false] */ open(url?: string, name?: string, features?: string, replace?: boolean): IHTMLWindow2; opener: any; @@ -30579,8 +30531,8 @@ declare namespace MSHTML { print(): void; /** - * @param string [message=''] - * @param string [defstr='undefined'] + * @param message [message=''] + * @param defstr [defstr='undefined'] */ prompt(message?: string, defstr?: string): any; removeEventListener(type: string, listener: any, useCapture: boolean): void; @@ -30599,11 +30551,11 @@ declare namespace MSHTML { setInterval(expression: any, msec: number, language?: any): number; setTimeout(expression: any, msec: number, language?: any): number; - /** @param string [features=''] */ + /** @param features [features=''] */ showHelp(helpURL: string, helpArg: any, features?: string): void; showModalDialog(dialog: string, varArgIn?: any, varOptions?: any): any; - /** @param string [url=''] */ + /** @param url [url=''] */ showModelessDialog(url?: string, varArgIn?: any, options?: any): IHTMLWindow2; status: string; readonly styleMedia: IHTMLStyleMedia; @@ -30611,6 +30563,7 @@ declare namespace MSHTML { toStaticHTML(bstrHTML: string): string; toString(): string; readonly window: IHTMLWindow2; + (pvarIndex: any): any; } class HTMLWndOptionElement { @@ -30689,7 +30642,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -30893,7 +30846,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -30902,7 +30855,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -30918,16 +30871,16 @@ declare namespace MSHTML { selected: boolean; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -30946,9 +30899,7 @@ declare namespace MSHTML { xmsAcceleratorKey: string; } - class HTMLWndSelectElement { - private 'MSHTML.HTMLWndSelectElement_typekey': HTMLWndSelectElement; - private constructor(); + interface HTMLWndSelectElement { accessKey: string; add(element: IHTMLElement, before?: any): void; addBehavior(bstrURL: string, pvarFactory?: any): number; @@ -31022,7 +30973,7 @@ declare namespace MSHTML { readonly form: IHTMLFormElement; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -31230,10 +31181,10 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [index=-1] */ + /** @param index [index=-1] */ remove(index?: number): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -31242,7 +31193,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -31258,16 +31209,16 @@ declare namespace MSHTML { selectedIndex: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; size: number; readonly sourceIndex: number; @@ -31287,6 +31238,7 @@ declare namespace MSHTML { urns(urn: any): any; value: string; xmsAcceleratorKey: string; + (name?: any, index?: any): any; } class HTMLXMLHttpRequest { @@ -31313,10 +31265,9 @@ declare namespace MSHTML { timeout: number; } - class HTMLXMLHttpRequestFactory { - private 'MSHTML.HTMLXMLHttpRequestFactory_typekey': HTMLXMLHttpRequestFactory; - private constructor(); + interface HTMLXMLHttpRequestFactory { create(): IHTMLXMLHttpRequest; + (): IHTMLXMLHttpRequest; } class ICanvasGradient { @@ -31485,16 +31436,16 @@ declare namespace MSHTML { removeEventListener(type: string, listener: any, useCapture: boolean): void; } - class IHTMLAreasCollection { - private 'MSHTML.IHTMLAreasCollection_typekey': IHTMLAreasCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLAreasCollection { add(element: IHTMLElement, before?: any): void; item(name?: any, index?: any): any; length: number; - /** @param number [index=-1] */ + /** @param index [index=-1] */ remove(index?: number): void; tags(tagName: any): any; + (name?: any, index?: any): any; } class IHTMLAttributeCollection3 { @@ -31512,11 +31463,11 @@ declare namespace MSHTML { private constructor(); } - class IHTMLBookmarkCollection { - private 'MSHTML.IHTMLBookmarkCollection_typekey': IHTMLBookmarkCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLBookmarkCollection { item(index: number): any; readonly length: number; + (index: number): any; } class IHTMLCanvasElement { @@ -31537,9 +31488,8 @@ declare namespace MSHTML { readonly type: number; } - class IHTMLCSSStyleDeclaration { - private 'MSHTML.IHTMLCSSStyleDeclaration_typekey': IHTMLCSSStyleDeclaration; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLCSSStyleDeclaration { accelerator: string; alignmentBaseline: string; background: string; @@ -31693,7 +31643,7 @@ declare namespace MSHTML { scrollbarShadowColor: any; scrollbarTrackColor: any; - /** @param any [pvarPropertyPriority=''] */ + /** @param pvarPropertyPriority [pvarPropertyPriority=''] */ setProperty(bstrPropertyName: string, pvarPropertyValue: any, pvarPropertyPriority?: any): void; stopColor: any; stopOpacity: any; @@ -31733,6 +31683,7 @@ declare namespace MSHTML { writingMode: string; zIndex: any; zoom: any; + (index: number): string; } class IHTMLCurrentStyle { @@ -31779,7 +31730,7 @@ declare namespace MSHTML { readonly fontVariant: string; readonly fontWeight: any; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; readonly height: any; readonly imeMode: string; @@ -31866,8 +31817,8 @@ declare namespace MSHTML { createElement(eTag: string): IHTMLElement; /** - * @param string [bstrHref=''] - * @param number [lIndex=-1] + * @param bstrHref [bstrHref=''] + * @param lIndex [lIndex=-1] */ createStyleSheet(bstrHref?: string, lIndex?: number): IHTMLStyleSheet; defaultCharset: string; @@ -31876,7 +31827,7 @@ declare namespace MSHTML { elementFromPoint(x: number, y: number): IHTMLElement; readonly embeds: IHTMLElementCollection; - /** @param boolean [showUI=false] */ + /** @param showUI [showUI=false] */ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; execCommandShowHelp(cmdID: string): boolean; expando: boolean; @@ -31914,7 +31865,7 @@ declare namespace MSHTML { onrowexit: any; onselectstart: any; - /** @param string [url='text/html'] */ + /** @param url [url='text/html'] */ open(url?: string, name?: any, features?: any, replace?: any): any; readonly parentWindow: IHTMLWindow2; readonly plugins: IHTMLElementCollection; @@ -32014,11 +31965,11 @@ declare namespace MSHTML { readonly version: string; } - class IHTMLDocumentCompatibleInfoCollection { - private 'MSHTML.IHTMLDocumentCompatibleInfoCollection_typekey': IHTMLDocumentCompatibleInfoCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLDocumentCompatibleInfoCollection { item(index: number): IHTMLDocumentCompatibleInfo; readonly length: number; + (index: number): IHTMLDocumentCompatibleInfo; } class IHTMLDOMAttribute { @@ -32052,11 +32003,11 @@ declare namespace MSHTML { value: string; } - class IHTMLDOMChildrenCollection { - private 'MSHTML.IHTMLDOMChildrenCollection_typekey': IHTMLDOMChildrenCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLDOMChildrenCollection { item(index: number): any; readonly length: number; + (index: number): any; } class IHTMLDOMImplementation { @@ -32084,7 +32035,7 @@ declare namespace MSHTML { readonly previousSibling: IHTMLDOMNode; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -32153,7 +32104,7 @@ declare namespace MSHTML { readonly document: any; readonly filters: IHTMLFiltersCollection; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -32196,11 +32147,11 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; readonly style: IHTMLStyle; @@ -32276,22 +32227,22 @@ declare namespace MSHTML { scrollTop: number; readonly scrollWidth: number; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; tabIndex: number; tagUrn: string; } - class IHTMLElementCollection { - private 'MSHTML.IHTMLElementCollection_typekey': IHTMLElementCollection; - private constructor(); - item(name?: string | number, index?: number): any; + // tslint:disable-next-line:interface-name + interface IHTMLElementCollection { + item(name?: any, index?: any): any; length: number; tags(tagName: any): any; toString(): string; + (name?: any, index?: any): any; } class IHTMLEventObj { @@ -32321,16 +32272,15 @@ declare namespace MSHTML { readonly y: number; } - class IHTMLFiltersCollection { - private 'MSHTML.IHTMLFiltersCollection_typekey': IHTMLFiltersCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLFiltersCollection { item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } - class IHTMLFormElement { - private 'MSHTML.IHTMLFormElement_typekey': IHTMLFormElement; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLFormElement { action: string; dir: string; readonly elements: any; @@ -32345,6 +32295,7 @@ declare namespace MSHTML { submit(): void; tags(tagName: any): any; target: string; + (name?: any, index?: any): any; } class IHTMLFrameBase { @@ -32407,7 +32358,7 @@ declare namespace MSHTML { port: string; protocol: string; - /** @param boolean [flag=false] */ + /** @param flag [flag=false] */ reload(flag?: boolean): void; replace(bstr: string): void; search: string; @@ -32480,7 +32431,7 @@ declare namespace MSHTML { private constructor(); readonly length: number; - /** @param boolean [reload=false] */ + /** @param reload [reload=false] */ refresh(reload?: boolean): void; } @@ -32493,11 +32444,11 @@ declare namespace MSHTML { top: number; } - class IHTMLRectCollection { - private 'MSHTML.IHTMLRectCollection_typekey': IHTMLRectCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLRectCollection { item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } class IHTMLRenderStyle { @@ -32559,7 +32510,7 @@ declare namespace MSHTML { fontVariant: string; fontWeight: string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; height: any; left: any; @@ -32584,10 +32535,10 @@ declare namespace MSHTML { pageBreakBefore: string; readonly position: string; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; styleFloat: string; textAlign: string; @@ -32708,7 +32659,7 @@ declare namespace MSHTML { fontVariant: string; fontWeight: string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; height: any; left: any; @@ -32741,10 +32692,10 @@ declare namespace MSHTML { posTop: number; posWidth: number; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; styleFloat: string; textAlign: string; @@ -32777,10 +32728,10 @@ declare namespace MSHTML { private 'MSHTML.IHTMLStyleSheet_typekey': IHTMLStyleSheet; private constructor(); - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addImport(bstrURL: string, lIndex?: number): number; - /** @param number [lIndex=-1] */ + /** @param lIndex [lIndex=-1] */ addRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number; cssText: string; disabled: boolean; @@ -32805,11 +32756,11 @@ declare namespace MSHTML { readonly selector: string; } - class IHTMLStyleSheetPagesCollection { - private 'MSHTML.IHTMLStyleSheetPagesCollection_typekey': IHTMLStyleSheetPagesCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLStyleSheetPagesCollection { item(index: number): IHTMLStyleSheetPage; readonly length: number; + (index: number): IHTMLStyleSheetPage; } class IHTMLStyleSheetRule { @@ -32820,28 +32771,28 @@ declare namespace MSHTML { readonly style: IHTMLRuleStyle; } - class IHTMLStyleSheetRulesAppliedCollection { - private 'MSHTML.IHTMLStyleSheetRulesAppliedCollection_typekey': IHTMLStyleSheetRulesAppliedCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLStyleSheetRulesAppliedCollection { item(index: number): IHTMLStyleSheetRule; readonly length: number; propertyAppliedBy(name: string): IHTMLStyleSheetRule; propertyAppliedTrace(name: string, index: number): IHTMLStyleSheetRule; propertyAppliedTraceLength(name: string): number; + (index: number): IHTMLStyleSheetRule; } - class IHTMLStyleSheetRulesCollection { - private 'MSHTML.IHTMLStyleSheetRulesCollection_typekey': IHTMLStyleSheetRulesCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLStyleSheetRulesCollection { item(index: number): IHTMLStyleSheetRule; readonly length: number; + (index: number): IHTMLStyleSheetRule; } - class IHTMLStyleSheetsCollection { - private 'MSHTML.IHTMLStyleSheetsCollection_typekey': IHTMLStyleSheetsCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface IHTMLStyleSheetsCollection { item(pvarIndex: any): any; readonly length: number; + (pvarIndex: any): any; } class IHTMLTableCaption { @@ -32857,10 +32808,10 @@ declare namespace MSHTML { align: string; bgColor: any; - /** @param number [index=-1] */ + /** @param index [index=-1] */ deleteRow(index?: number): void; - /** @param number [index=-1] */ + /** @param index [index=-1] */ insertRow(index?: number): any; readonly rows: IHTMLElementCollection; vAlign: string; @@ -32878,19 +32829,19 @@ declare namespace MSHTML { private 'MSHTML.IHTMLTxtRange_typekey': IHTMLTxtRange; private constructor(); - /** @param boolean [start=true] */ + /** @param start [start=true] */ collapse(start?: boolean): void; compareEndPoints(how: string, sourceRange: IHTMLTxtRange): number; duplicate(): IHTMLTxtRange; - /** @param boolean [showUI=false] */ + /** @param showUI [showUI=false] */ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; execCommandShowHelp(cmdID: string): boolean; expand(Unit: string): boolean; /** - * @param number [Count=1073741823] - * @param number [flags=0] + * @param Count [Count=1073741823] + * @param flags [flags=0] */ findText(String: string, Count?: number, flags?: number): boolean; getBookmark(): string; @@ -32898,13 +32849,13 @@ declare namespace MSHTML { inRange(range: IHTMLTxtRange): boolean; isEqual(range: IHTMLTxtRange): boolean; - /** @param number [Count=1] */ + /** @param Count [Count=1] */ move(Unit: string, Count?: number): number; - /** @param number [Count=1] */ + /** @param Count [Count=1] */ moveEnd(Unit: string, Count?: number): number; - /** @param number [Count=1] */ + /** @param Count [Count=1] */ moveStart(Unit: string, Count?: number): number; moveToBookmark(Bookmark: string): boolean; moveToElementText(element: IHTMLElement): void; @@ -32918,18 +32869,16 @@ declare namespace MSHTML { queryCommandText(cmdID: string): string; queryCommandValue(cmdID: string): any; - /** @param boolean [fStart=true] */ + /** @param fStart [fStart=true] */ scrollIntoView(fStart?: boolean): void; select(): void; setEndPoint(how: string, sourceRange: IHTMLTxtRange): void; text: string; } - class IHTMLWindow2 { - private 'MSHTML.IHTMLWindow2_typekey': IHTMLWindow2; - private constructor(); - - /** @param string [message=''] */ + // tslint:disable-next-line:interface-name + interface IHTMLWindow2 { + /** @param message [message=''] */ alert(message?: string): void; blur(): void; clearInterval(timerID: number): void; @@ -32938,13 +32887,13 @@ declare namespace MSHTML { close(): void; readonly closed: boolean; - /** @param string [message=''] */ + /** @param message [message=''] */ confirm(message?: string): boolean; defaultStatus: string; readonly document: IHTMLDocument2; readonly event: IHTMLEventObj; - /** @param string [language='JScript'] */ + /** @param language [language='JScript'] */ execScript(code: string, language?: string): any; readonly external: any; focus(): void; @@ -32971,10 +32920,10 @@ declare namespace MSHTML { onunload: any; /** - * @param string [url=''] - * @param string [name=''] - * @param string [features=''] - * @param boolean [replace=false] + * @param url [url=''] + * @param name [name=''] + * @param features [features=''] + * @param replace [replace=false] */ open(url?: string, name?: string, features?: string, replace?: boolean): IHTMLWindow2; opener: any; @@ -32982,8 +32931,8 @@ declare namespace MSHTML { readonly parent: IHTMLWindow2; /** - * @param string [message=''] - * @param string [defstr='undefined'] + * @param message [message=''] + * @param defstr [defstr='undefined'] */ prompt(message?: string, defstr?: string): any; resizeBy(x: number, y: number): void; @@ -32996,13 +32945,14 @@ declare namespace MSHTML { setInterval(expression: string, msec: number, language?: any): number; setTimeout(expression: string, msec: number, language?: any): number; - /** @param string [features=''] */ + /** @param features [features=''] */ showHelp(helpURL: string, helpArg: any, features?: string): void; showModalDialog(dialog: string, varArgIn?: any, varOptions?: any): any; status: string; readonly top: IHTMLWindow2; toString(): string; readonly window: IHTMLWindow2; + (pvarIndex: any): any; } class IHTMLXDomainRequest { @@ -33398,8 +33348,8 @@ declare namespace MSHTML { createRenderStyle(v: string): IHTMLRenderStyle; /** - * @param string [bstrHref=''] - * @param number [lIndex=-1] + * @param bstrHref [bstrHref=''] + * @param lIndex [lIndex=-1] */ createStyleSheet(bstrHref?: string, lIndex?: number): IHTMLStyleSheet; createTextNode(text: string): IHTMLDOMNode; @@ -33419,7 +33369,7 @@ declare namespace MSHTML { elementsFromRect(left: number, top: number, width: number, height: number): IHTMLDOMChildrenCollection; readonly embeds: IHTMLElementCollection; - /** @param boolean [showUI=false] */ + /** @param showUI [showUI=false] */ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean; execCommandShowHelp(cmdID: string): boolean; expando: boolean; @@ -33577,7 +33527,7 @@ declare namespace MSHTML { onvolumechange: any; onwaiting: any; - /** @param string [url='text/html'] */ + /** @param url [url='text/html'] */ open(url?: string, name?: any, features?: any, replace?: any): any; readonly ownerDocument: any; readonly parentNode: IHTMLDOMNode; @@ -33596,14 +33546,14 @@ declare namespace MSHTML { querySelectorAll(v: string): IHTMLDOMChildrenCollection; readonly readyState: string; - /** @param boolean [fForce=false] */ + /** @param fForce [fForce=false] */ recalc(fForce?: boolean): void; readonly referrer: string; releaseCapture(): void; removeChild(oldChild: IHTMLDOMNode): IHTMLDOMNode; removeEventListener(type: string, listener: any, useCapture: boolean): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; replaceNode(replacement: IHTMLDOMNode): IHTMLDOMNode; @@ -33629,9 +33579,7 @@ declare namespace MSHTML { xmlVersion: string; } - class OldHTMLFormElement { - private 'MSHTML.OldHTMLFormElement_typekey': OldHTMLFormElement; - private constructor(); + interface OldHTMLFormElement { acceptCharset: string; accessKey: string; action: string; @@ -33642,14 +33590,14 @@ declare namespace MSHTML { appendItemSeparator(): void; /** - * @param string [name=''] - * @param string [filename=''] + * @param name [name=''] + * @param filename [filename=''] */ appendNameFilePair(name?: string, filename?: string): void; /** - * @param string [name=''] - * @param string [value=''] + * @param name [name=''] + * @param value [value=''] */ appendNameValuePair(name?: string, value?: string): void; applyElement(apply: IHTMLElement, where: string): IHTMLElement; @@ -33716,7 +33664,7 @@ declare namespace MSHTML { focus(): void; getAdjacentText(where: string): string; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; getAttributeNode(bstrName: string): IHTMLDOMAttribute; getAttributeNodeNS(pvarNS: any, bstrName: string): IHTMLDOMAttribute2; @@ -33909,7 +33857,7 @@ declare namespace MSHTML { readonly recordNumber: any; releaseCapture(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; removeAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; removeAttributeNS(pvarNS: any, strAttributeName: string): void; @@ -33918,7 +33866,7 @@ declare namespace MSHTML { removeExpression(propname: string): boolean; removeFilter(pUnk: any): void; - /** @param boolean [fDeep=false] */ + /** @param fDeep [fDeep=false] */ removeNode(fDeep?: boolean): IHTMLDOMNode; replaceAdjacentText(where: string, newText: string): string; replaceChild(newChild: IHTMLDOMNode, oldChild: IHTMLDOMNode): IHTMLDOMNode; @@ -33934,16 +33882,16 @@ declare namespace MSHTML { readonly scrollWidth: number; setActive(): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; setAttributeNode(pattr: IHTMLDOMAttribute): IHTMLDOMAttribute; setAttributeNodeNS(pattr: IHTMLDOMAttribute2): IHTMLDOMAttribute2; setAttributeNS(pvarNS: any, strAttributeName: string, pvarAttributeValue: any): void; - /** @param boolean [containerCapture=true] */ + /** @param containerCapture [containerCapture=true] */ setCapture(containerCapture?: boolean): void; - /** @param string [language=''] */ + /** @param language [language=''] */ setExpression(propname: string, expression: string, language?: string): void; readonly sourceIndex: number; spellcheck: any; @@ -33961,6 +33909,7 @@ declare namespace MSHTML { readonly uniqueNumber: number; urns(urn: any): any; xmsAcceleratorKey: string; + (name?: any, index?: any): any; } class RangeException { @@ -33981,9 +33930,7 @@ declare namespace MSHTML { propertyIsInline(name: string): boolean; } - class RulesAppliedCollection { - private 'MSHTML.RulesAppliedCollection_typekey': RulesAppliedCollection; - private constructor(); + interface RulesAppliedCollection { readonly element: IHTMLElement; item(index: number): IRulesApplied; readonly length: number; @@ -33992,6 +33939,7 @@ declare namespace MSHTML { propertyInheritedFrom(name: string): IRulesApplied; propertyInheritedTrace(name: string, index: number): IRulesApplied; propertyInheritedTraceLength(name: string): number; + (index: number): IRulesApplied; } class Scriptlet { @@ -34005,12 +33953,11 @@ declare namespace MSHTML { url: string; } - class StaticNodeList { - private 'MSHTML.StaticNodeList_typekey': StaticNodeList; - private constructor(); + interface StaticNodeList { readonly 'constructor': any; item(index: number): any; readonly length: number; + (index: number): any; } class SVGAElement { @@ -34230,7 +34177,7 @@ declare namespace MSHTML { readonly filters: IHTMLFiltersCollection; focusable: SVGAnimatedEnumeration; - /** @param number [lFlags=0] */ + /** @param lFlags [lFlags=0] */ getAttribute(strAttributeName: string, lFlags?: number): any; id: string; innerHTML: string; @@ -34274,11 +34221,11 @@ declare namespace MSHTML { readonly parentTextEdit: IHTMLElement; readonly recordNumber: any; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ removeAttribute(strAttributeName: string, lFlags?: number): boolean; scrollIntoView(varargStart?: any): void; - /** @param number [lFlags=1] */ + /** @param lFlags [lFlags=1] */ setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void; readonly sourceIndex: number; readonly style: IHTMLStyle; @@ -35487,10 +35434,9 @@ declare namespace MSHTML { readonly 'constructor': any; } - class XDomainRequestFactory { - private 'MSHTML.XDomainRequestFactory_typekey': XDomainRequestFactory; - private constructor(); + interface XDomainRequestFactory { create(): IHTMLXDomainRequest; + (): IHTMLXDomainRequest; } class XMLHttpRequestEventTarget { @@ -35510,982 +35456,120 @@ declare namespace MSHTML { interface ActiveXObject { on(obj: MSHTML.HTMLNamespace, event: 'onreadystatechange', argNames: ['pEvtObj'], handler: (this: MSHTML.HTMLNamespace, parameter: {readonly pEvtObj: MSHTML.IHTMLEventObj}) => void): void; - on( - obj: MSHTML.HTMLWindow2, event: 'onerror', argNames: ['description', 'url', 'line'], handler: ( - this: MSHTML.HTMLWindow2, parameter: {readonly description: string, readonly url: string, readonly line: number}) => void): void; - on( - obj: MSHTML.HTMLWindowProxy, event: 'onerror', argNames: ['description', 'url', 'line'], handler: ( - this: MSHTML.HTMLWindowProxy, parameter: {readonly description: string, readonly url: string, readonly line: number}) => void): void; + on(obj: MSHTML.HTMLWindow2, event: 'onerror', argNames: ['description', 'url', 'line'], handler: (this: MSHTML.HTMLWindow2, parameter: {readonly description: string, readonly url: string, readonly line: number}) => void): void; + on(obj: MSHTML.HTMLWindowProxy, event: 'onerror', argNames: ['description', 'url', 'line'], handler: (this: MSHTML.HTMLWindowProxy, parameter: {readonly description: string, readonly url: string, readonly line: number}) => void): void; on(obj: MSHTML.Scriptlet, event: 'onscriptletevent', argNames: ['name', 'eventData'], handler: (this: MSHTML.Scriptlet, parameter: {readonly name: string, readonly eventData: any}) => void): void; - on( - obj: MSHTML.HTMLAnchorElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLAnchorElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLAreaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLAreaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLAudioElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLAudioElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBaseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBaseElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBaseFontElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBaseFontElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBGsound, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBGsound, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBlockElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBlockElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBody, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLBody, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLBRElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLBRElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLButtonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLButtonElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLCanvasElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLCanvasElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLCommentElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLCommentElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDDElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLDDElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDivElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLDivElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDivPosition, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLDivPosition, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLDListElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDocument, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforeupdate' | - 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | - 'ondragstart' | 'onerrorupdate' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onpropertychange' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | - 'onselectionchange' | 'onselectstart' | 'onstop', - handler: (this: MSHTML.HTMLDocument, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLDTElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLDTElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLEmbed, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLEmbed, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFieldSetElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLFieldSetElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFontElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLFontElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFormElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onreset' | 'onresize' | - 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart' | 'onsubmit', - handler: (this: MSHTML.HTMLFormElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFrameBase, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLFrameBase, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFrameElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLFrameElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLFrameSetSite, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLFrameSetSite, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLGenericElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLGenericElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLHeadElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLHeadElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLHeaderElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLHeaderElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLHRElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLHRElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLHtmlElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLHtmlElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLIFrame, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLIFrame, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLImg, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLImg, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLInputButtonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLInputButtonElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLInputElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLInputElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLInputFileElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLInputFileElement, parameter: {}) => void): void; - on( - obj: MSHTML.htmlInputImage, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.htmlInputImage, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLInputTextElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLInputTextElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLIsIndexElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLIsIndexElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLLabelElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLLabelElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLLegendElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLLegendElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLLIElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLLIElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLLinkElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLLinkElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLListElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLMapElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLMapElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLMarqueeElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'onbounce' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | - 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | - 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfinish' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | - 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart' | - 'onstart', - handler: (this: MSHTML.HTMLMarqueeElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLMediaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLMediaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLMetaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLMetaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLNextIdElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLNextIdElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLNoShowElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLNoShowElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLObjectElement, event: 'onafterupdate' | 'onbeforeupdate' | 'oncellchange' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | - 'onerror' | 'onerrorupdate' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted', - handler: (this: MSHTML.HTMLObjectElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLOListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLOListElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLOptionButtonElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | - 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | - 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | - 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | - 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | - 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | - 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | - 'onselectstart', - handler: (this: MSHTML.HTMLOptionButtonElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLOptionElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLOptionElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLParaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLParaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLParamElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLParamElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLPhraseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLPhraseElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLProgressElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLProgressElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLRichtextElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLRichtextElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLScriptElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | - 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | - 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLScriptElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSelectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLSelectElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSemanticElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLSemanticElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSourceElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLSourceElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSpanElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLSpanElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLSpanFlow, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: ( - this: MSHTML.HTMLSpanFlow, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLStyleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLStyleElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTable, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTable, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableCaption, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLTableCaption, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableCell, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: ( - this: MSHTML.HTMLTableCell, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableCol, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTableCol, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableRow, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTableRow, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTableSection, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTableSection, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTextAreaElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | - 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | - 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', - handler: (this: MSHTML.HTMLTextAreaElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTextElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTextElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLTitleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLTitleElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLUListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLUListElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLUnknownElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLUnknownElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLVideoElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLVideoElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLWindow2, event: 'onafterprint' | 'onbeforeprint' | 'onbeforeunload' | 'onblur' | 'onfocus' | 'onhelp' | 'onload' | 'onresize' | 'onscroll' | - 'onunload', - handler: (this: MSHTML.HTMLWindow2, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLWindowProxy, event: 'onafterprint' | 'onbeforeprint' | 'onbeforeunload' | 'onblur' | 'onfocus' | 'onhelp' | 'onload' | 'onresize' | 'onscroll' | - 'onunload', - handler: (this: MSHTML.HTMLWindowProxy, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLWndOptionElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLWndOptionElement, parameter: {}) => void): void; - on( - obj: MSHTML.HTMLWndSelectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | - 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.HTMLWndSelectElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLAnchorElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLAnchorElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLAreaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLAreaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLAudioElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLAudioElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBaseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBaseElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBaseFontElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBaseFontElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBGsound, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBGsound, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBlockElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBlockElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBody, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLBody, parameter: {}) => void): void; + on(obj: MSHTML.HTMLBRElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLBRElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLButtonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLButtonElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLCanvasElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLCanvasElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLCommentElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLCommentElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDDElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLDDElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDivElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLDivElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDivPosition, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLDivPosition, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLDListElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDocument, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforeupdate' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondragstart' | 'onerrorupdate' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onpropertychange' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onselectionchange' | 'onselectstart' | 'onstop', handler: (this: MSHTML.HTMLDocument, parameter: {}) => void): void; + on(obj: MSHTML.HTMLDTElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLDTElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLEmbed, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLEmbed, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFieldSetElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLFieldSetElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFontElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLFontElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFormElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onreset' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart' | 'onsubmit', handler: (this: MSHTML.HTMLFormElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFrameBase, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLFrameBase, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFrameElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLFrameElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLFrameSetSite, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLFrameSetSite, parameter: {}) => void): void; + on(obj: MSHTML.HTMLGenericElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLGenericElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLHeadElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLHeadElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLHeaderElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLHeaderElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLHRElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLHRElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLHtmlElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLHtmlElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLIFrame, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLIFrame, parameter: {}) => void): void; + on(obj: MSHTML.HTMLImg, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLImg, parameter: {}) => void): void; + on(obj: MSHTML.HTMLInputButtonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLInputButtonElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLInputElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLInputElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLInputFileElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLInputFileElement, parameter: {}) => void): void; + on(obj: MSHTML.htmlInputImage, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.htmlInputImage, parameter: {}) => void): void; + on(obj: MSHTML.HTMLInputTextElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLInputTextElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLIsIndexElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLIsIndexElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLLabelElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLLabelElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLLegendElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLLegendElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLLIElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLLIElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLLinkElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLLinkElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLListElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLMapElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLMapElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLMarqueeElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'onbounce' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfinish' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart' | 'onstart', handler: (this: MSHTML.HTMLMarqueeElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLMediaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLMediaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLMetaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLMetaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLNextIdElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLNextIdElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLNoShowElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLNoShowElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLObjectElement, event: 'onafterupdate' | 'onbeforeupdate' | 'oncellchange' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'onerror' | 'onerrorupdate' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted', handler: (this: MSHTML.HTMLObjectElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLOListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLOListElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLOptionButtonElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLOptionButtonElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLOptionElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLOptionElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLParaElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLParaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLParamElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLParamElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLPhraseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLPhraseElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLProgressElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLProgressElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLRichtextElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLRichtextElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLScriptElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLScriptElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSelectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLSelectElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSemanticElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLSemanticElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSourceElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLSourceElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSpanElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLSpanElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLSpanFlow, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLSpanFlow, parameter: {}) => void): void; + on(obj: MSHTML.HTMLStyleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLStyleElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTable, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTable, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableCaption, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLTableCaption, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableCell, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLTableCell, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableCol, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTableCol, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableRow, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTableRow, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTableSection, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTableSection, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTextAreaElement, event: 'onabort' | 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerror' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onload' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselect' | 'onselectstart', handler: (this: MSHTML.HTMLTextAreaElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTextElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTextElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLTitleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLTitleElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLUListElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLUListElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLUnknownElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLUnknownElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLVideoElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLVideoElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLWindow2, event: 'onafterprint' | 'onbeforeprint' | 'onbeforeunload' | 'onblur' | 'onfocus' | 'onhelp' | 'onload' | 'onresize' | 'onscroll' | 'onunload', handler: (this: MSHTML.HTMLWindow2, parameter: {}) => void): void; + on(obj: MSHTML.HTMLWindowProxy, event: 'onafterprint' | 'onbeforeprint' | 'onbeforeunload' | 'onblur' | 'onfocus' | 'onhelp' | 'onload' | 'onresize' | 'onscroll' | 'onunload', handler: (this: MSHTML.HTMLWindowProxy, parameter: {}) => void): void; + on(obj: MSHTML.HTMLWndOptionElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLWndOptionElement, parameter: {}) => void): void; + on(obj: MSHTML.HTMLWndSelectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.HTMLWndSelectElement, parameter: {}) => void): void; on(obj: MSHTML.HTMLXMLHttpRequest, event: 'onreadystatechange' | 'ontimeout', handler: (this: MSHTML.HTMLXMLHttpRequest, parameter: {}) => void): void; - on( - obj: MSHTML.OldHTMLDocument, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforeupdate' | - 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | - 'ondragstart' | 'onerrorupdate' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseout' | - 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onpropertychange' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | - 'onselectionchange' | 'onselectstart' | 'onstop', - handler: (this: MSHTML.OldHTMLDocument, parameter: {}) => void): void; - on( - obj: MSHTML.OldHTMLFormElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onreset' | 'onresize' | - 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart' | 'onsubmit', - handler: (this: MSHTML.OldHTMLFormElement, parameter: {}) => void): void; - on( - obj: MSHTML.Scriptlet, event: 'onclick' | 'ondblclick' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseup' | - 'onreadystatechange', - handler: (this: MSHTML.Scriptlet, parameter: {}) => void): void; - on( - obj: MSHTML.SVGAElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGAElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGCircleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGCircleElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGClipPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGClipPathElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGDefsElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGDefsElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGEllipseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGEllipseElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | - 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | - 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | - 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | - 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | - 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | - 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGGElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGGradientElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGGradientElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGImageElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGImageElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGLineElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGLineElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGMarkerElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGMarkerElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGMaskElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGMaskElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGPathElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGPatternElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGPatternElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGPolygonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGPolygonElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGPolylineElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGPolylineElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGRectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGRectElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGScriptElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGScriptElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGStopElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGStopElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGSVGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGSVGElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGSymbolElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGSymbolElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGTextElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGTextElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGTextPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGTextPathElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGTSpanElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGTSpanElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGUseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGUseElement, parameter: {}) => void): void; - on( - obj: MSHTML.SVGViewElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | - 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | - 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | - 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | - 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | - 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | - 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', - handler: (this: MSHTML.SVGViewElement, parameter: {}) => void): void; + on(obj: MSHTML.OldHTMLDocument, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforeupdate' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondragstart' | 'onerrorupdate' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onpropertychange' | 'onreadystatechange' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onselectionchange' | 'onselectstart' | 'onstop', handler: (this: MSHTML.OldHTMLDocument, parameter: {}) => void): void; + on(obj: MSHTML.OldHTMLFormElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onreset' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart' | 'onsubmit', handler: (this: MSHTML.OldHTMLFormElement, parameter: {}) => void): void; + on(obj: MSHTML.Scriptlet, event: 'onclick' | 'ondblclick' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onmousedown' | 'onmousemove' | 'onmouseup' | 'onreadystatechange', handler: (this: MSHTML.Scriptlet, parameter: {}) => void): void; + on(obj: MSHTML.SVGAElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGAElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGCircleElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGCircleElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGClipPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGClipPathElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGDefsElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGDefsElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGEllipseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGEllipseElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGGElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGGradientElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGGradientElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGImageElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGImageElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGLineElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGLineElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGMarkerElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGMarkerElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGMaskElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGMaskElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGPathElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGPatternElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGPatternElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGPolygonElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGPolygonElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGPolylineElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGPolylineElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGRectElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGRectElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGScriptElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGScriptElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGStopElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGStopElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGSVGElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGSVGElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGSymbolElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGSymbolElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGTextElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGTextElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGTextPathElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGTextPathElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGTSpanElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGTSpanElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGUseElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGUseElement, parameter: {}) => void): void; + on(obj: MSHTML.SVGViewElement, event: 'onactivate' | 'onafterupdate' | 'onbeforeactivate' | 'onbeforecopy' | 'onbeforecut' | 'onbeforedeactivate' | 'onbeforeeditfocus' | 'onbeforepaste' | 'onbeforeupdate' | 'onblur' | 'oncellchange' | 'onclick' | 'oncontextmenu' | 'oncontrolselect' | 'oncopy' | 'oncut' | 'ondataavailable' | 'ondatasetchanged' | 'ondatasetcomplete' | 'ondblclick' | 'ondeactivate' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'onerrorupdate' | 'onfilterchange' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onhelp' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onlayoutcomplete' | 'onlosecapture' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onmousewheel' | 'onmove' | 'onmoveend' | 'onmovestart' | 'onpage' | 'onpaste' | 'onpropertychange' | 'onreadystatechange' | 'onresize' | 'onresizeend' | 'onresizestart' | 'onrowenter' | 'onrowexit' | 'onrowsdelete' | 'onrowsinserted' | 'onscroll' | 'onselectstart', handler: (this: MSHTML.SVGViewElement, parameter: {}) => void): void; new(progid: K): ActiveXObjectNameMap[K]; } @@ -36494,7 +35578,3 @@ interface ActiveXObjectNameMap { 'ScriptBridge.ScriptBridge': MSHTML.Scriptlet; 'TemplatePrinter.TemplatePrinter': MSHTML.CTemplatePrinter; } - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-mshtml/tslint.json b/types/activex-mshtml/tslint.json index 3224b40b8b..916af93888 100644 --- a/types/activex-mshtml/tslint.json +++ b/types/activex-mshtml/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-msxml2/activex-msxml2-tests.ts b/types/activex-msxml2/activex-msxml2-tests.ts index a793c08db5..470f35d785 100644 --- a/types/activex-msxml2/activex-msxml2-tests.ts +++ b/types/activex-msxml2/activex-msxml2-tests.ts @@ -1,18 +1,18 @@ // https://msdn.microsoft.com/en-us/library/ms764708(v=vs.85).aspx -(() => { +{ const dom = new ActiveXObject('Msxml2.DOMDocument.6.0'); dom.async = false; dom.resolveExternals = false; dom.loadXML('A'); WScript.Echo(`dom: ${dom.xml}`); -})(); +} // https://msdn.microsoft.com/en-us/library/ms766390(v=vs.85).aspx -(() => { +{ const doc = new ActiveXObject('Msxml2.DOMDocument.6.0'); doc.load('test.xml'); WScript.Echo(`doc: ${doc.xml}`); -})(); +} const MakeDOM = () => { try { @@ -37,7 +37,7 @@ const LoadDOM = (file: string) => { }; // https://msdn.microsoft.com/en-us/library/ms759105(v=vs.85).aspx -(() => { +{ const doc = new ActiveXObject('Msxml2.DOMDocument.6.0'); doc.async = false; doc.resolveExternals = false; @@ -60,10 +60,10 @@ const LoadDOM = (file: string) => { `; doc.loadXML(xml); doc.save('saved.xml'); -})(); +} // https://msdn.microsoft.com/en-us/library/ms764656(v=vs.85).aspx -(() => { +{ const doc = LoadDOM('test.xml')!; const xsl = (LoadDOM('test.xsl')! as any) as MSXML2.IXMLDOMNode; @@ -73,10 +73,10 @@ const LoadDOM = (file: string) => { const out = MakeDOM()!; doc.transformNodeToObject(xsl, out); WScript.Echo('\ndoc.transformNodeToObject:\n' + out.xml); -})(); +} // https://msdn.microsoft.com/en-us/library/ms763685(v=vs.85).aspx -(() => { +{ const dom = MakeDOM()!; // Create a processing instruction targeted for xml. @@ -148,10 +148,10 @@ const LoadDOM = (file: string) => { // Save the XML document to a file. dom.save("dynamDom.xml"); -})(); +} // https://msdn.microsoft.com/en-us/library/ms757050(v=vs.85).aspx -(() => { +{ const dom = LoadDOM("stocks.xml")!; try { // Query a single node. @@ -172,17 +172,17 @@ const LoadDOM = (file: string) => { } catch (e) { WScript.Echo(e.description); } -})(); +} // https://msdn.microsoft.com/en-us/library/ms757064(v=vs.85).aspx -(() => { +{ const xhr = new ActiveXObject("Msxml2.XMLHTTP.6.0"); xhr.open("GET", "http://localhost/sxh/contact.asp?SearchID=John Doe", false); xhr.send(); const doc = xhr.responseXML; WScript.Echo(doc.xml); -})(); +} const xmlValidation = (fn: (x: MSXML2.DOMDocument60) => void) => { // Create and initialize the DOMDocument object @@ -212,16 +212,16 @@ ${x.xml} }; // https://msdn.microsoft.com/en-us/library/ms766449(v=vs.85).aspx -(() => { +{ const validateFile = (filename: string) => xmlValidation(x => x.load(filename)); let sOutput = validateFile("nn-valid.xml"); sOutput = sOutput + validateFile("nn-notValid.xml"); WScript.Echo(sOutput); -})(); +} // https://msdn.microsoft.com/en-us/library/ms767542(v=vs.85).aspx -(() => { +{ const validateFile = (filename: string) => xmlValidation(x => { // Configure DOM properties for namespace selection. x.setProperty("SelectionLanguage", "XPath"); @@ -235,10 +235,10 @@ ${x.xml} let sOutput = validateFile("sl-valid.xml"); sOutput = sOutput + validateFile("sl-notValid.xml"); WScript.Echo(sOutput); -})(); +} // https://msdn.microsoft.com/en-us/library/ms766439(v=vs.85).aspx -(() => { +{ const validateFile = (filename: string) => xmlValidation(xd => { // Create a schema cache and add books.xsd to it. const xs = new ActiveXObject('Msxml2.XMLSchemaCache'); @@ -253,10 +253,10 @@ ${x.xml} let sOutput = validateFile("sc-valid.xml"); sOutput = sOutput + validateFile("sc-notValid.xml"); WScript.Echo(sOutput); -})(); +} // https://msdn.microsoft.com/en-us/library/ms767636(v=vs.85).aspx -(() => { +{ const validateFile = (filename: string) => xmlValidation(x => { x.setProperty("UseInlineSchema", true); x.load(filename); @@ -265,10 +265,10 @@ ${x.xml} let sOutput = validateFile("valid.xml"); sOutput = sOutput + validateFile("notValid.xml"); WScript.Echo(sOutput); -})(); +} // https://msdn.microsoft.com/en-us/library/ms757833(v=vs.85).aspx -(() => { +{ // Load an XML document into a DOM instance. const oXMLDoc = LoadDOM("books.xml")!; @@ -326,4 +326,4 @@ ${oError.reason}`; } WScript.Echo(msg); } -})(); +} diff --git a/types/activex-msxml2/index.d.ts b/types/activex-msxml2/index.d.ts index 76dc3d9415..6f43ba02c5 100644 --- a/types/activex-msxml2/index.d.ts +++ b/types/activex-msxml2/index.d.ts @@ -424,7 +424,7 @@ declare namespace MSXML2 { createEntityReference(name: string): IXMLDOMEntityReference; /** create a node of the specified node type and name */ - createNode(type: any, name: string, namespaceURI: string): IXMLDOMNode; + createNode(type: DOMNodeType.NODE_ATTRIBUTE | DOMNodeType.NODE_CDATA_SECTION | DOMNodeType.NODE_COMMENT | DOMNodeType.NODE_DOCUMENT_FRAGMENT | DOMNodeType.NODE_TEXT | DOMNodeType.NODE_ELEMENT | DOMNodeType.NODE_ENTITY_REFERENCE | DOMNodeType.NODE_PROCESSING_INSTRUCTION, name: string, namespaceURI: string): IXMLDOMNode; /** create a processing instruction node */ createProcessingInstruction(target: string, data: string): IXMLDOMProcessingInstruction; @@ -433,7 +433,7 @@ declare namespace MSXML2 { createTextNode(data: string): IXMLDOMText; /** the data type of the node */ - dataType: any; + dataType: string | null; /** pointer to the definition of the node in the DTD or schema */ readonly definition: IXMLDOMNode; @@ -497,7 +497,7 @@ declare namespace MSXML2 { readonly nodeTypeString: string; /** value stored in the node */ - nodeValue: any; + nodeValue: string | null; /** register an ondataavailable event handler */ readonly ondataavailable: any; @@ -795,8 +795,7 @@ declare namespace MSXML2 { getAllResponseHeaders(ppwszHeaders: string): void; GetCookie(pwszUrl: string, pwszName: string, dwFlags: number, pcCookies: number, ppCookies: tagXHR_COOKIE): void; getResponseHeader(pwszHeader: string, ppwszValue: string): void; - open( - pwszMethod: string, pwszUrl: string, pStatusCallback: IXMLHTTPRequest2Callback, pwszUserName: string, pwszPassword: string, pwszProxyUserName: string, pwszProxyPassword: string): void; + open(pwszMethod: string, pwszUrl: string, pStatusCallback: IXMLHTTPRequest2Callback, pwszUserName: string, pwszPassword: string, pwszProxyUserName: string, pwszProxyPassword: string): void; send(pBody: ISequentialStream, cbBody: number): void; SetCookie(pCookie: tagXHR_COOKIE, pdwCookieState: number): void; SetCustomResponseStream(pSequentialStream: ISequentialStream): void; @@ -805,11 +804,11 @@ declare namespace MSXML2 { } /** IMXNamespacePrefixes interface */ - class IMXNamespacePrefixes { - private 'MSXML2.IMXNamespacePrefixes_typekey': IMXNamespacePrefixes; - private constructor(); + // tslint:disable-next-line:interface-name + interface IMXNamespacePrefixes { item(index: number): string; readonly length: number; + (index: number): string; } /** XML Schema */ @@ -848,21 +847,21 @@ declare namespace MSXML2 { } /** XML Schema Item Collection */ - class ISchemaItemCollection { - private 'MSXML2.ISchemaItemCollection_typekey': ISchemaItemCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface ISchemaItemCollection { item(index: number): ISchemaItem; itemByName(name: string): ISchemaItem; itemByQName(name: string, namespaceURI: string): ISchemaItem; readonly length: number; + (index: number): ISchemaItem; } /** XML Schema String Collection */ - class ISchemaStringCollection { - private 'MSXML2.ISchemaStringCollection_typekey': ISchemaStringCollection; - private constructor(); + // tslint:disable-next-line:interface-name + interface ISchemaStringCollection { item(index: number): string; readonly length: number; + (index: number): string; } class ISequentialStream { @@ -1960,10 +1959,8 @@ declare namespace MSXML2 { hasFeature(feature: string, version: string): boolean; } - class IXMLDOMNamedNodeMap { - private 'MSXML2.IXMLDOMNamedNodeMap_typekey': IXMLDOMNamedNodeMap; - private constructor(); - + // tslint:disable-next-line:interface-name + interface IXMLDOMNamedNodeMap { /** lookup item by name */ getNamedItem(name: string): IXMLDOMNode; @@ -1990,6 +1987,9 @@ declare namespace MSXML2 { /** set item by name */ setNamedItem(newItem: IXMLDOMNode): IXMLDOMNode; + + /** collection of nodes */ + (index: number): IXMLDOMNode; } /** Core DOM node interface */ @@ -2090,10 +2090,8 @@ declare namespace MSXML2 { readonly xml: string; } - class IXMLDOMNodeList { - private 'MSXML2.IXMLDOMNodeList_typekey': IXMLDOMNodeList; - private constructor(); - + // tslint:disable-next-line:interface-name + interface IXMLDOMNodeList { /** collection of nodes */ item(index: number): IXMLDOMNode; @@ -2105,6 +2103,9 @@ declare namespace MSXML2 { /** reset the position of iterator */ reset(): void; + + /** collection of nodes */ + (index: number): IXMLDOMNode; } /** structure for reporting parser errors */ @@ -2238,10 +2239,8 @@ declare namespace MSXML2 { } /** XML Schemas Collection */ - class IXMLDOMSchemaCollection { - private 'MSXML2.IXMLDOMSchemaCollection_typekey': IXMLDOMSchemaCollection; - private constructor(); - + // tslint:disable-next-line:interface-name + interface IXMLDOMSchemaCollection { /** add a new schema */ add(namespaceURI: string, var_1: any): void; @@ -2259,6 +2258,9 @@ declare namespace MSXML2 { /** remove schema by namespaceURI */ remove(namespaceURI: string): void; + + /** Get namespaceURI for schema by index */ + (index: number): string; } class IXMLDOMText { @@ -2403,7 +2405,7 @@ declare namespace MSXML2 { /** * set values - * @param string [namespaceURI=''] + * @param namespaceURI [namespaceURI='0'] */ addParameter(baseName: string, parameter: any, namespaceURI?: string): void; @@ -2424,7 +2426,7 @@ declare namespace MSXML2 { /** * set XSL mode and it's namespace - * @param string [namespaceURI=''] + * @param namespaceURI [namespaceURI='0'] */ setStartMode(mode: string, namespaceURI?: string): void; @@ -2487,7 +2489,7 @@ declare namespace MSXML2 { popContext(): void; pushContext(): void; - /** @param boolean [fDeep=true] */ + /** @param fDeep [fDeep=true] */ pushNodeContext(contextNode: IXMLDOMNode, fDeep?: boolean): void; reset(): void; } @@ -2730,10 +2732,7 @@ declare namespace MSXML2 { } /** XML Schema Cache 6.0 */ - class XMLSchemaCache60 { - private 'MSXML2.XMLSchemaCache60_typekey': XMLSchemaCache60; - private constructor(); - + interface XMLSchemaCache60 { /** add a new schema */ add(namespaceURI: string, var_1: any): void; @@ -2755,6 +2754,9 @@ declare namespace MSXML2 { remove(namespaceURI: string): void; validate(): void; validateOnLoad: boolean; + + /** Get namespaceURI for schema by index */ + (index: number): string; } /** XSL Stylesheet Cache 6.0 */ @@ -2787,12 +2789,6 @@ interface ActiveXObjectNameMap { 'Msxml2.SAXXMLReader': MSXML2.SAXXMLReader60; 'Msxml2.ServerXMLHTTP': MSXML2.ServerXMLHTTP60; 'Msxml2.XMLHTTP': MSXML2.XMLHTTP60; - 'Msxml2.XMLHTTP.6.0': MSXML2.XMLHTTP60; 'Msxml2.XMLSchemaCache': MSXML2.XMLSchemaCache60; - 'Msxml2.XMLSchemaCache.6.0': MSXML2.XMLSchemaCache60; 'Msxml2.XSLTemplate': MSXML2.XSLTemplate60; } - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-msxml2/tslint.json b/types/activex-msxml2/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-msxml2/tslint.json +++ b/types/activex-msxml2/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-office/activex-office-tests.ts b/types/activex-office/activex-office-tests.ts index 69a0563640..7aab0b4521 100644 --- a/types/activex-office/activex-office-tests.ts +++ b/types/activex-office/activex-office-tests.ts @@ -1,19 +1,26 @@ /// +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + let app = new ActiveXObject('Word.Application'); +app.Visible = true; let dlg = app.FileDialog(Office.MsoFileDialogType.msoFileDialogFolderPicker); dlg.AllowMultiSelect = true; dlg.Title = 'Select one or more folders'; dlg.Execute(); -let enumerator = new Enumerator(dlg.SelectedItems); -enumerator.moveFirst(); -while (!enumerator.atEnd()) { - WScript.Echo(enumerator.item); +for (const item of collectionToArray(dlg.SelectedItems)) { + WScript.Echo(item); } -let enumerator2 = new Enumerator(app.COMAddIns); -enumerator2.moveFirst(); -while (!enumerator2.atEnd()) { - const item = enumerator2.item(); +for (const item of collectionToArray(app.COMAddIns)) { WScript.Echo(`COM Addin: ${item.Description} -- ${item.ProgId}`); } diff --git a/types/activex-office/index.d.ts b/types/activex-office/index.d.ts index 20351b91f9..18a7dd285d 100644 --- a/types/activex-office/index.d.ts +++ b/types/activex-office/index.d.ts @@ -1,10 +1,11 @@ -// Type definitions for Microsoft Office 14.0 Object Library - Office 14.0 +// Type definitions for Microsoft Office 16.0 Object Library - Office 16.0 // Project: https://msdn.microsoft.com/VBA/Office-Shared-VBA/articles/office-vba-object-library-reference // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// +/// declare namespace Office { type MsoRGBType = number; @@ -524,6 +525,18 @@ declare namespace Office { msoblogImageTypePNG = 3, } + const enum MsoBroadcastCapabilities { + BroadcastCapFileSizeLimited = 1, + BroadcastCapSupportsMeetingNotes = 2, + BroadcastCapSupportsUpdateDoc = 4, + } + + const enum MsoBroadcastState { + BroadcastPaused = 2, + BroadcastStarted = 1, + NoBroadcast = 0, + } + const enum MsoBulletType { msoBulletMixed = -2, msoBulletNone = 0, @@ -622,6 +635,7 @@ declare namespace Office { msoElementChartWallShow = 1101, msoElementDataLabelBestFit = 210, msoElementDataLabelBottom = 209, + msoElementDataLabelCallout = 211, msoElementDataLabelCenter = 202, msoElementDataLabelInsideBase = 204, msoElementDataLabelInsideEnd = 203, @@ -741,6 +755,16 @@ declare namespace Office { msoElementUpDownBarsShow = 901, } + const enum MsoChartFieldType { + msoChartFieldBubbleSize = 1, + msoChartFieldCategoryName = 2, + msoChartFieldFormula = 6, + msoChartFieldPercentage = 3, + msoChartFieldRange = 7, + msoChartFieldSeriesName = 4, + msoChartFieldValue = 5, + } + const enum MsoClipboardFormat { msoClipboardFormatHTML = 2, msoClipboardFormatMixed = -2, @@ -1625,6 +1649,13 @@ declare namespace Office { msoLightRigTwoPoint = 25, } + const enum MsoLineCapStyle { + msoLineCapFlat = 3, + msoLineCapMixed = -2, + msoLineCapRound = 2, + msoLineCapSquare = 1, + } + const enum MsoLineDashStyle { msoLineDash = 4, msoLineDashDot = 5, @@ -1641,6 +1672,24 @@ declare namespace Office { msoLineSysDot = 11, } + const enum MsoLineFillType { + msoLineFillBackground = 5, + msoLineFillGradient = 3, + msoLineFillMixed = -2, + msoLineFillNone = 0, + msoLineFillPatterned = 2, + msoLineFillPicture = 6, + msoLineFillSolid = 1, + msoLineFillTextured = 4, + } + + const enum MsoLineJoinStyle { + msoLineJoinBevel = 2, + msoLineJoinMiter = 3, + msoLineJoinMixed = -2, + msoLineJoinRound = 1, + } + const enum MsoLineStyle { msoLineSingle = 1, msoLineStyleMixed = -2, @@ -1657,6 +1706,14 @@ declare namespace Office { msoMenuAnimationUnfold = 2, } + const enum MsoMergeCmd { + msoMergeCombine = 2, + msoMergeFragment = 5, + msoMergeIntersect = 3, + msoMergeSubtract = 4, + msoMergeUnion = 1, + } + const enum MsoMetaPropertyType { msoMetaPropertyTypeBoolean = 1, msoMetaPropertyTypeBusinessData = 20, @@ -1884,6 +1941,12 @@ declare namespace Office { msoPictureWatermark = 4, } + const enum MsoPictureCompress { + msoPictureCompressDocDefault = -1, + msoPictureCompressFalse = 0, + msoPictureCompressTrue = 1, + } + const enum MsoPictureEffectType { msoEffectBackgroundRemoval = 1, msoEffectBlur = 2, @@ -2086,8 +2149,28 @@ declare namespace Office { msoTextEffect29 = 28, msoTextEffect3 = 2, msoTextEffect30 = 29, + msoTextEffect31 = 30, + msoTextEffect32 = 31, + msoTextEffect33 = 32, + msoTextEffect34 = 33, + msoTextEffect35 = 34, + msoTextEffect36 = 35, + msoTextEffect37 = 36, + msoTextEffect38 = 37, + msoTextEffect39 = 38, msoTextEffect4 = 3, + msoTextEffect40 = 39, + msoTextEffect41 = 40, + msoTextEffect42 = 41, + msoTextEffect43 = 42, + msoTextEffect44 = 43, + msoTextEffect45 = 44, + msoTextEffect46 = 45, + msoTextEffect47 = 46, + msoTextEffect48 = 47, + msoTextEffect49 = 48, msoTextEffect5 = 4, + msoTextEffect50 = 49, msoTextEffect6 = 5, msoTextEffect7 = 6, msoTextEffect8 = 7, @@ -2324,8 +2407,29 @@ declare namespace Office { msoLineStylePreset2 = 10002, msoLineStylePreset20 = 10020, msoLineStylePreset21 = 10021, + msoLineStylePreset22 = 10022, + msoLineStylePreset23 = 10023, + msoLineStylePreset24 = 10024, + msoLineStylePreset25 = 10025, + msoLineStylePreset26 = 10026, + msoLineStylePreset27 = 10027, + msoLineStylePreset28 = 10028, + msoLineStylePreset29 = 10029, msoLineStylePreset3 = 10003, + msoLineStylePreset30 = 10030, + msoLineStylePreset31 = 10031, + msoLineStylePreset32 = 10032, + msoLineStylePreset33 = 10033, + msoLineStylePreset34 = 10034, + msoLineStylePreset35 = 10035, + msoLineStylePreset36 = 10036, + msoLineStylePreset37 = 10037, + msoLineStylePreset38 = 10038, + msoLineStylePreset39 = 10039, msoLineStylePreset4 = 10004, + msoLineStylePreset40 = 10040, + msoLineStylePreset41 = 10041, + msoLineStylePreset42 = 10042, msoLineStylePreset5 = 10005, msoLineStylePreset6 = 10006, msoLineStylePreset7 = 10007, @@ -2370,9 +2474,44 @@ declare namespace Office { msoShapeStylePreset40 = 40, msoShapeStylePreset41 = 41, msoShapeStylePreset42 = 42, + msoShapeStylePreset43 = 43, + msoShapeStylePreset44 = 44, + msoShapeStylePreset45 = 45, + msoShapeStylePreset46 = 46, + msoShapeStylePreset47 = 47, + msoShapeStylePreset48 = 48, + msoShapeStylePreset49 = 49, msoShapeStylePreset5 = 5, + msoShapeStylePreset50 = 50, + msoShapeStylePreset51 = 51, + msoShapeStylePreset52 = 52, + msoShapeStylePreset53 = 53, + msoShapeStylePreset54 = 54, + msoShapeStylePreset55 = 55, + msoShapeStylePreset56 = 56, + msoShapeStylePreset57 = 57, + msoShapeStylePreset58 = 58, + msoShapeStylePreset59 = 59, msoShapeStylePreset6 = 6, + msoShapeStylePreset60 = 60, + msoShapeStylePreset61 = 61, + msoShapeStylePreset62 = 62, + msoShapeStylePreset63 = 63, + msoShapeStylePreset64 = 64, + msoShapeStylePreset65 = 65, + msoShapeStylePreset66 = 66, + msoShapeStylePreset67 = 67, + msoShapeStylePreset68 = 68, + msoShapeStylePreset69 = 69, msoShapeStylePreset7 = 7, + msoShapeStylePreset70 = 70, + msoShapeStylePreset71 = 71, + msoShapeStylePreset72 = 72, + msoShapeStylePreset73 = 73, + msoShapeStylePreset74 = 74, + msoShapeStylePreset75 = 75, + msoShapeStylePreset76 = 76, + msoShapeStylePreset77 = 77, msoShapeStylePreset8 = 8, msoShapeStylePreset9 = 9, } @@ -2383,6 +2522,7 @@ declare namespace Office { msoCanvas = 20, msoChart = 3, msoComment = 4, + msoContentApp = 27, msoDiagram = 21, msoEmbeddedOLEObject = 7, msoFormControl = 8, @@ -2404,6 +2544,7 @@ declare namespace Office { msoTable = 19, msoTextBox = 17, msoTextEffect = 15, + msoWebVideo = 26, } const enum MsoSharedWorkspaceTaskPriority { @@ -2858,6 +2999,14 @@ declare namespace Office { xlPyramidToPoint = 1, } + const enum XlBinsType { + xlBinsTypeAutomatic = 0, + xlBinsTypeBinCount = 4, + xlBinsTypeBinSize = 3, + xlBinsTypeCategorical = 1, + xlBinsTypeManual = 2, + } + const enum XlBorderWeight { xlHairline = 1, xlMedium = -4138, @@ -2865,6 +3014,12 @@ declare namespace Office { xlThin = 2, } + const enum XlCategoryLabelLevel { + xlCategoryLabelLevelAll = -1, + xlCategoryLabelLevelCustom = -2, + xlCategoryLabelLevelNone = -3, + } + const enum XlCategoryType { xlAutomaticScale = -4105, xlCategoryScale = 2, @@ -2897,7 +3052,9 @@ declare namespace Office { xlMajorGridlines = 15, xlMinorGridlines = 16, xlNothing = 28, + xlPivotChartCollapseEntireFieldButton = 34, xlPivotChartDropZone = 32, + xlPivotChartExpandEntireFieldButton = 33, xlPivotChartFieldButton = 31, xlPlotArea = 19, xlRadarAxisLabels = 27, @@ -2952,11 +3109,16 @@ declare namespace Office { xlBarOfPie = 71, xlBarStacked = 58, xlBarStacked100 = 59, + xlBoxwhisker = 121, xlBubble = 15, xlBubble3DEffect = 87, xlColumnClustered = 51, xlColumnStacked = 52, xlColumnStacked100 = 53, + xlCombo = -4152, + xlComboAreaStackedColumnClustered = 115, + xlComboColumnClusteredLine = 113, + xlComboColumnClusteredLineSecondaryAxis = 114, xlConeBarClustered = 102, xlConeBarStacked = 103, xlConeBarStacked100 = 104, @@ -2973,12 +3135,15 @@ declare namespace Office { xlCylinderColStacked100 = 94, xlDoughnut = -4120, xlDoughnutExploded = 80, + xlHistogram = 118, xlLine = 4, xlLineMarkers = 65, xlLineMarkersStacked = 66, xlLineMarkersStacked100 = 67, xlLineStacked = 63, xlLineStacked100 = 64, + xlOtherCombinations = 116, + xlPareto = 122, xlPie = 5, xlPieExploded = 69, xlPieOfPie = 68, @@ -2996,10 +3161,14 @@ declare namespace Office { xlStockOHLC = 89, xlStockVHLC = 90, xlStockVOHLC = 91, + xlSuggestedChart = -2, + xlSunburst = 120, xlSurface = 83, xlSurfaceTopView = 85, xlSurfaceTopViewWireframe = 86, xlSurfaceWireframe = 84, + xlTreemap = 117, + xlWaterfall = 119, xlXYScatter = -4169, xlXYScatterLines = 74, xlXYScatterLinesNoMarkers = 75, @@ -3181,6 +3350,12 @@ declare namespace Office { xlMarkerStyleX = -4168, } + const enum XlParentDataLabelOptions { + xlParentDataLabelOptionsBanner = 1, + xlParentDataLabelOptionsNone = 0, + xlParentDataLabelOptionsOverlapping = 2, + } + const enum XlPieSliceIndex { xlCenterPoint = 5, xlInnerCenterPoint = 8, @@ -3222,6 +3397,12 @@ declare namespace Office { xlScaleLogarithmic = -4133, } + const enum XlSeriesNameLevel { + xlSeriesNameLevelAll = -1, + xlSeriesNameLevelCustom = -2, + xlSeriesNameLevelNone = -3, + } + const enum XlSizeRepresents { xlSizeIsArea = 1, xlSizeIsWidth = 2, @@ -3280,14 +3461,13 @@ declare namespace Office { xlVAlignTop = -4160, } - class Adjustments { - private 'Office.Adjustments_typekey': Adjustments; - private constructor(); + interface Adjustments { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): number; readonly Parent: any; + (Index: number): number; } class AnswerWizard { @@ -3301,9 +3481,7 @@ declare namespace Office { ResetFileList(): void; } - class AnswerWizardFiles { - private 'Office.AnswerWizardFiles_typekey': AnswerWizardFiles; - private constructor(); + interface AnswerWizardFiles { Add(FileName: string): void; readonly Application: any; readonly Count: number; @@ -3311,12 +3489,13 @@ declare namespace Office { Delete(FileName: string): void; Item(Index: number): string; readonly Parent: any; + (Index: number): string; } class Assistant { private 'Office.Assistant_typekey': Assistant; private constructor(); - ActivateWizard(WizardID: number, act: MsoWizardActType, Animation?: any): void; + ActivateWizard(WizardID: number, act: MsoWizardActType, Animation?: MsoAnimationType): void; Animation: MsoAnimationType; readonly Application: any; AssistWithAlerts: boolean; @@ -3325,7 +3504,7 @@ declare namespace Office { readonly BalloonError: MsoBalloonErrorType; readonly Creator: number; DoAlert(bstrAlertTitle: string, bstrAlertText: string, alb: MsoAlertButtonType, alc: MsoAlertIconType, ald: MsoAlertDefaultType, alq: MsoAlertCancelType, varfSysAlert: boolean): number; - EndWizard(WizardID: number, varfSuccess: boolean, Animation?: any): void; + EndWizard(WizardID: number, varfSuccess: boolean, Animation?: MsoAnimationType): void; FeatureTips: boolean; FileName: string; GuessHelp: boolean; @@ -3345,7 +3524,7 @@ declare namespace Office { ResetTips(): void; SearchWhenProgramming: boolean; Sounds: boolean; - StartWizard(On: boolean, Callback: string, PrivateX: number, Animation?: any, CustomTeaser?: any, Top?: any, Left?: any, Bottom?: any, Right?: any): number; + StartWizard(On: boolean, Callback: string, PrivateX: number, Animation?: MsoAnimationType, CustomTeaser?: any, Top?: number, Left?: number, Bottom?: number, Right?: number): number; TipOfDay: boolean; Top: number; Visible: boolean; @@ -3359,12 +3538,12 @@ declare namespace Office { BalloonType: MsoBalloonType; Button: MsoButtonSetType; Callback: string; - readonly Checkboxes: any; + readonly Checkboxes: BalloonCheckboxes; Close(): void; readonly Creator: number; Heading: string; Icon: MsoIconType; - readonly Labels: any; + readonly Labels: BalloonLabels; Mode: MsoModeType; readonly Name: string; readonly Parent: any; @@ -3374,6 +3553,49 @@ declare namespace Office { Text: string; } + class BalloonCheckbox { + private 'Office.BalloonCheckbox_typekey': BalloonCheckbox; + private constructor(); + readonly Application: any; + Checked: boolean; + readonly Creator: number; + readonly Item: string; + readonly Name: string; + readonly Parent: any; + Text: string; + } + + interface BalloonCheckboxes { + readonly Application: any; + Count: number; + readonly Creator: number; + Item(Index: number): BalloonCheckbox; + readonly Name: string; + readonly Parent: any; + (Index: number): BalloonCheckbox; + } + + class BalloonLabel { + private constructor(); + private 'Office.BalloonLabel_typekey': BalloonLabel; + readonly Application: any; + readonly Creator: number; + readonly Item: string; + readonly Name: string; + readonly Parent: any; + Text: string; + } + + interface BalloonLabels { + readonly Application: any; + Count: number; + readonly Creator: number; + Item(Index: number): BalloonLabel; + readonly Name: string; + readonly Parent: any; + (Index: number): BalloonLabel; + } + class BulletFormat2 { private 'Office.BulletFormat2_typekey': BulletFormat2; private constructor(); @@ -3415,21 +3637,19 @@ declare namespace Office { Type: MsoCalloutType; } - class CanvasShapes { - private 'Office.CanvasShapes_typekey': CanvasShapes; - private constructor(); + interface CanvasShapes { AddCallout(Type: MsoCalloutType, Left: number, Top: number, Width: number, Height: number): Shape; AddConnector(Type: MsoConnectorType, BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; - AddCurve(SafeArrayOfPoints: any): Shape; + AddCurve(SafeArrayOfPoints: SafeArray): Shape; AddLabel(Orientation: MsoTextOrientation, Left: number, Top: number, Width: number, Height: number): Shape; AddLine(BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; /** - * @param number [Width=-1] - * @param number [Height=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] */ AddPicture(FileName: string, LinkToFile: MsoTriState, SaveWithDocument: MsoTriState, Left: number, Top: number, Width?: number, Height?: number): Shape; - AddPolyline(SafeArrayOfPoints: any): Shape; + AddPolyline(SafeArrayOfPoints: SafeArray): Shape; AddShape(Type: MsoAutoShapeType, Left: number, Top: number, Width: number, Height: number): Shape; AddTextbox(Orientation: MsoTextOrientation, Left: number, Top: number, Width: number, Height: number): Shape; AddTextEffect(PresetTextEffect: MsoPresetTextEffect, Text: string, FontName: string, FontSize: number, FontBold: MsoTriState, FontItalic: MsoTriState, Left: number, Top: number): Shape; @@ -3438,10 +3658,11 @@ declare namespace Office { BuildFreeform(EditingType: MsoEditingType, X1: number, Y1: number): FreeformBuilder; readonly Count: number; readonly Creator: number; - Item(Index: any): Shape; + Item(Index: number | string): Shape; readonly Parent: any; Range(Index: any): ShapeRange; SelectAll(): void; + (Index: number | string): Shape; } class ChartColorFormat { @@ -3480,7 +3701,7 @@ declare namespace Office { readonly TextureType: number; TwoColorGradient(Style: number, Variant: number): void; readonly Type: number; - UserPicture(PictureFile: any, PictureFormat: any, PictureStackUnit: any, PicturePlacement: any): void; + UserPicture(PictureFile: string, PictureFormat: any, PictureStackUnit: any, PicturePlacement: any): void; UserTextured(TextureFile: string): void; Visible: number; } @@ -3534,16 +3755,15 @@ declare namespace Office { readonly ProgId: string; } - class COMAddIns { - private 'Office.COMAddIns_typekey': COMAddIns; - private constructor(); + interface COMAddIns { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): COMAddIn; + Item(Index: number | string): COMAddIn; readonly Parent: any; SetAppModal(varfModal: boolean): void; Update(): void; + (Index: number | string): COMAddIn; } class CommandBar { @@ -3576,7 +3796,7 @@ declare namespace Office { readonly Creator: number; Delete(): void; Enabled: boolean; - FindControl(Type?: any, Id?: any, Tag?: any, Visible?: any, Recursive?: any): CommandBarControl; + FindControl(Type?: any, Id?: any, Tag?: any, Visible?: boolean, Recursive?: boolean): CommandBarControl; Height: number; readonly Id: number; readonly Index: number; @@ -3590,7 +3810,7 @@ declare namespace Office { Protection: MsoBarProtection; Reset(): void; RowIndex: number; - ShowPopup(x?: any, y?: any): void; + ShowPopup(x?: number, y?: number): void; Top: number; readonly Type: MsoBarType; Visible: boolean; @@ -3625,10 +3845,10 @@ declare namespace Office { BuiltInFace: boolean; Caption: string; readonly Control: any; - Copy(Bar?: any, Before?: any): CommandBarControl; + Copy(Bar?: CommandBar, Before?: number): CommandBarControl; CopyFace(): void; readonly Creator: number; - Delete(Temporary?: any): void; + Delete(Temporary?: boolean): void; DescriptionText: string; Enabled: boolean; Execute(): void; @@ -3644,7 +3864,7 @@ declare namespace Office { readonly IsPriorityDropped: boolean; readonly Left: number; Mask: stdole.IPictureDisp; - Move(Bar?: any, Before?: any): CommandBarControl; + Move(Bar?: CommandBar, Before?: number): CommandBarControl; OLEUsage: MsoControlOLEUsage; OnAction: string; Parameter: string; @@ -3701,9 +3921,9 @@ declare namespace Office { Caption: string; Clear(): void; readonly Control: any; - Copy(Bar?: any, Before?: any): CommandBarControl; + Copy(Bar?: CommandBar, Before?: number): CommandBarControl; readonly Creator: number; - Delete(Temporary?: any): void; + Delete(Temporary?: boolean): void; DescriptionText: string; DropDownLines: number; DropDownWidth: number; @@ -3722,7 +3942,7 @@ declare namespace Office { readonly ListCount: number; ListHeaderCount: number; ListIndex: number; - Move(Bar?: any, Before?: any): CommandBarControl; + Move(Bar?: CommandBar, Before?: number): CommandBarControl; OLEUsage: MsoControlOLEUsage; OnAction: string; Parameter: string; @@ -3775,9 +3995,9 @@ declare namespace Office { readonly BuiltIn: boolean; Caption: string; readonly Control: any; - Copy(Bar?: any, Before?: any): CommandBarControl; + Copy(Bar?: CommandBar, Before?: number): CommandBarControl; readonly Creator: number; - Delete(Temporary?: any): void; + Delete(Temporary?: boolean): void; DescriptionText: string; Enabled: boolean; Execute(): void; @@ -3789,7 +4009,7 @@ declare namespace Office { readonly InstanceId: number; readonly IsPriorityDropped: boolean; readonly Left: number; - Move(Bar?: any, Before?: any): CommandBarControl; + Move(Bar?: CommandBar, Before?: number): CommandBarControl; OLEUsage: MsoControlOLEUsage; OnAction: string; Parameter: string; @@ -3812,24 +4032,21 @@ declare namespace Office { Width: number; } - class CommandBarControls { - private 'Office.CommandBarControls_typekey': CommandBarControls; - private constructor(); - Add(Type?: any, Id?: any, Parameter?: any, Before?: any, Temporary?: any): CommandBarControl; + interface CommandBarControls { + Add(Type?: MsoControlType.msoControlButton | MsoControlType.msoControlEdit | MsoControlType.msoControlDropdown | MsoControlType.msoControlComboBox | MsoControlType.msoControlPopup, Id?: number, Parameter?: any, Before?: number, Temporary?: boolean): CommandBarControl; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): CommandBarControl; + Item(Index: number | string): CommandBarControl; readonly Parent: CommandBar; + (Index: number | string): CommandBarControl; } - class CommandBars { - private 'Office.CommandBars_typekey': CommandBars; - private constructor(); + interface CommandBars { readonly ActionControl: CommandBarControl; readonly ActiveMenuBar: CommandBar; AdaptiveMenus: boolean; - Add(Name?: any, Position?: any, MenuBar?: any, Temporary?: any): CommandBar; + Add(Name?: string, Position?: MsoBarPosition, MenuBar?: boolean, Temporary?: boolean): CommandBar; AddEx(TbidOrName?: any, Position?: any, MenuBar?: any, Temporary?: any, TbtrProtection?: any): CommandBar; readonly Application: any; CommitRenderingTransaction(hwnd: number): void; @@ -3841,8 +4058,8 @@ declare namespace Office { DisplayKeysInTooltips: boolean; DisplayTooltips: boolean; ExecuteMso(idMso: string): void; - FindControl(Type?: any, Id?: any, Tag?: any, Visible?: any): CommandBarControl; - FindControls(Type?: any, Id?: any, Tag?: any, Visible?: any): CommandBarControls; + FindControl(Type?: MsoControlType, Id?: any, Tag?: any, Visible?: boolean): CommandBarControl | null; + FindControls(Type?: MsoControlType, Id?: any, Tag?: any, Visible?: boolean): CommandBarControls | null; GetEnabledMso(idMso: string): boolean; GetImageMso(idMso: string, Width: number, Height: number): stdole.IPictureDisp; GetLabelMso(idMso: string): string; @@ -3851,12 +4068,13 @@ declare namespace Office { GetSupertipMso(idMso: string): string; GetVisibleMso(idMso: string): boolean; IdsString(ids: number, pbstrName: string): number; - Item(Index: any): CommandBar; + Item(Index: number | string): CommandBar; LargeButtons: boolean; MenuAnimationStyle: MsoMenuAnimation; readonly Parent: any; ReleaseFocus(): void; TmcGetName(tmc: number, pbstrName: string): number; + (Index: number | string): CommandBar; } class ConnectorFormat { @@ -3886,8 +4104,7 @@ declare namespace Office { readonly Creator: number; /** @param boolean [ShowWithDelay=false] */ - Show( - CardStyle: MsoContactCardStyle, RectangleLeft: number, RectangleRight: number, RectangleTop: number, RectangleBottom: number, HorizontalPosition: number, ShowWithDelay?: boolean): void; + Show(CardStyle: MsoContactCardStyle, RectangleLeft: number, RectangleRight: number, RectangleTop: number, RectangleBottom: number, HorizontalPosition: number, ShowWithDelay?: boolean): void; } class Crop { @@ -3925,10 +4142,10 @@ declare namespace Office { private constructor(); /** - * @param string [Name=''] - * @param string [NamespaceURI=''] - * @param Office.MsoCustomXMLNodeType [NodeType=1] - * @param string [NodeValue=''] + * @param Name [Name=''] + * @param NamespaceURI [NamespaceURI=''] + * @param NodeType [NodeType=1] + * @param NodeValue [NodeValue=''] */ AppendChildNode(Name?: string, NamespaceURI?: string, NodeType?: MsoCustomXMLNodeType, NodeValue?: string): void; AppendChildSubtree(XML: string): void; @@ -3942,15 +4159,15 @@ declare namespace Office { HasChildNodes(): boolean; /** - * @param string [Name=''] - * @param string [NamespaceURI=''] - * @param Office.MsoCustomXMLNodeType [NodeType=1] - * @param string [NodeValue=''] - * @param Office.CustomXMLNode [NextSibling=0] + * @param Name [Name=''] + * @param NamespaceURI [NamespaceURI=''] + * @param NodeType [NodeType=1] + * @param NodeValue [NodeValue=''] + * @param NextSibling [NextSibling=0] */ InsertNodeBefore(Name?: string, NamespaceURI?: string, NodeType?: MsoCustomXMLNodeType, NodeValue?: string, NextSibling?: CustomXMLNode): void; - /** @param Office.CustomXMLNode [NextSibling=0] */ + /** @param NextSibling [NextSibling=0] */ InsertSubtreeBefore(XML: string, NextSibling?: CustomXMLNode): void; readonly LastChild: CustomXMLNode; readonly NamespaceURI: string; @@ -3965,10 +4182,10 @@ declare namespace Office { RemoveChild(Child: CustomXMLNode): void; /** - * @param string [Name=''] - * @param string [NamespaceURI=''] - * @param Office.MsoCustomXMLNodeType [NodeType=1] - * @param string [NodeValue=''] + * @param Name [Name=''] + * @param NamespaceURI [NamespaceURI=''] + * @param NodeType [NodeType=1] + * @param NodeValue [NodeValue=''] */ ReplaceChildNode(OldNode: CustomXMLNode, Name?: string, NamespaceURI?: string, NodeType?: MsoCustomXMLNodeType, NodeValue?: string): void; ReplaceChildSubtree(XML: string, OldNode: CustomXMLNode): void; @@ -3979,14 +4196,13 @@ declare namespace Office { readonly XPath: string; } - class CustomXMLNodes { - private 'Office.CustomXMLNodes_typekey': CustomXMLNodes; - private constructor(); + interface CustomXMLNodes { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): CustomXMLNode; readonly Parent: any; + (Index: number): CustomXMLNode; } class CustomXMLPart { @@ -3994,11 +4210,11 @@ declare namespace Office { private constructor(); /** - * @param string [Name=''] - * @param string [NamespaceURI=''] - * @param Office.CustomXMLNode [NextSibling=0] - * @param Office.MsoCustomXMLNodeType [NodeType=1] - * @param string [NodeValue=''] + * @param Name [Name=''] + * @param NamespaceURI [NamespaceURI=''] + * @param NextSibling [NextSibling=0] + * @param NodeType [NodeType=1] + * @param NodeValue [NodeValue=''] */ AddNode(Parent: CustomXMLNode, Name?: string, NamespaceURI?: string, NextSibling?: CustomXMLNode, NodeType?: MsoCustomXMLNodeType, NodeValue?: string): void; readonly Application: any; @@ -4019,19 +4235,17 @@ declare namespace Office { readonly XML: string; } - class CustomXMLParts { - private 'Office.CustomXMLParts_typekey': CustomXMLParts; - private constructor(); - - /** @param string [XML=''] */ - Add(XML?: string, SchemaCollection?: any): CustomXMLPart; + interface CustomXMLParts { + /** @param XML [XML=''] */ + Add(XML?: string, SchemaCollection?: CustomXMLSchemaCollection): CustomXMLPart; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): CustomXMLPart; + Item(Index: number | string): CustomXMLPart; readonly Parent: any; SelectByID(Id: string): CustomXMLPart; SelectByNamespace(NamespaceURI: string): CustomXMLParts; + (Index: number | string): CustomXMLPart; } class CustomXMLPrefixMapping { @@ -4044,17 +4258,16 @@ declare namespace Office { readonly Prefix: string; } - class CustomXMLPrefixMappings { - private 'Office.CustomXMLPrefixMappings_typekey': CustomXMLPrefixMappings; - private constructor(); + interface CustomXMLPrefixMappings { AddNamespace(Prefix: string, NamespaceURI: string): void; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): CustomXMLPrefixMapping; + Item(Index: number | string): CustomXMLPrefixMapping; LookupNamespace(Prefix: string): string; LookupPrefix(NamespaceURI: string): string; readonly Parent: any; + (Index: number | string): CustomXMLPrefixMapping; } class CustomXMLSchema { @@ -4069,25 +4282,23 @@ declare namespace Office { Reload(): void; } - class CustomXMLSchemaCollection { - private 'Office.CustomXMLSchemaCollection_typekey': CustomXMLSchemaCollection; - private constructor(); - + interface CustomXMLSchemaCollection { /** - * @param string [NamespaceURI=''] - * @param string [Alias=''] - * @param string [FileName=''] - * @param boolean [InstallForAllUsers=false] + * @param NamespaceURI [NamespaceURI=''] + * @param Alias [Alias=''] + * @param FileName [FileName=''] + * @param InstallForAllUsers [InstallForAllUsers=false] */ Add(NamespaceURI?: string, Alias?: string, FileName?: string, InstallForAllUsers?: boolean): CustomXMLSchema; AddCollection(SchemaCollection: CustomXMLSchemaCollection): void; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): CustomXMLSchema; + Item(Index: number | string): CustomXMLSchema; NamespaceURI(Index: number): string; readonly Parent: any; Validate(): boolean; + (Index: number | string): CustomXMLSchema; } class CustomXMLValidationError { @@ -4104,13 +4315,10 @@ declare namespace Office { readonly Type: MsoCustomXMLValidationErrorType; } - class CustomXMLValidationErrors { - private 'Office.CustomXMLValidationErrors_typekey': CustomXMLValidationErrors; - private constructor(); - + interface CustomXMLValidationErrors { /** - * @param string [ErrorText=''] - * @param boolean [ClearedOnUpdate=true] + * @param ErrorText [ErrorText=''] + * @param ClearedOnUpdate [ClearedOnUpdate=true] */ Add(Node: CustomXMLNode, ErrorName: string, ErrorText?: string, ClearedOnUpdate?: boolean): void; readonly Application: any; @@ -4118,6 +4326,7 @@ declare namespace Office { readonly Creator: number; Item(Index: number): CustomXMLValidationError; readonly Parent: any; + (Index: number): CustomXMLValidationError; } class DiagramNode { @@ -4125,14 +4334,14 @@ declare namespace Office { private constructor(); /** - * @param Office.MsoRelativeNodePosition [Pos=2] - * @param Office.MsoDiagramNodeType [NodeType=1] + * @param Pos [Pos=2] + * @param NodeType [NodeType=1] */ AddNode(Pos?: MsoRelativeNodePosition, NodeType?: MsoDiagramNodeType): DiagramNode; readonly Application: any; readonly Children: DiagramNodeChildren; - /** @param Office.MsoRelativeNodePosition [Pos=2] */ + /** @param Pos [Pos=2] */ CloneNode(CopyChildren: boolean, TargetNode: DiagramNode, Pos?: MsoRelativeNodePosition): DiagramNode; readonly Creator: number; Delete(): void; @@ -4146,19 +4355,16 @@ declare namespace Office { readonly Root: DiagramNode; readonly Shape: Shape; - /** @param boolean [SwapChildren=true] */ + /** @param SwapChildren [SwapChildren=true] */ SwapNode(TargetNode: DiagramNode, SwapChildren?: boolean): void; readonly TextShape: Shape; TransferChildren(ReceivingNode: DiagramNode): void; } - class DiagramNodeChildren { - private 'Office.DiagramNodeChildren_typekey': DiagramNodeChildren; - private constructor(); - + interface DiagramNodeChildren { /** - * @param any [Index=-1] - * @param Office.MsoDiagramNodeType [NodeType=1] + * @param Index [Index=-1] + * @param NodeType [NodeType=1] */ AddNode(Index?: any, NodeType?: MsoDiagramNodeType): DiagramNode; readonly Application: any; @@ -4169,17 +4375,17 @@ declare namespace Office { readonly LastChild: DiagramNode; readonly Parent: any; SelectAll(): void; + (Index: any): DiagramNode; } - class DiagramNodes { - private 'Office.DiagramNodes_typekey': DiagramNodes; - private constructor(); + interface DiagramNodes { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: any): DiagramNode; readonly Parent: any; SelectAll(): void; + (Index: any): DiagramNode; } class DocumentInspector { @@ -4194,25 +4400,23 @@ declare namespace Office { readonly Parent: any; } - class DocumentInspectors { - private 'Office.DocumentInspectors_typekey': DocumentInspectors; - private constructor(); + interface DocumentInspectors { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): DocumentInspector; readonly Parent: any; + (Index: number): DocumentInspector; } - class DocumentProperties { - private 'Office.DocumentProperties_typekey': DocumentProperties; - private constructor(); + interface DocumentProperties { Add(Name: string, LinkToContent: boolean, Type?: MsoDocProperties, Value?: any, LinkSource?: string): DocumentProperty; Application: TApplication; Count: number; Creator: number; Item(index: string | number): DocumentProperty; Parent: any; + (index: string | number): DocumentProperty; } class DocumentProperty { @@ -4237,22 +4441,21 @@ declare namespace Office { readonly Creator: number; Delete(): void; readonly Index: number; - readonly Modified: any; + readonly Modified: VarDate; readonly ModifiedBy: string; Open(): any; readonly Parent: any; Restore(): any; } - class DocumentLibraryVersions { - private 'Office.DocumentLibraryVersions_typekey': DocumentLibraryVersions; - private constructor(); + interface DocumentLibraryVersions { readonly Application: any; readonly Count: number; readonly Creator: number; readonly IsVersioningEnabled: boolean; Item(lIndex: number): DocumentLibraryVersion; readonly Parent: any; + (lIndex: number): DocumentLibraryVersion; } class EffectParameter { @@ -4264,13 +4467,12 @@ declare namespace Office { Value: any; } - class EffectParameters { - private 'Office.EffectParameters_typekey': EffectParameters; - private constructor(); + interface EffectParameters { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): EffectParameter; + Item(Index: string | number): EffectParameter; + (Index: string | number): EffectParameter; } class FileDialog { @@ -4303,10 +4505,8 @@ declare namespace Office { readonly Parent: any; } - class FileDialogFilters { - private 'Office.FileDialogFilters_typekey': FileDialogFilters; - private constructor(); - Add(Description: string, Extensions: string, Position?: any): FileDialogFilter; + interface FileDialogFilters { + Add(Description: string, Extensions: string, Position?: number): FileDialogFilter; readonly Application: any; Clear(): void; readonly Count: number; @@ -4314,16 +4514,16 @@ declare namespace Office { Delete(filter?: any): void; Item(Index: number): FileDialogFilter; readonly Parent: any; + (Index: number): FileDialogFilter; } - class FileDialogSelectedItems { - private 'Office.FileDialogSelectedItems_typekey': FileDialogSelectedItems; - private constructor(); + interface FileDialogSelectedItems { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): string; readonly Parent: any; + (Index: number): string; } class FileSearch { @@ -4333,9 +4533,9 @@ declare namespace Office { readonly Creator: number; /** - * @param Office.MsoSortBy [SortBy=1] - * @param Office.MsoSortOrder [SortOrder=1] - * @param boolean [AlwaysAccurate=true] + * @param SortBy [SortBy=1] + * @param SortOrder [SortOrder=1] + * @param AlwaysAccurate [AlwaysAccurate=true] */ Execute(SortBy?: MsoSortBy, SortOrder?: MsoSortOrder, AlwaysAccurate?: boolean): number; FileName: string; @@ -4355,15 +4555,14 @@ declare namespace Office { TextOrProperty: string; } - class FileTypes { - private 'Office.FileTypes_typekey': FileTypes; - private constructor(); + interface FileTypes { Add(FileType: MsoFileType): void; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): MsoFileType; Remove(Index: number): void; + (Index: number): MsoFileType; } class FillFormat { @@ -4448,13 +4647,12 @@ declare namespace Office { WordArtformat: MsoPresetTextEffect; } - class FoundFiles { - private 'Office.FoundFiles_typekey': FoundFiles; - private constructor(); + interface FoundFiles { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): string; + (Index: number): string; } class FreeformBuilder { @@ -4462,10 +4660,10 @@ declare namespace Office { private constructor(); /** - * @param number [X2=0] - * @param number [Y2=0] - * @param number [X3=0] - * @param number [Y3=0] + * @param X2 [X2=0] + * @param Y2 [Y2=0] + * @param X3 [X3=0] + * @param Y3 [Y3=0] */ AddNodes(SegmentType: MsoSegmentType, EditingType: MsoEditingType, X1: number, Y1: number, X2?: number, Y2?: number, X3?: number, Y3?: number): void; readonly Application: any; @@ -4494,40 +4692,38 @@ declare namespace Office { Transparency: number; } - class GradientStops { - private 'Office.GradientStops_typekey': GradientStops; - private constructor(); + interface GradientStops { readonly Application: any; readonly Count: number; readonly Creator: number; - /** @param number [Index=-1] */ + /** @param Index [Index=-1] */ Delete(Index?: number): void; /** - * @param number [Transparency=0] - * @param number [Index=-1] + * @param Transparency [Transparency=0] + * @param Index [Index=-1] */ Insert(RGB: number, Position: number, Transparency?: number, Index?: number): void; /** - * @param number [Transparency=0] - * @param number [Index=-1] - * @param number [Brightness=0] + * @param Transparency [Transparency=0] + * @param Index [Index=-1] + * @param Brightness [Brightness=0] */ Insert2(RGB: number, Position: number, Transparency?: number, Index?: number, Brightness?: number): void; Item(Index: number): GradientStop; + (Index: number): GradientStop; } - class GroupShapes { - private 'Office.GroupShapes_typekey': GroupShapes; - private constructor(); + interface GroupShapes { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: any): Shape; readonly Parent: any; Range(Index: any): ShapeRange; + (Index: any): Shape; } class HTMLProject { @@ -4537,14 +4733,14 @@ declare namespace Office { readonly Creator: number; readonly HTMLProjectItems: HTMLProjectItems; - /** @param Office.MsoHTMLProjectOpen [OpenKind=0] */ + /** @param OpenKind [OpenKind=0] */ Open(OpenKind?: MsoHTMLProjectOpen): void; readonly Parent: any; - /** @param boolean [Refresh=true] */ + /** @param Refresh [Refresh=true] */ RefreshDocument(Refresh?: boolean): void; - /** @param boolean [Refresh=true] */ + /** @param Refresh [Refresh=true] */ RefreshProject(Refresh?: boolean): void; readonly State: MsoHTMLProjectState; } @@ -4558,21 +4754,20 @@ declare namespace Office { LoadFromFile(FileName: string): void; readonly Name: string; - /** @param Office.MsoHTMLProjectOpen [OpenKind=0] */ + /** @param OpenKind [OpenKind=0] */ Open(OpenKind?: MsoHTMLProjectOpen): void; readonly Parent: any; SaveCopyAs(FileName: string): void; Text: string; } - class HTMLProjectItems { - private 'Office.HTMLProjectItems_typekey': HTMLProjectItems; - private constructor(); + interface HTMLProjectItems { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: any): HTMLProjectItem; readonly Parent: any; + (Index: any): HTMLProjectItem; } class IAssistance { @@ -4584,7 +4779,7 @@ declare namespace Office { /** * SearchHelp Method - * @param string [Scope=''] + * @param Scope [Scope=''] */ SearchHelp(Query: string, Scope?: string): void; @@ -4593,12 +4788,14 @@ declare namespace Office { /** * ShowHelp Method - * @param string [HelpId=''] - * @param string [Scope=''] + * @param HelpId [HelpId=''] + * @param Scope [Scope=''] */ ShowHelp(HelpId?: string, Scope?: string): void; } + /** For Macintosh only */ + // tslint:disable-next-line:interface-name class IFind { private 'Office.IFind_typekey': IFind; private constructor(); @@ -4631,11 +4828,12 @@ declare namespace Office { View: MsoFileFindView; } - class IFoundFiles { - private 'Office.IFoundFiles_typekey': IFoundFiles; - private constructor(); + /** For Macintosh only */ + // tslint:disable-next-line:interface-name + interface IFoundFiles { readonly Count: number; Item(Index: number): string; + (Index: number): string; } class IMsoBorder { @@ -4669,52 +4867,52 @@ declare namespace Office { private 'Office.IMsoChart_typekey': IMsoChart; private constructor(); - /** @param Office.XlDataLabelsType [Type=2] */ + /** @param Type [Type=2] */ _ApplyDataLabels(Type?: XlDataLabelsType, IMsoLegendKey?: any, AutoText?: any, HasLeaderLines?: any): void; readonly Application: any; ApplyChartTemplate(bstrFileName: string): void; ApplyCustomType(ChartType: XlChartType, TypeName?: any): void; - /** @param Office.XlDataLabelsType [Type=2] */ - ApplyDataLabels( - Type?: XlDataLabelsType, IMsoLegendKey?: any, AutoText?: any, HasLeaderLines?: any, ShowSeriesName?: any, ShowCategoryName?: any, ShowValue?: any, - ShowPercentage?: any, ShowBubbleSize?: any, Separator?: any): void; + /** @param Type [Type=2] */ + ApplyDataLabels(Type?: XlDataLabelsType, IMsoLegendKey?: any, AutoText?: any, HasLeaderLines?: any, ShowSeriesName?: any, ShowCategoryName?: any, ShowValue?: any, ShowPercentage?: any, ShowBubbleSize?: any, Separator?: any): void; ApplyLayout(Layout: number, varChartType?: any): void; readonly Area3DGroup: IMsoChartGroup; AreaGroups(Index?: any): any; AutoFormat(rGallery: number, varFormat?: any): void; AutoScaling: boolean; - /** @param Office.XlAxisGroup [AxisGroup=1] */ + /** @param AxisGroup [AxisGroup=1] */ Axes(Type: any, AxisGroup?: XlAxisGroup): any; readonly BackWall: IMsoWalls; readonly Bar3DGroup: IMsoChartGroup; BarGroups(Index?: any): any; BarShape: XlBarShape; + CategoryLabelLevel: XlCategoryLabelLevel; readonly ChartArea: IMsoChartArea; + ChartColor: any; readonly ChartData: IMsoChartData; ChartGroups(pvarIndex?: any, varIgallery?: any): any; ChartStyle: any; readonly ChartTitle: IMsoChartTitle; ChartType: XlChartType; - ChartWizard( - varSource?: any, varGallery?: any, varFormat?: any, varPlotBy?: any, varCategoryLabels?: any, varSeriesLabels?: any, varHasLegend?: any, varTitle?: any, - varCategoryTitle?: any, varValueTitle?: any, varExtraTitle?: any): void; + ChartWizard(varSource?: any, varGallery?: any, varFormat?: any, varPlotBy?: any, varCategoryLabels?: any, varSeriesLabels?: any, varHasLegend?: any, varTitle?: any, varCategoryTitle?: any, varValueTitle?: any, varExtraTitle?: any): void; + ClearToMatchColorStyle(): void; ClearToMatchStyle(): void; readonly Column3DGroup: IMsoChartGroup; ColumnGroups(Index?: any): any; Copy(): any; /** - * @param number [Appearance=1] - * @param number [Format=-4147] - * @param number [Size=2] + * @param Appearance [Appearance=1] + * @param Format [Format=-4147] + * @param Size [Size=2] */ CopyPicture(Appearance?: number, Format?: number, Size?: number): void; readonly Corners: IMsoCorners; readonly Creator: number; readonly DataTable: IMsoDataTable; Delete(): any; + DeleteHiddenContent(): void; DepthPercent: number; DisplayBlanksAs: XlDisplayBlanksAs; DoughnutGroups(Index?: any): any; @@ -4722,10 +4920,12 @@ declare namespace Office { Export(bstr: string, varFilterName?: any, varInteractive?: any): boolean; readonly Floor: IMsoFloor; readonly Format: IMsoChartFormat; + FullSeriesCollection(Index?: any): any; GapDepth: number; GetChartElement(x: number, y: number, ElementID: number, Arg1: number, Arg2: number): void; HasAxis(axisType?: any, AxisGroup?: any): any; HasDataTable: boolean; + readonly HasHiddenContent: boolean; HasLegend: boolean; HasPivotFields: boolean; HasTitle: boolean; @@ -4749,6 +4949,7 @@ declare namespace Office { SaveChartTemplate(bstrFileName: string): void; Select(Replace?: any): any; SeriesCollection(Index?: any): any; + SeriesNameLevel: XlSeriesNameLevel; SetDefaultChart(varName: any): void; SetElement(RHS: MsoChartElementType): void; SetSourceData(Source: string, PlotBy?: any): void; @@ -4756,6 +4957,7 @@ declare namespace Office { ShowAllFieldButtons: boolean; ShowAxisFieldButtons: boolean; ShowDataLabelsOverMaximum: boolean; + ShowExpandCollapseEntireFieldButtons: boolean; ShowLegendFieldButtons: boolean; ShowReportFilterFieldButtons: boolean; ShowValueFieldButtons: boolean; @@ -4764,7 +4966,7 @@ declare namespace Office { readonly SurfaceGroup: IMsoChartGroup; Type: number; - /** @param boolean [fBackWall=true] */ + /** @param fBackWall [fBackWall=true] */ Walls(fBackWall?: boolean): IMsoWalls; XYGroups(Index?: any): any; } @@ -4799,6 +5001,7 @@ declare namespace Office { private 'Office.IMsoChartData_typekey': IMsoChartData; private constructor(); Activate(): void; + ActivateChartDataWindow(): void; BreakLink(): void; readonly IsLinked: boolean; readonly Workbook: any; @@ -4807,7 +5010,9 @@ declare namespace Office { class IMsoChartFormat { private 'Office.IMsoChartFormat_typekey': IMsoChartFormat; private constructor(); + readonly Adjustments: Adjustments; readonly Application: any; + AutoShapeType: MsoAutoShapeType; readonly Creator: number; readonly Fill: FillFormat; readonly Glow: GlowFormat; @@ -4825,12 +5030,21 @@ declare namespace Office { private constructor(); readonly Application: any; AxisGroup: number; + BinsCountValue: number; + BinsOverflowEnabled: boolean; + BinsOverflowValue: number; + BinsType: XlBinsType; + BinsUnderflowEnabled: boolean; + BinsUnderflowValue: number; + BinWidthValue: number; BubbleScale: number; + CategoryCollection(Index?: any): any; readonly Creator: number; DoughnutHoleSize: number; readonly DownBars: IMsoDownBars; readonly DropLines: IMsoDropLines; FirstSliceAngle: number; + FullCategoryCollection(Index?: any): any; GapWidth: number; Has3DShading: boolean; HasDropLines: boolean; @@ -5137,18 +5351,17 @@ declare namespace Office { Weight: number; } - class MetaProperties { - private 'Office.MetaProperties_typekey': MetaProperties; - private constructor(); + interface MetaProperties { readonly Application: any; readonly Count: number; readonly Creator: number; GetItemByInternalName(InternalName: string): MetaProperty; - Item(Index: any): MetaProperty; + Item(Index: number | string): MetaProperty; readonly Parent: any; readonly SchemaXml: string; Validate(): string; readonly ValidationError: string; + (Index: number | string): MetaProperty; } class MetaProperty { @@ -5170,31 +5383,33 @@ declare namespace Office { class MsoDebugOptions { private 'Office.MsoDebugOptions_typekey': MsoDebugOptions; private constructor(); + AddIgnoredAssertTag(bstrTagToIgnore: string): void; readonly Application: any; readonly Creator: number; FeatureReports: number; OutputToDebugger: boolean; OutputToFile: boolean; OutputToMessageBox: boolean; + RemoveIgnoredAssertTag(bstrTagToIgnore: string): void; readonly UnitTestManager: any; } class MsoEnvelope { private 'Office.MsoEnvelope_typekey': MsoEnvelope; private constructor(); - readonly CommandBars: any; + readonly CommandBars: CommandBars; Introduction: string; - readonly Item: any; + readonly Item: Outlook.MailItem; readonly Parent: any; } class NewFile { private 'Office.NewFile_typekey': NewFile; private constructor(); - Add(FileName: string, Section?: any, DisplayName?: any, Action?: any): boolean; + Add(FileName: string, Section?: MsoFileNewSection, DisplayName?: string, Action?: MsoFileNewAction): boolean; readonly Application: any; readonly Creator: number; - Remove(FileName: string, Section?: any, DisplayName?: any, Action?: any): boolean; + Remove(FileName: string, Section?: MsoFileNewSection, DisplayName?: string, Action?: MsoFileNewAction): boolean; } class OfficeTheme { @@ -5234,10 +5449,8 @@ declare namespace Office { WordWrap: MsoTriState; } - class Permission { - private 'Office.Permission_typekey': Permission; - private constructor(); - Add(UserId: string, Permission?: any, ExpirationDate?: any): UserPermission; + interface Permission { + Add(UserId: string, Permission?: MsoPermission, ExpirationDate?: VarDate): UserPermission; readonly Application: any; ApplyPolicy(FileName: string): void; readonly Count: number; @@ -5253,6 +5466,7 @@ declare namespace Office { RemoveAll(): void; RequestPermissionURL: string; StoreLicenses: boolean; + (Index: any): UserPermission; } class PickerDialog { @@ -5266,8 +5480,8 @@ declare namespace Office { Resolve(TokenText: string, duplicateDlgMode: number): PickerResults; /** - * @param boolean [IsMultiSelect=true] - * @param Office.PickerResults [ExistingResults=0] + * @param IsMultiSelect [IsMultiSelect=true] + * @param ExistingResults [ExistingResults=0] */ Show(IsMultiSelect?: boolean, ExistingResults?: PickerResults): PickerResults; Title: string; @@ -5283,24 +5497,22 @@ declare namespace Office { readonly Type: MsoPickerField; } - class PickerFields { - private 'Office.PickerFields_typekey': PickerFields; - private constructor(); + interface PickerFields { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): PickerField; + (Index: number): PickerField; } - class PickerProperties { - private 'Office.PickerProperties_typekey': PickerProperties; - private constructor(); + interface PickerProperties { Add(Id: string, Value: string, Type: MsoPickerField): PickerProperty; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): PickerProperty; Remove(Id: string): void; + (Index: number): PickerProperty; } class PickerProperty { @@ -5328,16 +5540,14 @@ declare namespace Office { Type: string; } - class PickerResults { - private 'Office.PickerResults_typekey': PickerResults; - private constructor(); - - /** @param string [SIPId=''] */ + interface PickerResults { + /** @param SIPId [SIPId=''] */ Add(Id: string, DisplayName: string, Type: string, SIPId?: string, ItemData?: any, SubItems?: any): PickerResult; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): PickerResult; + (Index: number): PickerResult; } class PictureEffect { @@ -5352,19 +5562,18 @@ declare namespace Office { Visible: MsoTriState; } - class PictureEffects { - private 'Office.PictureEffects_typekey': PictureEffects; - private constructor(); + interface PictureEffects { readonly Application: any; readonly Count: number; readonly Creator: number; - /** @param number [Index=-1] */ + /** @param Index [Index=-1] */ Delete(Index?: number): void; - /** @param number [Position=-1] */ + /** @param Position [Position=-1] */ Insert(EffectType: MsoPictureEffectType, Position?: number): PictureEffect; Item(Index: number): PictureEffect; + (Index: number): PictureEffect; } class PictureFormat { @@ -5411,17 +5620,15 @@ declare namespace Office { readonly Value: any; } - class PropertyTests { - private 'Office.PropertyTests_typekey': PropertyTests; - private constructor(); - - /** @param Office.MsoConnector [Connector=1] */ + interface PropertyTests { + /** @param Connector [Connector=1] */ Add(Name: string, Condition: MsoCondition, Value: any, SecondValue: any, Connector?: MsoConnector): void; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): PropertyTest; Remove(Index: number): void; + (Index: number): PropertyTest; } class ReflectionFormat { @@ -5456,14 +5663,13 @@ declare namespace Office { readonly Parent: any; } - class RulerLevels2 { - private 'Office.RulerLevels2_typekey': RulerLevels2; - private constructor(); + interface RulerLevels2 { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): RulerLevel2; + Item(Index: 1 | 2 | 3 | 4 | 5): RulerLevel2; readonly Parent: any; + (Index: 1 | 2 | 3 | 4 | 5): RulerLevel2; } class ScopeFolder { @@ -5477,13 +5683,12 @@ declare namespace Office { readonly ScopeFolders: ScopeFolders; } - class ScopeFolders { - private 'Office.ScopeFolders_typekey': ScopeFolders; - private constructor(); + interface ScopeFolders { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): ScopeFolder; + (Index: number): ScopeFolder; } class Script { @@ -5501,16 +5706,13 @@ declare namespace Office { readonly Shape: any; } - class Scripts { - private 'Office.Scripts_typekey': Scripts; - private constructor(); - + interface Scripts { /** - * @param Office.MsoScriptLocation [Location=2] - * @param Office.MsoScriptLanguage [Language=2] - * @param string [Id=''] - * @param string [Extended=''] - * @param string [ScriptText=''] + * @param Location [Location=2] + * @param Language [Language=2] + * @param Id [Id=''] + * @param Extended [Extended=''] + * @param ScriptText [ScriptText=''] */ Add(Anchor?: any, Location?: MsoScriptLocation, Language?: MsoScriptLanguage, Id?: string, Extended?: string, ScriptText?: string): Script; readonly Application: any; @@ -5519,17 +5721,17 @@ declare namespace Office { Delete(): void; Item(Index: any): Script; readonly Parent: any; + (Index: any): Script; } - class SearchFolders { - private 'Office.SearchFolders_typekey': SearchFolders; - private constructor(); + interface SearchFolders { Add(ScopeFolder: ScopeFolder): void; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): ScopeFolder; Remove(Index: number): void; + (Index: number): ScopeFolder; } class SearchScope { @@ -5541,28 +5743,26 @@ declare namespace Office { readonly Type: MsoSearchIn; } - class SearchScopes { - private 'Office.SearchScopes_typekey': SearchScopes; - private constructor(); + interface SearchScopes { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SearchScope; + (Index: number): SearchScope; } - class ServerPolicy { - private 'Office.ServerPolicy_typekey': ServerPolicy; - private constructor(); + interface ServerPolicy { readonly Application: any; readonly BlockPreview: boolean; readonly Count: number; readonly Creator: number; readonly Description: string; readonly Id: string; - Item(Index: any): PolicyItem; + Item(Index: number | string): PolicyItem; readonly Name: string; readonly Parent: any; readonly Statement: string; + (Index: number | string): PolicyItem; } class ShadowFormat { @@ -5643,10 +5843,10 @@ declare namespace Office { Rotation: number; readonly RTF: string; - /** @param Office.MsoScaleFrom [fScale=0] */ + /** @param fScale [fScale=0] */ ScaleHeight(Factor: number, RelativeToOriginalSize: MsoTriState, fScale?: MsoScaleFrom): void; - /** @param Office.MsoScaleFrom [fScale=0] */ + /** @param fScale [fScale=0] */ ScaleWidth(Factor: number, RelativeToOriginalSize: MsoTriState, fScale?: MsoScaleFrom): void; readonly Script: Script; Select(Replace?: any): void; @@ -5682,19 +5882,17 @@ declare namespace Office { readonly SegmentType: MsoSegmentType; } - class ShapeNodes { - private 'Office.ShapeNodes_typekey': ShapeNodes; - private constructor(); + interface ShapeNodes { readonly Application: any; readonly Count: number; readonly Creator: number; Delete(Index: number): void; /** - * @param number [X2=0] - * @param number [Y2=0] - * @param number [X3=0] - * @param number [Y3=0] + * @param X2 [X2=0] + * @param Y2 [Y2=0] + * @param X3 [X3=0] + * @param Y3 [Y3=0] */ Insert(Index: number, SegmentType: MsoSegmentType, EditingType: MsoEditingType, X1: number, Y1: number, X2?: number, Y2?: number, X3?: number, Y3?: number): void; Item(Index: any): ShapeNode; @@ -5702,11 +5900,10 @@ declare namespace Office { SetEditingType(Index: number, EditingType: MsoEditingType): void; SetPosition(Index: number, X1: number, Y1: number): void; SetSegmentType(Index: number, SegmentType: MsoSegmentType): void; + (Index: any): ShapeNode; } - class ShapeRange { - private 'Office.ShapeRange_typekey': ShapeRange; - private constructor(); + interface ShapeRange { readonly Adjustments: Adjustments; Align(AlignCmd: MsoAlignCmd, RelativeTo: MsoTriState): void; AlternativeText: string; @@ -5753,6 +5950,9 @@ declare namespace Office { Left: number; readonly Line: LineFormat; LockAspectRatio: MsoTriState; + + /** @param PrimaryShape [PrimaryShape=0] */ + MergeShapes(MergeCmd: MsoMergeCmd, PrimaryShape?: Shape): void; Name: string; readonly Nodes: ShapeNodes; readonly Parent: any; @@ -5765,10 +5965,10 @@ declare namespace Office { Rotation: number; readonly RTF: string; - /** @param Office.MsoScaleFrom [fScale=0] */ + /** @param fScale [fScale=0] */ ScaleHeight(Factor: number, RelativeToOriginalSize: MsoTriState, fScale?: MsoScaleFrom): void; - /** @param Office.MsoScaleFrom [fScale=0] */ + /** @param fScale [fScale=0] */ ScaleWidth(Factor: number, RelativeToOriginalSize: MsoTriState, fScale?: MsoScaleFrom): void; readonly Script: Script; Select(Replace?: any): void; @@ -5790,22 +5990,32 @@ declare namespace Office { Width: number; ZOrder(ZOrderCmd: MsoZOrderCmd): void; readonly ZOrderPosition: number; + (Index: any): Shape; } - class Shapes { - private 'Office.Shapes_typekey': Shapes; - private constructor(); + interface Shapes { AddCallout(Type: MsoCalloutType, Left: number, Top: number, Width: number, Height: number): Shape; AddCanvas(Left: number, Top: number, Width: number, Height: number): Shape; /** - * @param Office.XlChartType [Type=-1] - * @param number [Left=-1] - * @param number [Top=-1] - * @param number [Width=-1] - * @param number [Height=-1] + * @param Type [Type=-1] + * @param Left [Left=-1] + * @param Top [Top=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] */ AddChart(Type?: XlChartType, Left?: number, Top?: number, Width?: number, Height?: number): Shape; + + /** + * @param Style [Style=-1] + * @param Type [Type=-1] + * @param Left [Left=-1] + * @param Top [Top=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] + * @param NewLayout [NewLayout=true] + */ + AddChart2(Style?: number, Type?: XlChartType, Left?: number, Top?: number, Width?: number, Height?: number, NewLayout?: boolean): Shape; AddConnector(Type: MsoConnectorType, BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; AddCurve(SafeArrayOfPoints: any): Shape; AddDiagram(Type: MsoDiagramType, Left: number, Top: number, Width: number, Height: number): Shape; @@ -5813,18 +6023,18 @@ declare namespace Office { AddLine(BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; /** - * @param number [Width=-1] - * @param number [Height=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] */ AddPicture(FileName: string, LinkToFile: MsoTriState, SaveWithDocument: MsoTriState, Left: number, Top: number, Width?: number, Height?: number): Shape; AddPolyline(SafeArrayOfPoints: any): Shape; AddShape(Type: MsoAutoShapeType, Left: number, Top: number, Width: number, Height: number): Shape; /** - * @param number [Left=-1] - * @param number [Top=-1] - * @param number [Width=-1] - * @param number [Height=-1] + * @param Left [Left=-1] + * @param Top [Top=-1] + * @param Width [Width=-1] + * @param Height [Height=-1] */ AddSmartArt(Layout: SmartArtLayout, Left?: number, Top?: number, Width?: number, Height?: number): Shape; AddTable(NumRows: number, NumColumns: number, Left: number, Top: number, Width: number, Height: number): Shape; @@ -5840,6 +6050,7 @@ declare namespace Office { readonly Parent: any; Range(Index: any): ShapeRange; SelectAll(): void; + (Index: any): Shape; } class SharedWorkspace { @@ -5847,13 +6058,13 @@ declare namespace Office { private constructor(); readonly Application: any; readonly Connected: boolean; - CreateNew(URL?: any, Name?: any): void; + CreateNew(URL?: string, Name?: string): void; readonly Creator: number; Delete(): void; Disconnect(): void; readonly Files: SharedWorkspaceFiles; readonly Folders: SharedWorkspaceFolders; - readonly LastRefreshed: any; + readonly LastRefreshed: VarDate; readonly Links: SharedWorkspaceLinks; readonly Members: SharedWorkspaceMembers; Name: string; @@ -5870,25 +6081,24 @@ declare namespace Office { private constructor(); readonly Application: any; readonly CreatedBy: string; - readonly CreatedDate: any; + readonly CreatedDate: VarDate; readonly Creator: number; Delete(): void; readonly ModifiedBy: string; - readonly ModifiedDate: any; + readonly ModifiedDate: VarDate; readonly Parent: any; readonly URL: string; } - class SharedWorkspaceFiles { - private 'Office.SharedWorkspaceFiles_typekey': SharedWorkspaceFiles; - private constructor(); - Add(FileName: string, ParentFolder?: any, OverwriteIfFileAlreadyExists?: any, KeepInSync?: any): SharedWorkspaceFile; + interface SharedWorkspaceFiles { + Add(FileName: string, ParentFolder?: SharedWorkspaceFolder, OverwriteIfFileAlreadyExists?: boolean, KeepInSync?: boolean): SharedWorkspaceFile; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceFile; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceFile; } class SharedWorkspaceFolder { @@ -5896,21 +6106,20 @@ declare namespace Office { private constructor(); readonly Application: any; readonly Creator: number; - Delete(DeleteEventIfFolderContainsFiles?: any): void; + Delete(DeleteEventIfFolderContainsFiles?: boolean): void; readonly FolderName: string; readonly Parent: any; } - class SharedWorkspaceFolders { - private 'Office.SharedWorkspaceFolders_typekey': SharedWorkspaceFolders; - private constructor(); - Add(FolderName: string, ParentFolder?: any): SharedWorkspaceFolder; + interface SharedWorkspaceFolders { + Add(FolderName: string, ParentFolder?: SharedWorkspaceFolder): SharedWorkspaceFolder; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceFolder; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceFolder; } class SharedWorkspaceLink { @@ -5918,28 +6127,27 @@ declare namespace Office { private constructor(); readonly Application: any; readonly CreatedBy: string; - readonly CreatedDate: any; + readonly CreatedDate: VarDate; readonly Creator: number; Delete(): void; Description: string; readonly ModifiedBy: string; - readonly ModifiedDate: any; + readonly ModifiedDate: VarDate; Notes: string; readonly Parent: any; Save(): void; URL: string; } - class SharedWorkspaceLinks { - private 'Office.SharedWorkspaceLinks_typekey': SharedWorkspaceLinks; - private constructor(); - Add(URL: string, Description?: any, Notes?: any): SharedWorkspaceLink; + interface SharedWorkspaceLinks { + Add(URL: string, Description?: string, Notes?: string): SharedWorkspaceLink; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceLink; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceLink; } class SharedWorkspaceMember { @@ -5955,16 +6163,15 @@ declare namespace Office { readonly Parent: any; } - class SharedWorkspaceMembers { - private 'Office.SharedWorkspaceMembers_typekey': SharedWorkspaceMembers; - private constructor(); - Add(Email: string, DomainName: string, DisplayName: string, Role?: any): SharedWorkspaceMember; + interface SharedWorkspaceMembers { + Add(Email: string, DomainName: string, DisplayName: string, Role?: string): SharedWorkspaceMember; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceMember; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceMember; } class SharedWorkspaceTask { @@ -5973,13 +6180,13 @@ declare namespace Office { readonly Application: any; AssignedTo: string; readonly CreatedBy: string; - readonly CreatedDate: any; + readonly CreatedDate: VarDate; readonly Creator: number; Delete(): void; Description: string; - DueDate: any; + DueDate: VarDate; readonly ModifiedBy: string; - readonly ModifiedDate: any; + readonly ModifiedDate: VarDate; readonly Parent: any; Priority: MsoSharedWorkspaceTaskPriority; Save(): void; @@ -5987,16 +6194,15 @@ declare namespace Office { Title: string; } - class SharedWorkspaceTasks { - private 'Office.SharedWorkspaceTasks_typekey': SharedWorkspaceTasks; - private constructor(); - Add(Title: string, Status?: any, Priority?: any, Assignee?: any, Description?: any, DueDate?: any): SharedWorkspaceTask; + interface SharedWorkspaceTasks { + Add(Title: string, Status?: MsoSharedWorkspaceTaskStatus, Priority?: MsoSharedWorkspaceTaskPriority, Assignee?: SharedWorkspaceMember, Description?: string, DueDate?: VarDate): SharedWorkspaceTask; readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): SharedWorkspaceTask; readonly ItemCountExceeded: boolean; readonly Parent: any; + (Index: number): SharedWorkspaceTask; } class Signature { @@ -6008,7 +6214,7 @@ declare namespace Office { readonly Creator: number; Delete(): void; readonly Details: SignatureInfo; - readonly ExpireDate: any; + readonly ExpireDate: VarDate; readonly IsCertificateExpired: boolean; readonly IsCertificateRevoked: boolean; readonly IsSignatureLine: boolean; @@ -6019,8 +6225,8 @@ declare namespace Office { readonly Setup: SignatureSetup; ShowDetails(): void; Sign(varSigImg?: any, varDelSuggSigner?: any, varDelSuggSignerLine2?: any, varDelSuggSignerEmail?: any): void; - readonly SignatureLineShape: any; - readonly SignDate: any; + readonly SignatureLineShape: Shape; + readonly SignDate: VarDate; readonly Signer: string; readonly SortHint: number; } @@ -6048,9 +6254,7 @@ declare namespace Office { SignatureText: string; } - class SignatureSet { - private 'Office.SignatureSet_typekey': SignatureSet; - private constructor(); + interface SignatureSet { Add(): Signature; AddNonVisibleSignature(varSigProv?: any): Signature; AddSignatureLine(varSigProv?: any): Signature; @@ -6063,6 +6267,7 @@ declare namespace Office { readonly Parent: any; readonly ShowSignaturesPane: boolean; Subset: MsoSignatureSubset; + (iSig: number): Signature; } class SignatureSetup { @@ -6109,14 +6314,13 @@ declare namespace Office { readonly Parent: any; } - class SmartArtColors { - private 'Office.SmartArtColors_typekey': SmartArtColors; - private constructor(); + interface SmartArtColors { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): SmartArtColor; + Item(Index: number | string): SmartArtColor; readonly Parent: any; + (Index: number | string): SmartArtColor; } class SmartArtLayout { @@ -6131,14 +6335,13 @@ declare namespace Office { readonly Parent: any; } - class SmartArtLayouts { - private 'Office.SmartArtLayouts_typekey': SmartArtLayouts; - private constructor(); + interface SmartArtLayouts { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): SmartArtLayout; + Item(Index: number | string): SmartArtLayout; readonly Parent: any; + (Index: number | string): SmartArtLayout; } class SmartArtNode { @@ -6146,8 +6349,8 @@ declare namespace Office { private constructor(); /** - * @param Office.MsoSmartArtNodePosition [Position=1] - * @param Office.MsoSmartArtNodeType [Type=1] + * @param Position [Position=1] + * @param Type [Type=1] */ AddNode(Position?: MsoSmartArtNodePosition, Type?: MsoSmartArtNodeType): SmartArtNode; readonly Application: any; @@ -6170,15 +6373,14 @@ declare namespace Office { readonly Type: MsoSmartArtNodeType; } - class SmartArtNodes { - private 'Office.SmartArtNodes_typekey': SmartArtNodes; - private constructor(); + interface SmartArtNodes { Add(): SmartArtNode; readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): SmartArtNode; + Item(Index: number | string): SmartArtNode; readonly Parent: any; + (Index: number | string): SmartArtNode; } class SmartArtQuickStyle { @@ -6193,14 +6395,13 @@ declare namespace Office { readonly Parent: any; } - class SmartArtQuickStyles { - private 'Office.SmartArtQuickStyles_typekey': SmartArtQuickStyles; - private constructor(); + interface SmartArtQuickStyles { readonly Application: any; readonly Count: number; readonly Creator: number; - Item(Index: any): SmartArtQuickStyle; + Item(Index: number | string): SmartArtQuickStyle; readonly Parent: any; + (Index: number | string): SmartArtQuickStyle; } class SmartDocument { @@ -6209,7 +6410,7 @@ declare namespace Office { readonly Application: any; readonly Creator: number; - /** @param boolean [ConsiderAllSchemas=false] */ + /** @param ConsiderAllSchemas [ConsiderAllSchemas=false] */ PickSolution(ConsiderAllSchemas?: boolean): void; RefreshPane(): void; SolutionID: string; @@ -6232,7 +6433,7 @@ declare namespace Office { readonly Creator: number; readonly ErrorType: MsoSyncErrorType; GetUpdate(): void; - readonly LastSyncTime: any; + readonly LastSyncTime: VarDate; OpenVersion(SyncVersionType: MsoSyncVersionType): void; readonly Parent: any; PutUpdate(): void; @@ -6253,16 +6454,15 @@ declare namespace Office { Type: MsoTabStopType; } - class TabStops2 { - private 'Office.TabStops2_typekey': TabStops2; - private constructor(); + interface TabStops2 { Add(Type: MsoTabStopType, Position: number): TabStop2; readonly Application: any; readonly Count: number; readonly Creator: number; DefaultSpacing: number; - Item(Index: any): TabStop2; + Item(Index: number): TabStop2; readonly Parent: any; + (Index: number): TabStop2; } class TextColumn2 { @@ -6348,8 +6548,8 @@ declare namespace Office { ChangeCase(Type: MsoTextChangeCase): void; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Characters(Start?: number, Length?: number): TextRange2; Copy(): void; @@ -6359,42 +6559,48 @@ declare namespace Office { Delete(): void; /** - * @param number [After=0] - * @param Office.MsoTriState [MatchCase=0] - * @param Office.MsoTriState [WholeWords=0] + * @param After [After=0] + * @param MatchCase [MatchCase=0] + * @param WholeWords [WholeWords=0] */ Find(FindWhat: string, After?: number, MatchCase?: MsoTriState, WholeWords?: MsoTriState): TextRange2; readonly Font: Font2; - /** @param string [NewText=''] */ + /** @param NewText [NewText=''] */ InsertAfter(NewText?: string): TextRange2; - /** @param string [NewText=''] */ + /** @param NewText [NewText=''] */ InsertBefore(NewText?: string): TextRange2; - /** @param Office.MsoTriState [Unicode=0] */ + /** + * @param Formula [Formula=''] + * @param Position [Position=-1] + */ + InsertChartField(ChartFieldType: MsoChartFieldType, Formula?: string, Position?: number): TextRange2; + + /** @param Unicode [Unicode=0] */ InsertSymbol(FontName: string, CharNumber: number, Unicode?: MsoTriState): TextRange2; - Item(Index: any): TextRange2; + Item(Index: number): TextRange2; LanguageID: MsoLanguageID; readonly Length: number; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Lines(Start?: number, Length?: number): TextRange2; LtrRun(): void; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ MathZones(Start?: number, Length?: number): TextRange2; readonly ParagraphFormat: ParagraphFormat2; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Paragraphs(Start?: number, Length?: number): TextRange2; readonly Parent: any; @@ -6403,24 +6609,24 @@ declare namespace Office { RemovePeriods(): void; /** - * @param number [After=0] - * @param Office.MsoTriState [MatchCase=0] - * @param Office.MsoTriState [WholeWords=0] + * @param After [After=0] + * @param MatchCase [MatchCase=0] + * @param WholeWords [WholeWords=0] */ Replace(FindWhat: string, ReplaceWhat: string, After?: number, MatchCase?: MsoTriState, WholeWords?: MsoTriState): TextRange2; RotatedBounds(X1: number, Y1: number, X2: number, Y2: number, X3: number, Y3: number, x4: number, y4: number): void; RtlRun(): void; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Runs(Start?: number, Length?: number): TextRange2; Select(): void; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Sentences(Start?: number, Length?: number): TextRange2; readonly Start: number; @@ -6428,8 +6634,8 @@ declare namespace Office { TrimText(): TextRange2; /** - * @param number [Start=-1] - * @param number [Length=-1] + * @param Start [Start=-1] + * @param Length [Length=-1] */ Words(Start?: number, Length?: number): TextRange2; } @@ -6444,9 +6650,7 @@ declare namespace Office { readonly ThemeColorSchemeIndex: MsoThemeColorSchemeIndex; } - class ThemeColorScheme { - private 'Office.ThemeColorScheme_typekey': ThemeColorScheme; - private constructor(); + interface ThemeColorScheme { readonly Application: any; Colors(Index: MsoThemeColorSchemeIndex): ThemeColor; readonly Count: number; @@ -6455,6 +6659,7 @@ declare namespace Office { Load(FileName: string): void; readonly Parent: any; Save(FileName: string): void; + (Index: MsoThemeColorSchemeIndex): ThemeColor; } class ThemeEffectScheme { @@ -6475,14 +6680,13 @@ declare namespace Office { readonly Parent: any; } - class ThemeFonts { - private 'Office.ThemeFonts_typekey': ThemeFonts; - private constructor(); + interface ThemeFonts { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: MsoFontLanguageIndex): ThemeFont; readonly Parent: any; + (Index: MsoFontLanguageIndex): ThemeFont; } class ThemeFontScheme { @@ -6546,7 +6750,7 @@ declare namespace Office { private constructor(); readonly Application: any; readonly Creator: number; - ExpirationDate: any; + ExpirationDate: VarDate; readonly Parent: any; Permission: number; Remove(): void; @@ -6564,13 +6768,12 @@ declare namespace Office { ProportionalFontSize: number; } - class WebPageFonts { - private 'Office.WebPageFonts_typekey': WebPageFonts; - private constructor(); + interface WebPageFonts { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: MsoCharacterSet): WebPageFont; + (Index: MsoCharacterSet): WebPageFont; } class WorkflowTask { @@ -6590,13 +6793,12 @@ declare namespace Office { readonly WorkflowID: string; } - class WorkflowTasks { - private 'Office.WorkflowTasks_typekey': WorkflowTasks; - private constructor(); + interface WorkflowTasks { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): WorkflowTask; + (Index: number): WorkflowTask; } class WorkflowTemplate { @@ -6612,13 +6814,12 @@ declare namespace Office { Show(): number; } - class WorkflowTemplates { - private 'Office.WorkflowTemplates_typekey': WorkflowTemplates; - private constructor(); + interface WorkflowTemplates { readonly Application: any; readonly Count: number; readonly Creator: number; Item(Index: number): WorkflowTemplate; + (Index: number): WorkflowTemplate; } namespace EventHelperTypes { @@ -6703,103 +6904,45 @@ declare namespace Office { } interface ActiveXObject { - on( - obj: Office.CommandBarButton, event: 'Click', argNames: ['Ctrl', 'CancelDefault'], handler: ( - this: Office.CommandBarButton, parameter: {readonly Ctrl: Office.CommandBarButton, CancelDefault: boolean}) => void): void; - on( - obj: Office.CommandBarButton, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CommandBarButton, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CommandBarButton, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CommandBarButton, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CommandBarButton, event: 'Click', argNames: ['Ctrl', 'CancelDefault'], handler: (this: Office.CommandBarButton, parameter: {readonly Ctrl: Office.CommandBarButton, CancelDefault: boolean}) => void): void; + on(obj: Office.CommandBarButton, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CommandBarButton, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CommandBarButton, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CommandBarButton, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CommandBarButton, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CommandBarButton, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CommandBarButton, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBarButton_Invoke_ArgNames, handler: ( - this: Office.CommandBarButton, parameter: Office.EventHelperTypes.CommandBarButton_Invoke_Parameter) => void): void; - on( - obj: Office.CommandBarButton, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CommandBarButton, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CommandBarButton, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBarButton_Invoke_ArgNames, handler: (this: Office.CommandBarButton, parameter: Office.EventHelperTypes.CommandBarButton_Invoke_Parameter) => void): void; + on(obj: Office.CommandBarButton, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CommandBarButton, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; on(obj: Office.CommandBarComboBox, event: 'Change', argNames: ['Ctrl'], handler: (this: Office.CommandBarComboBox, parameter: {readonly Ctrl: Office.CommandBarComboBox}) => void): void; - on( - obj: Office.CommandBarComboBox, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CommandBarComboBox, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CommandBarComboBox, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CommandBarComboBox, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CommandBarComboBox, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CommandBarComboBox, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CommandBarComboBox, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CommandBarComboBox, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CommandBarComboBox, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CommandBarComboBox, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CommandBarComboBox, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBarComboBox_Invoke_ArgNames, handler: ( - this: Office.CommandBarComboBox, parameter: Office.EventHelperTypes.CommandBarComboBox_Invoke_Parameter) => void): void; - on( - obj: Office.CommandBarComboBox, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CommandBarComboBox, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; - on( - obj: Office.CommandBars, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CommandBars, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CommandBars, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CommandBars, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CommandBarComboBox, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBarComboBox_Invoke_ArgNames, handler: (this: Office.CommandBarComboBox, parameter: Office.EventHelperTypes.CommandBarComboBox_Invoke_Parameter) => void): void; + on(obj: Office.CommandBarComboBox, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CommandBarComboBox, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CommandBars, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CommandBars, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CommandBars, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CommandBars, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CommandBars, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CommandBars, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CommandBars, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBars_Invoke_ArgNames, handler: ( - this: Office.CommandBars, parameter: Office.EventHelperTypes.CommandBars_Invoke_Parameter) => void): void; + on(obj: Office.CommandBars, event: 'Invoke', argNames: Office.EventHelperTypes.CommandBars_Invoke_ArgNames, handler: (this: Office.CommandBars, parameter: Office.EventHelperTypes.CommandBars_Invoke_Parameter) => void): void; on(obj: Office.CommandBars, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CommandBars, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; - on( - obj: Office.CustomTaskPane, event: 'DockPositionStateChange' | 'VisibleStateChange', argNames: ['CustomTaskPaneInst'], handler: ( - this: Office.CustomTaskPane, parameter: {readonly CustomTaskPaneInst: Office.CustomTaskPane}) => void): void; - on( - obj: Office.CustomTaskPane, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CustomTaskPane, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CustomTaskPane, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CustomTaskPane, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CustomTaskPane, event: 'DockPositionStateChange' | 'VisibleStateChange', argNames: ['CustomTaskPaneInst'], handler: (this: Office.CustomTaskPane, parameter: {readonly CustomTaskPaneInst: Office.CustomTaskPane}) => void): void; + on(obj: Office.CustomTaskPane, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CustomTaskPane, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CustomTaskPane, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CustomTaskPane, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CustomTaskPane, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CustomTaskPane, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CustomTaskPane, event: 'Invoke', argNames: Office.EventHelperTypes.CustomTaskPane_Invoke_ArgNames, handler: ( - this: Office.CustomTaskPane, parameter: Office.EventHelperTypes.CustomTaskPane_Invoke_Parameter) => void): void; - on( - obj: Office.CustomTaskPane, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CustomTaskPane, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CustomTaskPane, event: 'Invoke', argNames: Office.EventHelperTypes.CustomTaskPane_Invoke_ArgNames, handler: (this: Office.CustomTaskPane, parameter: Office.EventHelperTypes.CustomTaskPane_Invoke_Parameter) => void): void; + on(obj: Office.CustomTaskPane, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CustomTaskPane, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CustomXMLPart, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CustomXMLPart, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CustomXMLPart, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CustomXMLPart, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CustomXMLPart, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CustomXMLPart, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'Invoke', argNames: Office.EventHelperTypes.CustomXMLPart_Invoke_ArgNames, handler: ( - this: Office.CustomXMLPart, parameter: Office.EventHelperTypes.CustomXMLPart_Invoke_Parameter) => void): void; - on( - obj: Office.CustomXMLPart, event: 'NodeAfterDelete', argNames: ['OldNode', 'OldParentNode', 'OldNextSibling', 'InUndoRedo'], handler: ( - this: Office.CustomXMLPart, - parameter: { - readonly OldNode: Office.CustomXMLNode, readonly OldParentNode: Office.CustomXMLNode, readonly OldNextSibling: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'NodeAfterInsert', argNames: ['NewNode', 'InUndoRedo'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly NewNode: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'NodeAfterReplace', argNames: ['OldNode', 'NewNode', 'InUndoRedo'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly OldNode: Office.CustomXMLNode, readonly NewNode: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; - on( - obj: Office.CustomXMLPart, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CustomXMLPart, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; - on( - obj: Office.CustomXMLParts, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Office.CustomXMLParts, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; - on( - obj: Office.CustomXMLParts, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Office.CustomXMLParts, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; + on(obj: Office.CustomXMLPart, event: 'Invoke', argNames: Office.EventHelperTypes.CustomXMLPart_Invoke_ArgNames, handler: (this: Office.CustomXMLPart, parameter: Office.EventHelperTypes.CustomXMLPart_Invoke_Parameter) => void): void; + on(obj: Office.CustomXMLPart, event: 'NodeAfterDelete', argNames: ['OldNode', 'OldParentNode', 'OldNextSibling', 'InUndoRedo'], handler: (this: Office.CustomXMLPart, parameter: {readonly OldNode: Office.CustomXMLNode, readonly OldParentNode: Office.CustomXMLNode, readonly OldNextSibling: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; + on(obj: Office.CustomXMLPart, event: 'NodeAfterInsert', argNames: ['NewNode', 'InUndoRedo'], handler: (this: Office.CustomXMLPart, parameter: {readonly NewNode: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; + on(obj: Office.CustomXMLPart, event: 'NodeAfterReplace', argNames: ['OldNode', 'NewNode', 'InUndoRedo'], handler: (this: Office.CustomXMLPart, parameter: {readonly OldNode: Office.CustomXMLNode, readonly NewNode: Office.CustomXMLNode, readonly InUndoRedo: boolean}) => void): void; + on(obj: Office.CustomXMLPart, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CustomXMLPart, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CustomXMLParts, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Office.CustomXMLParts, parameter: {readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number}) => void): void; + on(obj: Office.CustomXMLParts, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Office.CustomXMLParts, parameter: {readonly itinfo: number, readonly lcid: number, pptinfo: undefined}) => void): void; on(obj: Office.CustomXMLParts, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Office.CustomXMLParts, parameter: {pctinfo: number}) => void): void; - on( - obj: Office.CustomXMLParts, event: 'Invoke', argNames: Office.EventHelperTypes.CustomXMLParts_Invoke_ArgNames, handler: ( - this: Office.CustomXMLParts, parameter: Office.EventHelperTypes.CustomXMLParts_Invoke_Parameter) => void): void; + on(obj: Office.CustomXMLParts, event: 'Invoke', argNames: Office.EventHelperTypes.CustomXMLParts_Invoke_ArgNames, handler: (this: Office.CustomXMLParts, parameter: Office.EventHelperTypes.CustomXMLParts_Invoke_Parameter) => void): void; on(obj: Office.CustomXMLParts, event: 'PartAfterAdd', argNames: ['NewPart'], handler: (this: Office.CustomXMLParts, parameter: {readonly NewPart: Office.CustomXMLPart}) => void): void; on(obj: Office.CustomXMLParts, event: 'PartAfterLoad', argNames: ['Part'], handler: (this: Office.CustomXMLParts, parameter: {readonly Part: Office.CustomXMLPart}) => void): void; on(obj: Office.CustomXMLParts, event: 'PartBeforeDelete', argNames: ['OldPart'], handler: (this: Office.CustomXMLParts, parameter: {readonly OldPart: Office.CustomXMLPart}) => void): void; - on( - obj: Office.CustomXMLParts, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: ( - this: Office.CustomXMLParts, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; + on(obj: Office.CustomXMLParts, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Office.CustomXMLParts, parameter: {readonly riid: stdole.GUID, ppvObj: undefined}) => void): void; on(obj: Office.CommandBarButton, event: 'AddRef' | 'Release', handler: (this: Office.CommandBarButton, parameter: {}) => void): void; on(obj: Office.CommandBarComboBox, event: 'AddRef' | 'Release', handler: (this: Office.CommandBarComboBox, parameter: {}) => void): void; on(obj: Office.CommandBars, event: 'AddRef' | 'OnUpdate' | 'Release', handler: (this: Office.CommandBars, parameter: {}) => void): void; @@ -6810,56 +6953,3 @@ interface ActiveXObject { set(obj: Office.CommandBarButton | Office.CommandBarComboBox, propertyName: 'accName' | 'accValue', parameterTypes: [any], newValue: string): void; set(obj: Office.CommandBarComboBox, propertyName: 'List', parameterTypes: [number], newValue: string): void; } - -interface EnumeratorConstructor { - new(col: Office.CanvasShapes | Office.GroupShapes | Office.ShapeRange | Office.Shapes): Enumerator; - new(col: Office.COMAddIns): Enumerator; - new(col: Office.CommandBarControls): Enumerator; - new(col: Office.CommandBars): Enumerator; - new(col: Office.CustomXMLNodes): Enumerator; - new(col: Office.CustomXMLParts): Enumerator; - new(col: Office.CustomXMLPrefixMappings): Enumerator; - new(col: Office.CustomXMLSchemaCollection): Enumerator; - new(col: Office.CustomXMLValidationErrors): Enumerator; - new(col: Office.DiagramNodeChildren | Office.DiagramNodes): Enumerator; - new(col: Office.DocumentInspectors): Enumerator; - new(col: Office.DocumentLibraryVersions): Enumerator; - new(col: Office.EffectParameters): Enumerator; - new(col: Office.FileDialogFilters): Enumerator; - new(col: Office.FileDialogSelectedItems | Office.FoundFiles | Office.IFoundFiles): Enumerator; - new(col: Office.FileTypes): Enumerator; - new(col: Office.GradientStops): Enumerator; - new(col: Office.HTMLProjectItems): Enumerator; - new(col: Office.MetaProperties): Enumerator; - new(col: Office.Permission): Enumerator; - new(col: Office.PickerFields): Enumerator; - new(col: Office.PickerProperties): Enumerator; - new(col: Office.PickerResults): Enumerator; - new(col: Office.PictureEffects): Enumerator; - new(col: Office.PropertyTests): Enumerator; - new(col: Office.RulerLevels2): Enumerator; - new(col: Office.ScopeFolders | Office.SearchFolders): Enumerator; - new(col: Office.Scripts): Enumerator; - new(col: Office.SearchScopes): Enumerator; - new(col: Office.ShapeNodes): Enumerator; - new(col: Office.SharedWorkspaceFiles): Enumerator; - new(col: Office.SharedWorkspaceFolders): Enumerator; - new(col: Office.SharedWorkspaceLinks): Enumerator; - new(col: Office.SharedWorkspaceMembers): Enumerator; - new(col: Office.SharedWorkspaceTasks): Enumerator; - new(col: Office.SignatureSet): Enumerator; - new(col: Office.SmartArtColors): Enumerator; - new(col: Office.SmartArtLayouts): Enumerator; - new(col: Office.SmartArtNodes): Enumerator; - new(col: Office.SmartArtQuickStyles): Enumerator; - new(col: Office.TabStops2): Enumerator; - new(col: Office.TextRange2): Enumerator; - new(col: Office.ThemeFonts): Enumerator; - new(col: Office.WebPageFonts): Enumerator; - new(col: Office.WorkflowTasks): Enumerator; - new(col: Office.WorkflowTemplates): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-office/tslint.json b/types/activex-office/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-office/tslint.json +++ b/types/activex-office/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-outlook/index.d.ts b/types/activex-outlook/index.d.ts index b7a709fe45..37628722b5 100644 --- a/types/activex-outlook/index.d.ts +++ b/types/activex-outlook/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/vba/vba-outlook // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// /// diff --git a/types/activex-powerpoint/index.d.ts b/types/activex-powerpoint/index.d.ts index 6de089010d..ee59fd0be4 100644 --- a/types/activex-powerpoint/index.d.ts +++ b/types/activex-powerpoint/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/fp161225.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// /// diff --git a/types/activex-stdole/index.d.ts b/types/activex-stdole/index.d.ts index 9d0c8f3a3c..e738e4f03d 100644 --- a/types/activex-stdole/index.d.ts +++ b/types/activex-stdole/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/hh272953.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 declare namespace stdole { type IPictureDisp = StdPicture; @@ -86,7 +86,3 @@ interface ActiveXObjectNameMap { StdFont: stdole.StdFont; StdPicture: stdole.StdPicture; } - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-vbide/activex-vbide-tests.ts b/types/activex-vbide/activex-vbide-tests.ts index c3d92e51cf..02209ec9bd 100644 --- a/types/activex-vbide/activex-vbide-tests.ts +++ b/types/activex-vbide/activex-vbide-tests.ts @@ -1,21 +1,25 @@ -// tslint:disable-next-line no-unnecessary-generics -const collectionToArray = (col: any): T[] => { +/// + +const collectionToArray = (col: { Item(key: any): T }): T[] => { const results: T[] = []; const enumerator = new Enumerator(col); enumerator.moveFirst(); while (!enumerator.atEnd()) { results.push(enumerator.item()); + enumerator.moveNext(); } return results; }; const app = new ActiveXObject('Word.Application'); -const projects = collectionToArray(app.VBE.VBProjects); -projects.forEach(project => { +app.Visible = true; + +for (const project of collectionToArray(app.VBE.VBProjects)) { WScript.Echo(`Name: ${project.Name}`); - collectionToArray(project.References) - .forEach(reference => { - WScript.Echo(` ${reference.Name} ${reference.Major}.${reference.Minor} -- ${reference.FullPath}`); - }); -}); + for (const reference of collectionToArray(project.References)) { + WScript.Echo(` ${reference.Name} ${reference.Major}.${reference.Minor} -- ${reference.FullPath}`); + } +} + +app.Quit(); diff --git a/types/activex-vbide/index.d.ts b/types/activex-vbide/index.d.ts index 83049260c2..88594969e6 100644 --- a/types/activex-vbide/index.d.ts +++ b/types/activex-vbide/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/collections-visual-basic-add-in-model // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// @@ -99,14 +99,13 @@ declare namespace VBIDE { readonly VBE: VBE; } - class Addins { - private 'VBIDE.Addins_typekey': Addins; - private constructor(); + interface Addins { readonly Count: number; Item(index: any): AddIn; readonly Parent: any; Update(): void; readonly VBE: VBE; + (index: any): AddIn; } class Application { @@ -125,13 +124,13 @@ declare namespace VBIDE { readonly CountOfLines: number; CreateEventProc(EventName: string, ObjectName: string): number; - /** @param number [Count=1] */ + /** @param Count [Count=1] */ DeleteLines(StartLine: number, Count?: number): void; /** - * @param boolean [WholeWord=false] - * @param boolean [MatchCase=false] - * @param boolean [PatternSearch=false] + * @param WholeWord [WholeWord=false] + * @param MatchCase [MatchCase=false] + * @param PatternSearch [PatternSearch=false] */ Find(Target: string, StartLine: number, StartColumn: number, EndLine: number, EndColumn: number, WholeWord?: boolean, MatchCase?: boolean, PatternSearch?: boolean): boolean; InsertLines(Line: number, String: string): void; @@ -161,14 +160,13 @@ declare namespace VBIDE { readonly Window: Window; } - class CodePanes { - private 'VBIDE.CodePanes_typekey': CodePanes; - private constructor(); + interface CodePanes { readonly Count: number; Current: CodePane; Item(index: any): CodePane; readonly Parent: VBE; readonly VBE: VBE; + (index: any): CodePane; } class CommandBarEvents { @@ -185,9 +183,7 @@ declare namespace VBIDE { readonly Parent: Components; } - class Components { - private 'VBIDE.Components_typekey': Components; - private constructor(); + interface Components { Add(ComponentType: vbext_ComponentType): Component; readonly Application: Application; readonly Count: number; @@ -196,6 +192,7 @@ declare namespace VBIDE { readonly Parent: VBProject; Remove(Component: Component): void; readonly VBE: VBE; + (index: any): Component; } class Events { @@ -205,15 +202,14 @@ declare namespace VBIDE { ReferencesEvents(VBProject: VBProject): ReferencesEvents; } - class LinkedWindows { - private 'VBIDE.LinkedWindows_typekey': LinkedWindows; - private constructor(); + interface LinkedWindows { Add(Window: Window): void; readonly Count: number; Item(index: any): Window; readonly Parent: Window; Remove(Window: Window): void; readonly VBE: VBE; + (index: any): Window; } class ProjectTemplate { @@ -223,14 +219,13 @@ declare namespace VBIDE { readonly Parent: Application; } - class Properties { - private 'VBIDE.Properties_typekey': Properties; - private constructor(); + interface Properties { readonly Application: Application; readonly Count: number; Item(index: any): Property; readonly Parent: any; readonly VBE: VBE; + (index: any): Property; } class Property { @@ -263,9 +258,7 @@ declare namespace VBIDE { readonly VBE: VBE; } - class References { - private 'VBIDE.References_typekey': References; - private constructor(); + interface References { AddFromFile(FileName: string): Reference; AddFromGuid(Guid: string, Major: number, Minor: number): Reference; readonly Count: number; @@ -273,6 +266,7 @@ declare namespace VBIDE { readonly Parent: VBProject; Remove(Reference: Reference): void; readonly VBE: VBE; + (index: any): Reference; } class ReferencesEvents { @@ -298,13 +292,11 @@ declare namespace VBIDE { readonly VBE: VBE; } - class VBComponents { - private 'VBIDE.VBComponents_typekey': VBComponents; - private constructor(); + interface VBComponents { Add(ComponentType: vbext_ComponentType): VBComponent; AddCustom(ProgId: string): VBComponent; - /** @param number [index=0] */ + /** @param index [index=0] */ AddMTDesigner(index?: number): VBComponent; readonly Count: number; Import(FileName: string): VBComponent; @@ -312,6 +304,7 @@ declare namespace VBIDE { readonly Parent: VBProject; Remove(VBComponent: VBComponent): void; readonly VBE: VBE; + (index: any): VBComponent; } class VBE { @@ -354,9 +347,7 @@ declare namespace VBIDE { readonly VBE: VBE; } - class VBProjects { - private 'VBIDE.VBProjects_typekey': VBProjects; - private constructor(); + interface VBProjects { Add(Type: vbext_ProjectType): VBProject; readonly Count: number; Item(index: any): VBProject; @@ -364,6 +355,7 @@ declare namespace VBIDE { readonly Parent: VBE; Remove(lpc: VBProject): void; readonly VBE: VBE; + (index: any): VBProject; } class Window { @@ -386,38 +378,18 @@ declare namespace VBIDE { WindowState: vbext_WindowState; } - class Windows { - private 'VBIDE.Windows_typekey': Windows; - private constructor(); + interface Windows { readonly Count: number; CreateToolWindow(AddInInst: AddIn, ProgId: string, Caption: string, GuidPosition: string, DocObj: any): Window; Item(index: any): Window; readonly Parent: Application; readonly VBE: VBE; + (index: any): Window; } } interface ActiveXObject { - on( - obj: VBIDE.CommandBarEvents, event: 'Click', argNames: ['CommandBarControl', 'handled', 'CancelDefault'], handler: ( - this: VBIDE.CommandBarEvents, parameter: {readonly CommandBarControl: any, readonly handled: boolean, readonly CancelDefault: boolean}) => void): void; + on(obj: VBIDE.CommandBarEvents, event: 'Click', argNames: ['CommandBarControl', 'handled', 'CancelDefault'], handler: (this: VBIDE.CommandBarEvents, parameter: {readonly CommandBarControl: any, readonly handled: boolean, readonly CancelDefault: boolean}) => void): void; on(obj: VBIDE.References, event: 'ItemAdded' | 'ItemRemoved', argNames: ['Reference'], handler: (this: VBIDE.References, parameter: {readonly Reference: VBIDE.Reference}) => void): void; - on( - obj: VBIDE.ReferencesEvents, event: 'ItemAdded' | 'ItemRemoved', argNames: ['Reference'], handler: ( - this: VBIDE.ReferencesEvents, parameter: {readonly Reference: VBIDE.Reference}) => void): void; -} - -interface EnumeratorConstructor { - new(col: VBIDE.Addins): Enumerator; - new(col: VBIDE.CodePanes): Enumerator; - new(col: VBIDE.Components): Enumerator; - new(col: VBIDE.LinkedWindows | VBIDE.Windows): Enumerator; - new(col: VBIDE.Properties): Enumerator; - new(col: VBIDE.References): Enumerator; - new(col: VBIDE.VBComponents): Enumerator; - new(col: VBIDE.VBProjects): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; + on(obj: VBIDE.ReferencesEvents, event: 'ItemAdded' | 'ItemRemoved', argNames: ['Reference'], handler: (this: VBIDE.ReferencesEvents, parameter: {readonly Reference: VBIDE.Reference}) => void): void; } diff --git a/types/activex-vbide/tslint.json b/types/activex-vbide/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-vbide/tslint.json +++ b/types/activex-vbide/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-word/index.d.ts b/types/activex-word/index.d.ts index 7fe194552a..879af9021d 100644 --- a/types/activex-word/index.d.ts +++ b/types/activex-word/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/fp179696.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// /// diff --git a/types/adone/glosses/application.d.ts b/types/adone/glosses/app.d.ts similarity index 90% rename from types/adone/glosses/application.d.ts rename to types/adone/glosses/app.d.ts index 4c9661843a..1c6dee3369 100644 --- a/types/adone/glosses/application.d.ts +++ b/types/adone/glosses/app.d.ts @@ -1,5 +1,5 @@ declare namespace adone { - namespace application { + namespace app { namespace I { type ArgumentType = ((x: string, index: number) => any) | RegExp; @@ -12,7 +12,7 @@ declare namespace adone { | "append" | "count" | "set"; - nargs?: number | "+" | "*" | "?" + nargs?: number | "+" | "*" | "?"; type?: ArgumentType | ArgumentType[]; verify?: (args: any, opts: any) => boolean; // TODO required?: boolean; @@ -49,7 +49,7 @@ declare namespace adone { name?: string; description?: string; subsystems?: SubsystemInfo[]; - commandsGroups?: Group[] + commandsGroups?: Group[]; } interface SubsystemInfo { @@ -71,24 +71,24 @@ declare namespace adone { namespace I { interface LoadSubsystemOptions { - name?: string, - description?: string, - group?: string, - transpile?: boolean + name?: string; + description?: string; + group?: string; + transpile?: boolean; } interface CommonAddSubsystemInfo { - name?: string, - useFilename?: boolean - description?: string, - group?: string, - configureArgs?: any[] - transpile?: boolean, - bind?: boolean | string + name?: string; + useFilename?: boolean; + description?: string; + group?: string; + configureArgs?: any[]; + transpile?: boolean; + bind?: boolean | string; } interface AddSubsystemInfo extends CommonAddSubsystemInfo { - subsystem: Subsystem | string, + subsystem: Subsystem | string; } interface SysInfo { @@ -109,7 +109,7 @@ declare namespace adone { } interface AddSubsystemsFromOptions extends CommonAddSubsystemInfo { - filter?: string[] | ((file: string) => boolean | Promise) + filter?: string[] | ((file: string) => boolean | Promise); } } @@ -211,25 +211,22 @@ declare namespace adone { _rejectionHandled(p: Promise): void; _signalExit(sigName: string): void; - } namespace I { interface Command { - // ? + names: string[]; + // TODO } interface Argument { - // ? + names: string[]; + // TODO } - interface PositionalArgument extends Argument { - // ? - } + type PositionalArgument = Argument; // TODO - interface OptionalArgument extends Argument { - // ? - } + type OptionalArgument = Argument; // TODO interface DefineCommandFromSubsystemOptions { name?: string; diff --git a/types/adone/glosses/is.d.ts b/types/adone/glosses/is.d.ts index 011b906234..bf8bb0a347 100644 --- a/types/adone/glosses/is.d.ts +++ b/types/adone/glosses/is.d.ts @@ -320,12 +320,12 @@ declare namespace adone { /** * Checks whether the given object is an adone subsystem */ - export function subsystem(obj: any): obj is adone.application.Subsystem; + export function subsystem(obj: any): obj is adone.app.Subsystem; /** * Checks whether the given object is an adone application */ - export function application(obj: any): obj is adone.application.Application; + export function application(obj: any): obj is adone.app.Application; /** * Checks whether the given object is an adone logger diff --git a/types/adone/index.d.ts b/types/adone/index.d.ts index a74641c4df..c6add2eeea 100644 --- a/types/adone/index.d.ts +++ b/types/adone/index.d.ts @@ -5,7 +5,7 @@ // TypeScript Version: 2.4 /// -/// +/// /// /// /// diff --git a/types/adone/test/glosses/application.ts b/types/adone/test/glosses/app.ts similarity index 99% rename from types/adone/test/glosses/application.ts rename to types/adone/test/glosses/app.ts index 38c5b0c8ff..8d74c8093b 100644 --- a/types/adone/test/glosses/application.ts +++ b/types/adone/test/glosses/app.ts @@ -8,7 +8,7 @@ namespace applicationTests { Subsystem, runCli, Application - } = adone.application; + } = adone.app; namespace DApplicationTests { { diff --git a/types/adone/tsconfig.json b/types/adone/tsconfig.json index 3f02029dcc..7194901d7a 100644 --- a/types/adone/tsconfig.json +++ b/types/adone/tsconfig.json @@ -24,6 +24,7 @@ "adone.d.ts", "async.d.ts", "benchmark.d.ts", + "glosses/app.d.ts", "glosses/archives.d.ts", "glosses/assertion.d.ts", "glosses/collections/array_set.d.ts", @@ -95,7 +96,7 @@ "glosses/utils.d.ts", "glosses/vault.d.ts", "index.d.ts", - "test/glosses/application.ts", + "test/glosses/app.ts", "test/glosses/archives.ts", "test/glosses/assertion.ts", "test/glosses/collections/array_set.ts", diff --git a/types/aframe/aframe-tests.ts b/types/aframe/aframe-tests.ts index 5af66a09d1..5e2bd23e36 100644 --- a/types/aframe/aframe-tests.ts +++ b/types/aframe/aframe-tests.ts @@ -21,9 +21,9 @@ type MyEntity = AFrame.Entity<{ material: THREE.Material; sound: { pause(): void }; }>; -const camera = document.querySelector('a-entity[camera]').components.camera; -const material = document.querySelector('a-entity[material]').components.material; -document.querySelector('a-entity[sound]').components.sound.pause(); +const camera = (document.querySelector('a-entity[camera]') as MyEntity).components.camera; +const material = (document.querySelector('a-entity[material]') as MyEntity).components.material; +(document.querySelector('a-entity[sound]') as MyEntity).components.sound.pause(); entity.getDOMAttribute('geometry').primitive; @@ -38,21 +38,82 @@ entity.addEventListener('child-detached', (event) => { }); // Components -const Component = AFRAME.registerComponent('test', {}); + +interface TestComponent extends AFrame.Component { + multiply: (f: number) => number; + + data: { + myProperty: any[], + string: string, + num: number + }; + + system: TestSystem; +} + +const Component = AFRAME.registerComponent('test-component', { + schema: { + myProperty: { + default: [], + parse() { return [true]; }, + }, + string: { type: 'string' }, + num: 0 + }, + init() { + this.data.num = 0; + }, + update() {}, + tick() {}, + remove() {}, + pause() {}, + play() {}, + + multiply(this: TestComponent, f: number) { + // Reference to system because both were registered with the same name. + return f * this.data.num * this.system.data.counter; + } +}); // Scene const scene = document.querySelector('a-scene'); scene.hasLoaded; // System -const system = scene.systems['systemName']; + +interface TestSystem extends AFrame.System { + data: { + counter: number; + }; +} + +const testSystem: AFrame.SystemDefinition = { + schema: { + counter: 0 + }, + + init() { + this.data.counter = 1; + } +}; + +AFRAME.registerSystem('test-component', testSystem); // Register Custom Geometry -AFRAME.registerGeometry('a-test-geometry', { + +interface TestGeometry extends AFrame.Geometry { + schema: AFrame.MultiPropertySchema<{ + groupIndex: number; + }>; +} + +AFRAME.registerGeometry('a-test-geometry', { schema: { groupIndex: { default: 0 } }, init(data) { this.geometry = new THREE.Geometry(); + const temp = data.groupIndex; + temp; } }); diff --git a/types/aframe/index.d.ts b/types/aframe/index.d.ts index 0da1ed0ef5..b405de0273 100644 --- a/types/aframe/index.d.ts +++ b/types/aframe/index.d.ts @@ -2,6 +2,7 @@ // Project: https://aframe.io/ // Definitions by: Paul Shannon // Roberto Ritger +// Trygve Wastvedt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -19,7 +20,7 @@ declare var hasNativeWebVRImplementation: boolean; interface Document { createElement(tagName: string): AFrame.Entity; querySelector(selectors: 'a-scene'): AFrame.Scene; - querySelector>(selectors: string): T; + querySelector(selectors: string): AFrame.Entity; querySelectorAll(selectors: string): NodeListOf | Element>; } @@ -36,15 +37,15 @@ declare namespace AFrame { components: { [ key: string ]: ComponentDescriptor }; geometries: { [ key: string ]: GeometryDescriptor }; primitives: { [ key: string ]: Entity }; - registerComponent(name: string, component: ComponentDefinition): ComponentConstructor; + registerComponent(name: string, component: ComponentDefinition): ComponentConstructor; registerElement(name: string, element: ANode): void; - registerGeometry(name: string, geometry: GeometryDefinition): Geometry; + registerGeometry(name: string, geometry: GeometryDefinition): GeometryConstructor; registerPrimitive(name: string, primitive: PrimitiveDefinition): void; - registerShader(name: string, shader: any): void; - registerSystem(name: string, definition: SystemDefinition): void; + registerShader(name: string, shader: T): ShaderConstructor; + registerSystem(name: string, definition: SystemDefinition): SystemConstructor; schema: SchemaUtils; shaders: { [ key: string ]: ShaderDescriptor }; - systems: { [key: string]: System }; + systems: { [key: string]: SystemConstructor }; THREE: typeof THREE; TWEEN: typeof TWEEN; utils: Utils; @@ -89,54 +90,39 @@ declare namespace AFrame { tick(): void; } - interface Component { + interface Component { attrName?: string; - data?: any; + data: T; dependencies?: string[]; el: Entity; id: string; multiple?: boolean; name: string; - schema: Schema; + schema: Schema; + system: S | undefined; - init(data?: any): void; - pause(): void; - play(): void; - remove(): void; - tick?(time: number, timeDelta: number): void; - update(oldData: any): void; - updateSchema?(): void; + init(this: this, data?: T): void; + pause(this: this): void; + play(this: this): void; + remove(this: this): void; + tick?(this: this, time: number, timeDelta: number): void; + update(this: this, oldData: T): void; + updateSchema?(this: this): void; - extendSchema(update: Schema): void; - flushToDOM(): void; + extendSchema(this: this, update: Schema): void; + flushToDOM(this: this): void; } - interface ComponentConstructor { - new (el: Entity, name: string, id: string): Component; + interface ComponentConstructor { + new (el: Entity, attrValue: string, id: string): T; } - interface ComponentDefinition { - dependencies?: string[]; - el?: Entity; - id?: string; - multiple?: boolean; - schema?: Schema; + type ComponentDefinition = Partial; - init?(data?: any): void; - pause?(): void; - play?(): void; - remove?(): void; - tick?(time: number, timeDelta: number): void; - update?(oldData: any): void; - updateSchema?(): void; - - [ key: string ]: any; - } - - interface ComponentDescriptor { - Component: Component; - dependencies: string[] | null; - multiple: boolean | null; + interface ComponentDescriptor { + Component: ComponentConstructor; + dependencies: string[] | undefined; + multiple: boolean | undefined; // internal APIs2 // parse @@ -144,7 +130,6 @@ declare namespace AFrame { // schema // stringify // type - [ key: string ]: any; } interface Coordinate { @@ -153,8 +138,14 @@ declare namespace AFrame { z: number; } + interface DefaultComponents { + position: Component; + rotation: Component; + scale: Component; + } + interface Entity> extends ANode { - components: C; + components: C & DefaultComponents; isPlaying: boolean; object3D: THREE.Object3D; object3DMap: ObjectMap; @@ -165,8 +156,8 @@ declare namespace AFrame { /** * @deprecated since 0.4.0 */ - getComputedAttribute(attr: string): T; - getDOMAttribute(attr: string): T; + getComputedAttribute(attr: string): Component; + getDOMAttribute(attr: string): any; getObject3D(type: string): THREE.Object3D; getOrCreateObject3D(type: string, construct: any): THREE.Object3D; is(stateName: string): boolean; @@ -179,7 +170,6 @@ declare namespace AFrame { // getAttribute specific usages getAttribute(type: string): any; - getAttribute(attr: string): T; getAttribute(type: 'position' | 'rotation' | 'scale'): Coordinate; // setAttribute specific usages @@ -192,12 +182,18 @@ declare namespace AFrame { addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } - type DetailEvent = Event & { detail: D }; + type DetailEvent = Event & { + detail: D; + target: EventTarget & Entity; + }; interface EntityEventMap { 'child-attached': DetailEvent<{ el: Element | Entity }>; 'child-detached': DetailEvent<{ el: Element | Entity }>; - 'componentchanged': DetailEvent<{ name: string }>; + 'componentchanged': DetailEvent<{ + name: string, + id: string + }>; 'componentremoved': DetailEvent<{ name: string, id: string, @@ -215,23 +211,28 @@ declare namespace AFrame { interface Geometry { name: string; geometry: THREE.Geometry; - schema: Schema; - update(data: object): void; - [ key: string ]: any; + schema: Schema; + + init(this: this, data: { [P in keyof this['schema']]: any }): void; + // Would like the above to be: + // init?(this: this, data?: { [P in keyof T['schema']]: T['schema'][P]['default'] } ): void; + // I think this is prevented by the following issue: https://github.com/Microsoft/TypeScript/issues/21760. } - interface GeometryDefinition extends ComponentDefinition { - geometry?: THREE.Geometry; + interface GeometryConstructor { + new (): T; } - interface GeometryDescriptor { - Geometry: Geometry; + type GeometryDefinition = Partial; + + interface GeometryDescriptor { + Geometry: GeometryConstructor; schema: Schema; } - interface MultiPropertySchema { - [ key: string ]: SinglePropertySchema; - } + type MultiPropertySchema = { + [P in keyof T]: SinglePropertySchema | T[P]; + }; interface PrimitiveDefinition { defaultComponents?: any; // TODO cleanup type @@ -240,8 +241,9 @@ declare namespace AFrame { transforms?: any; // TODO cleanup type } - type PropertyTypes = 'array' | 'boolean' | 'color' | 'int' | 'number' | 'selector' | - 'selectorAll' | 'src' | 'string' | 'vec2' | 'vec3' | 'vec4'; + type PropertyTypes = 'array' | 'asset' | 'audio' | 'boolean' | 'color' | + 'int' | 'map' | 'model' | 'number' | 'selector' | 'selectorAll' | + 'string' | 'vec2' | 'vec3' | 'vec4'; type SceneEvents = 'enter-vr' | 'exit-vr' | 'loaded' | 'renderstart'; @@ -265,7 +267,7 @@ declare namespace AFrame { addEventListener(type: SceneEvents, listener: EventListener, useCapture?: boolean): void; } - type Schema = SinglePropertySchema | MultiPropertySchema; + type Schema = SinglePropertySchema | MultiPropertySchema; interface SchemaUtils { isSingleProperty(schema: Schema): boolean; @@ -274,11 +276,25 @@ declare namespace AFrame { interface Shader { name: string; - schema: Schema; + data: { [key: string]: any }; + schema: Schema; + material: THREE.Material; + vertexShader: string; + fragmentShader: string; + + init(this: this, data?: this['data']): void; + tick?(this: this, time: number, timeDelta: number): void; + update(this: this, oldData: this['data']): void; } - interface ShaderDescriptor { - Shader: Shader; + interface ShaderConstructor { + new (): T; + } + + type ShaderDefinition = Partial; + + interface ShaderDescriptor { + Shader: ShaderConstructor; schema: Schema; } @@ -287,27 +303,23 @@ declare namespace AFrame { 'default'?: T; parse?(value: string): T; stringify?(value: T): string; - [ key: string ]: any; } interface System { - data: any; - schema: Schema; - init(): void; - pause(): void; - play(): void; - tick?(): void; + data: { [key: string]: any }; + schema: Schema; + init(this: this): void; + pause(this: this): void; + play(this: this): void; + tick?(this: this, t: number, dt: number): void; } - interface SystemDefinition { - schema?: Schema; - init?(): void; - pause?(): void; - play?(): void; - tick?(): void; - [ key: string ]: any; + interface SystemConstructor { + new (scene: Scene): T; } + type SystemDefinition = Partial; + interface Utils { coordinates: { isCoordinate(value: string): boolean; @@ -326,5 +338,8 @@ declare namespace AFrame { diff(a: object, b: object): object; extend(target: object, ... source: object[]): object; extendDeep(target: object, ... source: object[]): object; + + throttle(tickFunction: () => void, minimumInterval: number, optionalContext?: {}): (t: number, dt: number) => void; + throttleTick(tickFunction: (t: number, dt: number) => void, minimumInterval: number, optionalContext?: {}): (t: number, dt: number) => void; } } diff --git a/types/aframe/tslint.json b/types/aframe/tslint.json index 71ee04c4e1..495d29983d 100644 --- a/types/aframe/tslint.json +++ b/types/aframe/tslint.json @@ -1,6 +1,5 @@ { "extends": "dtslint/dt.json", "rules": { - "no-unnecessary-generics": false } } diff --git a/types/algoliasearch/algoliasearch-tests.ts b/types/algoliasearch/algoliasearch-tests.ts index 0814b0fc03..96270b31eb 100644 --- a/types/algoliasearch/algoliasearch-tests.ts +++ b/types/algoliasearch/algoliasearch-tests.ts @@ -2,16 +2,17 @@ import * as algoliasearch from 'algoliasearch'; import { ClientOptions, SynonymOption, - AlgoliaApiKeyOptions, + ApiKeyOptions, SearchSynonymOptions, - AlgoliaResponse, - AlgoliaSecuredApiOptions, - AlgoliaIndexSettings, - AlgoliaQueryParameters, - AlgoliaIndex, + SecuredApiOptions, + Index, + Response, + IndexSettings, + QueryParameters, + Client } from 'algoliasearch'; -let _algoliaResponse: AlgoliaResponse = { +let _algoliaResponse: Response = { hits: [{}, {}], page: 0, nbHits: 12, @@ -33,7 +34,7 @@ let _synonymOption: SynonymOption = { replaceExistingSynonyms: false, }; -let _algoliaApiKeyOptions: AlgoliaApiKeyOptions = { +let _algoliaApiKeyOptions: ApiKeyOptions = { validity: 0, maxQueriesPerIPPerHour: 0, indexes: [''], @@ -48,14 +49,14 @@ let _searchSynonymOptions: SearchSynonymOptions = { hitsPerPage: 0, }; -let _algoliaSecuredApiOptions: AlgoliaSecuredApiOptions = { +let _algoliaSecuredApiOptions: SecuredApiOptions = { filters: '', validUntil: 0, restrictIndices: '', userToken: '', }; -let _algoliaIndexSettings: AlgoliaIndexSettings = { +let _algoliaIndexSettings: IndexSettings = { attributesToIndex: [''], attributesForFaceting: [''], unretrievableAttributes: [''], @@ -63,7 +64,7 @@ let _algoliaIndexSettings: AlgoliaIndexSettings = { ranking: [''], customRanking: [''], replicas: [''], - maxValuesPerFacet: '', + maxValuesPerFacet: 100, attributesToHighlight: [''], attributesToSnippet: [''], highlightPreTag: '', @@ -78,7 +79,7 @@ let _algoliaIndexSettings: AlgoliaIndexSettings = { ignorePlurals: false, disableTypoToleranceOnAttributes: '', separatorsToIndex: '', - queryType: '', + queryType: 'prefixAll', removeWordsIfNoResults: '', advancedSyntax: false, optionalWords: [''], @@ -86,7 +87,7 @@ let _algoliaIndexSettings: AlgoliaIndexSettings = { disablePrefixOnAttributes: [''], disableExactOnAttributes: [''], exactOnSingleWordQuery: '', - alternativesAsExact: false, + alternativesAsExact: ['ignorePlurals'], attributeForDistinct: '', distinct: false, numericAttributesToIndex: [''], @@ -96,13 +97,13 @@ let _algoliaIndexSettings: AlgoliaIndexSettings = { placeholders: '', }; -let _algoliaQueryParameters: AlgoliaQueryParameters = { +let _algoliaQueryParameters: QueryParameters = { query: '', filters: '', attributesToRetrieve: [''], restrictSearchableAttributes: [''], facets: '', - maxValuesPerFacet: '', + maxValuesPerFacet: 2, attributesToHighlight: [''], attributesToSnippet: [''], highlightPreTag: '', @@ -147,7 +148,30 @@ let _algoliaQueryParameters: AlgoliaQueryParameters = { minProximity: 0, }; -let index: AlgoliaIndex = algoliasearch('', '').initIndex(''); +let client: Client = algoliasearch('', ''); +let index: Index = client.initIndex(''); let search = index.search({ query: '' }); + index.search({ query: '' }, (err, res) => {}); + +// partialUpdateObject +index.partialUpdateObject({}, () => {}); +index.partialUpdateObject({}, false, () => {}); +index.partialUpdateObject({}).then(() => {}); +index.partialUpdateObject({}, false).then(() => {}); + +// partialUpdateObjects +index.partialUpdateObjects([{}], () => {}); +index.partialUpdateObjects([{}], false, () => {}); +index.partialUpdateObjects([{}]).then(() => {}); +index.partialUpdateObjects([{}], false).then(() => {}); + +let indexName : string = index.indexName; + +// complete copy +client.copyIndex('from', 'to').then(()=>{}) +client.copyIndex('from', 'to', ()=> {}) +// with scope +client.copyIndex('from', 'to', ['settings']).then(()=>{}) +client.copyIndex('from', 'to', ['synonyms', 'rules'], ()=> {}) diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index 3304ad579d..ba46f37ce6 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -1,93 +1,51 @@ -// Type definitions for algoliasearch-client-js 3.24.8 +// Type definitions for algoliasearch-client-js 3.27.0 // Project: https://github.com/algolia/algoliasearch-client-js // Definitions by: Baptiste Coquelle // Haroen Viaene // Aurélien Hervé +// Samuel Vaillant // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 declare namespace algoliasearch { - interface AlgoliaResponse { - /** - * Contains all the hits matching the query - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - hits: any[]; - /** - * Current page - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - page: number; - /** - * Number of total hits matching the query - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - nbHits: number; - /** - * Number of pages - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - nbPages: number; - /** - * Number of hits per pages - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - hitsPerPage: number; - /** - * Engine processing time (excluding network transfer) - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - processingTimeMS: number; - /** - * Query used to perform the search - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - query: string; - /** - * GET parameters used to perform the search - * https://github.com/algolia/algoliasearch-client-js#response-format - */ - params: string; - } - interface AlgoliaMultiResponse { - results: AlgoliaResponse[]; - } - /* - Interface for the algolia client object - */ - interface AlgoliaClient { + /** + * Interface for the algolia client object + */ + interface Client { /** * Initialization of the index - * @param name: index name - * return algolia index object * https://github.com/algolia/algoliasearch-client-js#init-index---initindex */ - initIndex(name: string): AlgoliaIndex; + initIndex(indexName: string): Index; /** * Query on multiple index - * @param queries index name, query and query parameters - * @param cb callback(err, res) * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries */ search( queries: { indexName: string; query: string; - params: AlgoliaQueryParameters; + params: QueryParameters; }[], - cb: (err: Error, res: AlgoliaMultiResponse) => void + cb: (err: Error, res: MultiResponse) => void ): void; /** * Query on multiple index - * @param queries index name, query and query parameters - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries */ - search(queries: { - indexName: string; - query: string; - params: AlgoliaQueryParameters; - }[]): Promise; + search( + queries: { + indexName: string; + query: string; + params: QueryParameters; + }[] + ): Promise; + /** + * Query for facet values of a specific facet + */ + searchForFacetValues( + queries: [{ indexName: string; params: SearchForFacetValues.Parameters }] + ): Promise; /** * clear browser cache * https://github.com/algolia/algoliasearch-client-js#cache @@ -107,336 +65,265 @@ declare namespace algoliasearch { */ getExtraHeader(name: string): string; /** - * remove an extra header for all upcoming requests + * Remove an extra header for all upcoming requests */ unsetExtraHeader(name: string): void; /** * List all your indices along with their associated information (number of entries, disk size, etc.) - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#list-indices---listindexes */ listIndexes(cb: (err: Error, res: any) => void): void; /** * List all your indices along with their associated information (number of entries, disk size, etc.) - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#list-indices---listindexes */ listIndexes(): Promise; /** * Delete a specific index - * @param name - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-index---deleteindex */ - deleteIndex(name: string, cb: (err: Error, res: any) => void): void; + deleteIndex(name: string, cb: (err: Error, res: Task) => void): void; /** * Delete a specific index - * @param name - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-index---deleteindex */ - deleteIndex(name: string): Promise; + deleteIndex(name: string): Promise; /** - * Copy an index from a specific index to a new one - * @param from origin index - * @param to destination index - * @param cb(err, res) + * Copy an index from a specific index to a new one * https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex */ copyIndex( from: string, to: string, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** - * Copy an index from a specific index to a new one - * @param from origin index - * @param to destination index - * return {Promise} + * Copy settings of an index from a specific index to a new one * https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex */ - copyIndex(from: string, to: string): Promise; + copyIndex( + from: string, + to: string, + scope: ('settings' | 'synonyms' | 'rules')[], + cb: (err: Error, res: Task) => void + ): void; + /** + * Copy settings of an index from a specific index to a new one + * https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex + */ + copyIndex( + from: string, + to: string, + scope?: ('settings' | 'synonyms' | 'rules')[] + ): Promise; /** * Move index to a new one (and will overwrite the original one) - * @param from origin index - * @param to destination index - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#move-index---moveindex */ moveIndex( from: string, to: string, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Move index to a new one (and will overwrite the original one) - * @param from origin index - * @param to destination index - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#move-index---moveindex */ - moveIndex(from: string, to: string): Promise; + moveIndex(from: string, to: string): Promise; /** * Generate a public API key - * @param key api key - * @param filters * https://github.com/algolia/algoliasearch-client-js#generate-key---generatesecuredapikey */ - generateSecuredApiKey( - key: string, - filters: AlgoliaSecuredApiOptions - ): string; + generateSecuredApiKey(key: string, filters: SecuredApiOptions): string; /** * Perform multiple operations with one API call to reduce latency - * @param action - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch */ - batch(action: AlgoliaAction[], cb: (err: Error, res: any) => void): void; + batch(action: Action[], cb: (err: Error, res: Task) => void): void; /** * Perform multiple operations with one API call to reduce latency - * @param action - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch */ - batch(action: AlgoliaAction[]): Promise; + batch(action: Action[]): Promise; /** * Lists global API Keys - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ listApiKeys(cb: (err: Error, res: any) => void): void; /** * Lists global API Keys - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ listApiKeys(): Promise; /** * Add global API Keys - * @param scopes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - addApiKey(scopes: string[], cb: (err: Error, res: any) => void): void; + addApiKey(scopes: string[], cb: (err: Error, res: Task) => void): void; /** * Add global API Key - * @param scopes - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ addApiKey( scopes: string[], - options: AlgoliaApiKeyOptions, - cb: (err: Error, res: any) => void + options: ApiKeyOptions, + cb: (err: Error, res: Task) => void ): void; /** * Add global API Keys - * @param scopes - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - addApiKey(scopes: string[], options?: AlgoliaApiKeyOptions): Promise; + addApiKey(scopes: string[], options?: ApiKeyOptions): Promise; /** * Update global API key - * @param key - * @param scopes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Update global API key - * @param key - * @param scopes - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - options: AlgoliaApiKeyOptions, - cb: (err: Error, res: any) => void + options: ApiKeyOptions, + cb: (err: Error, res: Task) => void ): void; /** * Update global API key - * @param key - * @param scopes - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - options?: AlgoliaApiKeyOptions - ): Promise; + options?: ApiKeyOptions + ): Promise; /** * Gets the rights of a global key - * @param key - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ getApiKey(key: string, cb: (err: Error, res: any) => void): void; /** * Gets the rights of a global key - * @param key - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ getApiKey(key: string): Promise; /** * Deletes a global key - * @param key - * @param cb(err,res) * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteapikey */ - deleteApiKey(key: string, cb: (err: Error, res: any) => void): void; + deleteApiKey(key: string, cb: (err: Error, res: Task) => void): void; /** * Deletes a global key - * @param key - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteapikey */ - deleteApiKey(key: string): Promise; + deleteApiKey(key: string): Promise; /** * Get 1000 last events - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs */ - getLogs(options: LogsOptions, cb: (err: Error, res: any) => void): void; + getLogs( + options: LogsOptions, + cb: (err: Error, res: { logs: Log[] }) => void + ): void; /** * Get 1000 last events - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs */ - getLogs(options: LogsOptions): Promise; + getLogs(options: LogsOptions): Promise<{ logs: Log[] }>; } /** * Interface for the index algolia object */ - interface AlgoliaIndex { + interface Index { + indexName: string; /** * Gets a specific object - * @param objectID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ - getObject(objectID: string, cb: (err: Error, res: any) => void): void; + getObject(objectID: string, cb: (err: Error, res: {}) => void): void; /** * Gets specific attributes from an object - * @param objectID - * @param attributes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ getObject( objectID: string, attributes: string[], - cb: (err: Error, res: any) => void + cb: (err: Error, res: {}) => void ): void; /** * Gets a list of objects - * @param objectIDs - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ - getObjects(objectIDs: string[], cb: (err: Error, res: any) => void): void; + getObjects( + objectIDs: string[], + cb: (err: Error, res: { results: {}[] }) => void + ): void; /** * Add a specific object - * @param object without objectID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ - addObject(object: {}, cb: (err: Error, res: any) => void): void; + addObject(object: {}, cb: (err: Error, res: Task) => void): void; /** * Add a list of objects - * @param object with objectID - * @param objectID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ addObject( object: {}, objectID: string, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Add list of objects - * @param objects - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ - addObjects(objects: {}[], cb: (err: Error, res: any) => void): void; + addObjects(objects: {}[], cb: (err: Error, res: Task) => void): void; /** * Add or replace a specific object - * @param object - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - saveObject(object: {}, cb: (err: Error, res: any) => void): void; + saveObject(object: {}, cb: (err: Error, res: Task) => void): void; /** * Add or replace several objects - * @param objects - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - saveObjects(objects: object[], cb: (err: Error, res: any) => void): void; + saveObjects(objects: object[], cb: (err: Error, res: Task) => void): void; /** * Update parameters of a specific object - * @param object - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - partialUpdateObject(object: {}, cb: (err: Error, res: any) => void): void; + partialUpdateObject(object: {}, cb: (err: Error, res: Task) => void): void; + partialUpdateObject(object: {}, createIfNotExists: boolean, cb: (err: Error, res: Task) => void): void; /** * Update parameters of a list of objects - * @param objects - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - partialUpdateObjects( - objects: {}[], - cb: (err: Error, res: any) => void - ): void; + partialUpdateObjects(objects: {}[], cb: (err: Error, res: Task) => void): void; + partialUpdateObjects(objects: {}[], createIfNotExists: boolean, cb: (err: Error, res: Task) => void): void; /** * Delete a specific object - * @param objectID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects */ - deleteObject(objectID: string, cb: (err: Error, res: any) => void): void; + deleteObject(objectID: string, cb: (err: Error, res: Task) => void): void; /** * Delete a list of objects - * @param objectIDs - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects */ deleteObjects( objectIDs: string[], - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Delete objects that matches the query - * @param query - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery */ deleteByQuery(query: string, cb: (err: Error, res: any) => void): void; /** * Delete objects that matches the query - * @param query - * @param params of the object - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery */ deleteByQuery( @@ -446,34 +333,26 @@ declare namespace algoliasearch { ): void; /** * Delete objects that matches the query - * @param query - * @param params of the object - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deleteby */ - deleteBy(params: {}, cb: (err: Error, res: any) => void): void; + deleteBy(params: {}, cb: (err: Error, res: Task) => void): void; /** * Wait for an indexing task to be compete - * @param taskID - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask */ - waitTask(taskID: number, cb: (err: Error, res: any) => void): void; + waitTask(taskID: number, cb: (err: Error, res: TaskStatus) => void): void; /** * Get an index settings - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings */ - getSettings(cb: (err: Error, res: any) => void): void; + getSettings(cb: (err: Error, res: IndexSettings) => void): void; /** * Set an index settings - * @param settings - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings */ setSettings( - settings: AlgoliaIndexSettings, - cb: (err: Error, res: any) => void + settings: IndexSettings, + cb: (err: Error, res: Task) => void ): void; /** * Clear cache of an index @@ -482,66 +361,53 @@ declare namespace algoliasearch { clearCache(): void; /** * Clear an index content - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex */ - clearIndex(cb: (err: Error, res: any) => void): void; + clearIndex(cb: (err: Error, res: Task) => void): void; /** * Save a synonym object - * @param synonym - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym */ saveSynonym( - synonym: AlgoliaSynonym, + synonym: Synonym, options: SynonymOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Save a synonym object - * @param synonyms - * @param options - * @param cb(err, res) */ batchSynonyms( - synonyms: AlgoliaSynonym[], + synonyms: Synonym[], options: SynonymOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Delete a specific synonym - * @param identifier - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms */ deleteSynonym( identifier: string, options: SynonymOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Clear all synonyms of an index - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#clear-all-synonyms---clearsynonyms */ clearSynonyms( options: SynonymOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Get a specific synonym - * @param identifier - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-synonym---getsynonym */ - getSynonym(identifier: string, cb: (err: Error, res: any) => void): void; + getSynonym( + identifier: string, + cb: (err: Error, res: Synonym) => void + ): void; /** * Search a synonyms - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms */ searchSynonyms( @@ -550,57 +416,42 @@ declare namespace algoliasearch { ): void; /** * Save a rule object - * @param rule - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#save-rule---saverule */ saveRule( - rule: AlgoliaRule, + rule: Rule, options: RuleOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Save a rule object - * @param rules - * @param options - * @param cb(err, res) */ batchRules( - rules: AlgoliaRule[], + rules: Rule[], options: RuleOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Delete a specific rule - * @param identifier - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#batch-rules---batchrules */ deleteRule( identifier: string, options: RuleOption, - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Clear all rules of an index - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#clear-all-rules---clearrules */ - clearRules(options: RuleOption, cb: (err: Error, res: any) => void): void; + clearRules(options: RuleOption, cb: (err: Error, res: Task) => void): void; /** * Get a specific rule - * @param identifier - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-rule---getrule */ - getRule(identifier: string, cb: (err: Error, res: any) => void): void; + getRule(identifier: string, cb: (err: Error, res: Rule) => void): void; /** * Search a rules - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#search-rules---searchrules */ searchRules( @@ -609,403 +460,286 @@ declare namespace algoliasearch { ): void; /** * List index user keys - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#list-api-keys---listapikeys */ listApiKeys(cb: (err: Error, res: any) => void): void; /** * Add key for this index - * @param scopes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - addApiKey(scopes: string[], cb: (err: Error, res: any) => void): void; + addApiKey(scopes: string[], cb: (err: Error, res: Task) => void): void; /** * Add key for this index - * @param scopes - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ addApiKey( scopes: string[], - options: AlgoliaApiKeyOptions, - cb: (err: Error, res: any) => void + options: ApiKeyOptions, + cb: (err: Error, res: Task) => void ): void; /** * Update a key for this index - * @param key - * @param scopes - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - cb: (err: Error, res: any) => void + cb: (err: Error, res: Task) => void ): void; /** * Update a key for this index - * @param key - * @param scopes - * @param options - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - options: AlgoliaApiKeyOptions, - cb: (err: Error, res: any) => void + options: ApiKeyOptions, + cb: (err: Error, res: Task) => void ): void; /** * Gets the rights of an index specific key - * @param key - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#get-key-permissions---getapikeyacl */ getApiKey(key: string, cb: (err: Error, res: any) => void): void; /** * Deletes an index specific key - * @param key - * @param cb(err, res) * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteapikey */ - deleteApiKey(key: string, cb: (err: Error, res: any) => void): void; + deleteApiKey(key: string, cb: (err: Error, res: Task) => void): void; /** * Gets specific attributes from an object - * @param objectID - * @param attributes - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ - getObject(objectID: string, attributes?: string[]): Promise; + getObject(objectID: string, attributes?: string[]): Promise<{}>; /** * Gets a list of objects - * @param objectIDs - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects */ - getObjects(objectIDs: string[]): Promise; + getObjects(objectIDs: string[]): Promise<{ results: {}[] }>; /** * Add a list of objects - * @param object with objectID - * @param objectID - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ - addObject(object: {}, objectID?: string): Promise; + addObject(object: {}, objectID?: string): Promise; /** * Add list of objects - * @param objects - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects */ - addObjects(objects: {}[]): Promise; + addObjects(objects: {}[]): Promise; /** * Add or replace a specific object - * @param object - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - saveObject(object: {}): Promise; + saveObject(object: {}): Promise; /** * Add or replace several objects - * @param objects - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - saveObjects(objects: object[]): Promise; + saveObjects(objects: object[]): Promise; /** * Update parameters of a specific object - * @param object - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - partialUpdateObject(object: {}): Promise; + partialUpdateObject(object: {}): Promise; + partialUpdateObject(object: {}, createIfNotExists: boolean): Promise; /** * Update parameters of a list of objects - * @param objects - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects */ - partialUpdateObjects(objects: {}[]): Promise; + partialUpdateObjects(objects: {}[]): Promise; + partialUpdateObjects(objects: {}[], createIfNotExists?: boolean): Promise; /** * Delete a specific object - * @param objectID - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects */ - deleteObject(objectID: string): Promise; + deleteObject(objectID: string): Promise; /** * Delete a list of objects - * @param objectIDs - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects */ - deleteObjects(objectIDs: string[]): Promise; + deleteObjects(objectIDs: string[]): Promise; /** * Delete objects that matches the query - * @param query - * @param params of the object - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery */ deleteByQuery(query: string, params?: {}): Promise; /** * Delete objects that matches the query - * @param params of the search - * return {Promise} * https://www.algolia.com/doc/api-reference/api-methods/delete-by-query/ */ - deleteBy(params: {}): Promise; + deleteBy(params: {}): Promise; /** * Wait for an indexing task to be compete - * @param taskID - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask */ - waitTask(taskID: number): Promise; + waitTask(taskID: number): Promise; /** * Get an index settings - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings */ - getSettings(): Promise; + getSettings(): Promise; /** * Set an index settings - * @param settings - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings */ - setSettings(settings: AlgoliaIndexSettings): Promise; + setSettings(settings: IndexSettings): Promise; /** * Search in an index - * @param params query parameter - * return {Promise} - * @param err() error callback * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search */ - search(params: AlgoliaQueryParameters): Promise; + search(params: QueryParameters): Promise; /** * Search in an index - * @param params query parameter - * @param cb(err, res) - * @param err() error callback * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search */ search( - params: AlgoliaQueryParameters, - cb: (err: Error, res: AlgoliaResponse) => void + params: QueryParameters, + cb: (err: Error, res: Response) => void ): void; /** * Search in an index - * @param params query parameter - * return {Promise} - * @param err() error callback * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ */ - searchForFacetValues(options: { - facetName: string; - facetQuery: string; - } & AlgoliaQueryParameters): Promise; + searchForFacetValues( + options: SearchForFacetValues.Parameters + ): Promise; /** * Search in an index - * @param params query parameter - * @param cb(err, res) - * @param err() error callback * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ */ - searchForFacetValues(options: { - facetName: string; - facetQuery: string; - } & AlgoliaQueryParameters, - cb: (err: Error, res: any) => void + searchForFacetValues( + options: SearchForFacetValues.Parameters, + cb: (err: Error, res: SearchForFacetValues.Response) => void ): void; /** * Browse an index - * @param query - * @param cb(err, content) * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browse(query: string, cb: (err: Error, res: any) => void): void; + browse(query: string, cb: (err: Error, res: BrowseResponse) => void): void; /** * Browse an index - * @param query - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browse(query: string): Promise; + browse(query: string): Promise; /** * Browse an index from a cursor - * @param cursor - * @param cb(err, content) * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browseFrom(cursor: string, cb: (err: Error, res: any) => void): void; + browseFrom( + cursor: string, + cb: (err: Error, res: BrowseResponse) => void + ): void; /** * Browse an index from a cursor - * @param cursor - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browseFrom(cursor: string): Promise; + browseFrom(cursor: string): Promise; /** * Browse an entire index - * return Promise * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browseAll(): Promise; + browseAll(): Promise; /** * Clear an index content - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex */ - clearIndex(): Promise; + clearIndex(): Promise; /** * Save a synonym object - * @param synonym - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym */ - saveSynonym(synonym: AlgoliaSynonym, options: SynonymOption): Promise; + saveSynonym(synonym: Synonym, options: SynonymOption): Promise; /** * Save a synonym object - * @param synonyms - * @param options - * return {Promise} */ - batchSynonyms( - synonyms: AlgoliaSynonym[], - options: SynonymOption - ): Promise; + batchSynonyms(synonyms: Synonym[], options: SynonymOption): Promise; /** * Delete a specific synonym - * @param identifier - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms */ - deleteSynonym(identifier: string, options: SynonymOption): Promise; + deleteSynonym(objectID: string, options: SynonymOption): Promise; /** * Clear all synonyms of an index - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#clear-all-synonyms---clearsynonyms */ - clearSynonyms(options: SynonymOption): Promise; + clearSynonyms(options: SynonymOption): Promise; /** * Get a specific synonym - * @param identifier - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-synonym---getsynonym */ - getSynonym(identifier: string): Promise; + getSynonym(objectID: string): Promise; /** * Search a synonyms - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms */ searchSynonyms(options: SearchSynonymOptions): Promise; /** * Save a rule object - * @param rule - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#save-rule---saverule */ - saveRule(rule: AlgoliaRule, options: RuleOption): Promise; + saveRule(rule: Rule, options: RuleOption): Promise; /** * Save a rule object - * @param rules - * @param options - * return {Promise} */ - batchRules(rules: AlgoliaRule[], options: RuleOption): Promise; + batchRules(rules: Rule[], options: RuleOption): Promise; /** * Delete a specific rule - * @param identifier - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#batch-rules---batchrules */ - deleteRule(identifier: string, options: RuleOption): Promise; + deleteRule(identifier: string, options: RuleOption): Promise; /** * Clear all query rules of an index - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#clear-all-rules---clearrules */ - clearRules(options: RuleOption): Promise; + clearRules(options: RuleOption): Promise; /** * Get a specific query rule - * @param identifier - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-rule---getrule */ - getRule(identifier: string): Promise; + getRule(identifier: string): Promise; /** * Search for query rules - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#search-rules---searchrules */ searchRules(options: SearchRuleOptions): Promise; /** * List index user keys - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#list-api-keys---listapikeys */ listApiKeys(): Promise; /** * Add key for this index - * @param scopes - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - addApiKey(scopes: string[], options?: AlgoliaApiKeyOptions): Promise; + addApiKey(scopes: string[], options?: ApiKeyOptions): Promise; /** * Update a key for this index - * @param key - * @param scopes - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ - updateApiKey(key: string, scopes: string[]): Promise; + updateApiKey(key: string, scopes: string[]): Promise; /** * Update a key for this index - * @param key - * @param scopes - * @param options - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateapikey */ updateApiKey( key: string, scopes: string[], - options: AlgoliaApiKeyOptions - ): Promise; + options: ApiKeyOptions + ): Promise; /** * Gets the rights of an index specific key - * @param key - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#get-key-permissions---getapikeyacl */ getApiKey(key: string): Promise; /** * Deletes an index specific key - * @param key - * return {Promise} * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteapikey */ - deleteApiKey(key: string): Promise; + deleteApiKey(key: string): Promise; } - /* -Interface describing available options when initializing a client -*/ + /** + * Interface describing available options when initializing a client + */ interface ClientOptions { /** * Timeout for requests to our servers, in milliseconds @@ -1020,20 +754,20 @@ Interface describing available options when initializing a client */ protocol?: string; /** - * (node only) httpAgent instance to use when communicating with Algolia servers. + * (node only) httpAgent instance to use when communicating with servers. * https://github.com/algolia/algoliasearch-client-js#client-options */ httpAgent?: any; /** - * read: array of read hosts to use to call Algolia servers, computed automatically - * write: array of read hosts to use to call Algolia servers, computed automatically + * read: array of read hosts to use to call servers, computed automatically + * write: array of read hosts to use to call servers, computed automatically * https://github.com/algolia/algoliasearch-client-js#client-options */ hosts?: { read?: string[]; write?: string[] }; } - /* -Interface describing options available for gettings the logs -*/ + /** + * Interface describing options available for gettings the logs + */ interface LogsOptions { /** * Specify the first entry to retrieve (0-based, 0 is the most recent log entry). @@ -1062,11 +796,15 @@ Interface describing options available for gettings the logs * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs */ type?: string; + /** + * The index to request logs from + */ + indexName?: string; } /** * Describe the action object used for batch operation */ - interface AlgoliaAction { + interface Action { /** * Type of the batch action * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch @@ -1093,7 +831,7 @@ Interface describing options available for gettings the logs /** * Describes the option used when creating user key */ - interface AlgoliaApiKeyOptions { + interface ApiKeyOptions { /** * Add a validity period. The key will be valid for a specific period of time (in seconds). * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey @@ -1123,7 +861,7 @@ Interface describing options available for gettings the logs * Specify the list of query parameters * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey */ - queryParameters?: AlgoliaQueryParameters; + queryParameters?: QueryParameters; /** * Specify a description to describe where the key is used. * https://github.com/algolia/algoliasearch-client-js#add-user-key---addapikey @@ -1216,9 +954,9 @@ Interface describing options available for gettings the logs */ hitsPerPage?: number; } - interface AlgoliaBrowseResponse { + interface BrowseResponse { cursor?: string; - hits: any[]; + hits: {}[]; params: string; query: string; processingTimeMS: number; @@ -1226,7 +964,7 @@ Interface describing options available for gettings the logs /** * Describes a synonym object */ - interface AlgoliaSynonym { + interface Synonym { /** * ObjectID of the synonym * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym @@ -1246,7 +984,7 @@ Interface describing options available for gettings the logs /** * Describes a query rule object */ - interface AlgoliaRule { + interface Rule { /** * ObjectID of the synonym * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym @@ -1332,7 +1070,7 @@ Interface describing options available for gettings the logs /** * Describes the options used when generating new api keys */ - interface AlgoliaSecuredApiOptions { + interface SecuredApiOptions { /** * Filter the query with numeric, facet or/and tag filters * default: "" @@ -1355,266 +1093,7 @@ Interface describing options available for gettings the logs */ userToken?: string; } - - /** - * Describes the settings available for configure your index - */ - interface AlgoliaIndexSettings { - /** - * The list of attributes you want index - * default: * - * https://github.com/algolia/algoliasearch-client-js#attributestoindex - */ - attributesToIndex?: string[]; - /** - * The list of attributes you want to use for faceting - * default: null - * https://github.com/algolia/algoliasearch-client-js#attributesforfaceting - */ - attributesForFaceting?: string[]; - /** - * The list of attributes that cannot be retrieved at query time - * default: null - * https://github.com/algolia/algoliasearch-client-js#unretrievableattributes - */ - unretrievableAttributes?: string[]; - /** - * List of attributes you want to use for textual search - * default: [] - * https://github.com/algolia/algoliasearch-client-js#searchableattributes - */ - searchableAttributes?: string[]; - /** - * A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer - * default: * - * https://github.com/algolia/algoliasearch-client-js#attributestoretrieve - */ - attributesToRetrieve?: string[]; - /** - * Controls the way results are sorted - * default: ['typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom'] - * https://github.com/algolia/algoliasearch-client-js#ranking - */ - ranking?: string[]; - /** - * Lets you specify part of the ranking - * default: [] - * https://github.com/algolia/algoliasearch-client-js#customranking - */ - customRanking?: string[]; - /** - * The list of indices on which you want to replicate all write operations - * default: [] - * https://github.com/algolia/algoliasearch-client-js#replicas - */ - replicas?: string[]; - /** - * Limit the number of facet values returned for each facet - * default: "" - * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet - */ - maxValuesPerFacet?: string; - /** - * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. - * default: null - * https://github.com/algolia/algoliasearch-client-js#attributestohighlight - */ - attributesToHighlight?: string[]; - /** - * Default list of attributes to snippet alongside the number of words to return - * default: null - * https://github.com/algolia/algoliasearch-client-js#attributestosnippet - */ - attributesToSnippet?: string[]; - /** - * Specify the string that is inserted before the highlighted parts in the query result - * default: - * https://github.com/algolia/algoliasearch-client-js#highlightpretag - */ - highlightPreTag?: string; - /** - * Specify the string that is inserted after the highlighted parts in the query result - * default: - * https://github.com/algolia/algoliasearch-client-js#highlightposttag - */ - highlightPostTag?: string; - /** - * String used as an ellipsis indicator when a snippet is truncated. - * default: … - * https://github.com/algolia/algoliasearch-client-js#snippetellipsistext - */ - snippetEllipsisText?: string; - /** - * If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets - * default: false - * https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays - */ - restrictHighlightAndSnippetArrays?: boolean; - /** - * Pagination parameter used to select the number of hits per page - * default: 20 - * https://github.com/algolia/algoliasearch-client-js#hitsperpage - */ - hitsPerPage?: number; - /** - * The minimum number of characters needed to accept one typo - * default: 4 - * https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo - */ - minWordSizefor1Typo?: number; - /** - * The minimum number of characters needed to accept two typos. - * default: 8 - * https://github.com/algolia/algoliasearch-client-js#highlightposttag - */ - minWordSizefor2Typos?: number; - /** - * This option allows you to control the number of typos allowed in the result set - * default: true - * 'true' The typo tolerance is enabled and all matching hits are retrieved (default behavior). - * 'false' The typo tolerance is disabled. All results with typos will be hidden. - * 'min' Only keep results with the minimum number of typos. For example, if one result matches without typos, then all results with typos will be hidden. - * 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos. - * https://github.com/algolia/algoliasearch-client-js#typotolerance - */ - typoTolerance?: any; - /** - * If set to false, disables typo tolerance on numeric tokens (numbers). - * default: true - * https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens - */ - allowTyposOnNumericTokens?: boolean; - /** - * If set to true, plural won't be considered as a typo - * default: false - * https://github.com/algolia/algoliasearch-client-js#ignoreplurals - */ - ignorePlurals?: boolean; - /** - * List of attributes on which you want to disable typo tolerance - * default: "" - * https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes - */ - disableTypoToleranceOnAttributes?: string; - /** - * Specify the separators (punctuation characters) to index. - * default: "" - * https://github.com/algolia/algoliasearch-client-js#separatorstoindex - */ - separatorsToIndex?: string; - /** - * Selects how the query words are interpreted - * default: 'prefixLast' - * 'prefixAll' All query words are interpreted as prefixes. This option is not recommended. - * 'prefixLast' Only the last word is interpreted as a prefix (default behavior). - * 'prefixNone' No query word is interpreted as a prefix. This option is not recommended. - * https://github.com/algolia/algoliasearch-client-js#querytype - */ - queryType?: any; - /** - * This option is used to select a strategy in order to avoid having an empty result page - * default: 'none' - * 'lastWords' When a query does not return any results, the last word will be added as optional - * 'firstWords' When a query does not return any results, the first word will be added as optional - * 'allOptional' When a query does not return any results, a second trial will be made with all words as optional - * 'none' No specific processing is done when a query does not return any results - * https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults - */ - removeWordsIfNoResults?: string; - /** - * Enables the advanced query syntax - * default: false - * https://github.com/algolia/algoliasearch-client-js#advancedsyntax - */ - advancedSyntax?: boolean; - /** - * A string that contains the comma separated list of words that should be considered as optional when found in the query - * default: [] - * https://github.com/algolia/algoliasearch-client-js#optionalwords - */ - optionalWords?: string[]; - /** - * Remove stop words from the query before executing it - * default: false - * true|false: enable or disable stop words for all 41 supported languages; or - * a list of language ISO codes (as a comma-separated string) for which stop words should be enable - * https://github.com/algolia/algoliasearch-client-js#removestopwords - */ - removeStopWords?: string[]; - /** - * List of attributes on which you want to disable prefix matching - * default: [] - * https://github.com/algolia/algoliasearch-client-js#disableprefixonattributes - */ - disablePrefixOnAttributes?: string[]; - /** - * List of attributes on which you want to disable the computation of exact criteria - * default: [] - * https://github.com/algolia/algoliasearch-client-js#disableexactonattributes - */ - disableExactOnAttributes?: string[]; - /** - * This parameter control how the exact ranking criterion is computed when the query contains one word - * default: attribute - * 'none': no exact on single word query - * 'word': exact set to 1 if the query word is found in the record - * 'attribute': exact set to 1 if there is an attribute containing a string equals to the query - * https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery - */ - exactOnSingleWordQuery?: string; - /** - * Specify the list of approximation that should be considered as an exact match in the ranking formula - * default: ['ignorePlurals', 'singleWordSynonym'] - * 'ignorePlurals': alternative words added by the ignorePlurals feature - * 'singleWordSynonym': single-word synonym (For example "NY" = "NYC") - * 'multiWordsSynonym': multiple-words synonym - * https://github.com/algolia/algoliasearch-client-js#alternativesasexact - */ - alternativesAsExact?: any; - /** - * The name of the attribute used for the Distinct feature - * default: null - * https://github.com/algolia/algoliasearch-client-js#attributefordistinct - */ - attributeForDistinct?: string; - /** - * If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set. - * https://github.com/algolia/algoliasearch-client-js#distinct - */ - distinct?: any; - /** - * All numerical attributes are automatically indexed as numerical filters - * default '' - * https://github.com/algolia/algoliasearch-client-js#numericattributestoindex - */ - numericAttributesToIndex?: string[]; - /** - * Allows compression of big integer arrays. - * default: false - * https://github.com/algolia/algoliasearch-client-js#allowcompressionofintegerarray - */ - allowCompressionOfIntegerArray?: boolean; - /** - * Specify alternative corrections that you want to consider. - * default: [] - * https://github.com/algolia/algoliasearch-client-js#altcorrections - */ - altCorrections?: {}[]; - /** - * Configure the precision of the proximity ranking criterion - * default: 1 - * https://github.com/algolia/algoliasearch-client-js#minproximity - */ - minProximity?: number; - /** - * This is an advanced use-case to define a token substitutable by a list of words without having the original token searchable - * default: '' - * https://github.com/algolia/algoliasearch-client-js#placeholders - */ - placeholders?: any; - } - - interface AlgoliaQueryParameters { + interface QueryParameters { /** * Query string used to perform the search * default: '' @@ -1650,7 +1129,7 @@ Interface describing options available for gettings the logs * default: "" * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet */ - maxValuesPerFacet?: string; + maxValuesPerFacet?: number; /** * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. * default: null @@ -1922,6 +1401,418 @@ Interface describing options available for gettings the logs * https://github.com/algolia/algoliasearch-client-js#minproximity */ minProximity?: number; + + nbShards?: number; + userData?: string | object; + } + + interface AlgoliaResponse { + /** + * Contains all the hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hits: any[]; + /** + * Current page + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + page: number; + /** + * Number of total hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbHits: number; + /** + * Number of pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbPage: number; + /** + * Number of hits per pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hitsPerPage: number; + /** + * Engine processing time (excluding network transfer) + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + processingTimeMS: number; + /** + * Query used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + query: string; + /** + * GET parameters used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + params: string; + facets: { + [facetName: string]: { [facetValue: string]: number }; + }; + } + + namespace SearchForFacetValues { + interface Parameters extends QueryParameters { + /** + * The facet to search in + */ + facetName: string; + /** + * The query for the search in this facet + */ + facetQuery: string; + } + + interface Response { + facetHits: { value: string; highlighted: string; count: number }[]; + exhaustiveFacetsCount: boolean; + processingTimeMS: number; + } + } + + interface Log { + timestamp: string; + method: string; + answer_code: number; + query_body: string; + answer: string; + url: string; + ip: string; + query_headers: string; + sha1: string; + nb_api_calls: string; + index: string; + query_params: string; + query_nb_hits: string; + processing_time_ms: string; + exhaustive_faceting?: false; + exhaustive_nb_hits?: false; + } + + interface Task { + taskID: number; + createdAt: string; + objectID?: string; + } + + interface TaskStatus { + status: 'published' | 'notPublished', + pendingTask: boolean, + } + + interface IndexSettings { + /** + * The list of attributes you want index + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoindex + */ + attributesToIndex?: string[]; + /** + * The list of attributes you want to use for faceting + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributesforfaceting + */ + attributesForFaceting?: string[]; + /** + * The list of attributes that cannot be retrieved at query time + * default: null + * https://github.com/algolia/algoliasearch-client-js#unretrievableattributes + */ + unretrievableAttributes?: string[]; + /** + * List of attributes you want to use for textual search + * default: [] + * https://github.com/algolia/algoliasearch-client-js#searchableattributes + */ + searchableAttributes?: string[]; + /** + * A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoretrieve + */ + attributesToRetrieve?: string[]; + /** + * Controls the way results are sorted + * default: ['typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom'] + * https://github.com/algolia/algoliasearch-client-js#ranking + */ + ranking?: string[]; + /** + * Lets you specify part of the ranking + * default: [] + * https://github.com/algolia/algoliasearch-client-js#customranking + */ + customRanking?: string[]; + /** + * The list of indices on which you want to replicate all write operations + * default: [] + * https://github.com/algolia/algoliasearch-client-js#replicas + */ + replicas?: string[]; + /** + * Limit the number of facet values returned for each facet + * default: "" + * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet + */ + maxValuesPerFacet?: number; + /** + * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestohighlight + */ + attributesToHighlight?: string[]; + /** + * Default list of attributes to snippet alongside the number of words to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestosnippet + */ + attributesToSnippet?: string[]; + /** + * Specify the string that is inserted before the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightpretag + */ + highlightPreTag?: string; + /** + * Specify the string that is inserted after the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + highlightPostTag?: string; + /** + * String used as an ellipsis indicator when a snippet is truncated. + * default: … + * https://github.com/algolia/algoliasearch-client-js#snippetellipsistext + */ + snippetEllipsisText?: string; + /** + * If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets + * default: false + * https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays + */ + restrictHighlightAndSnippetArrays?: boolean; + /** + * Pagination parameter used to select the number of hits per page + * default: 20 + * https://github.com/algolia/algoliasearch-client-js#hitsperpage + */ + hitsPerPage?: number; + /** + * The minimum number of characters needed to accept one typo + * default: 4 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo + */ + minWordSizefor1Typo?: number; + /** + * The minimum number of characters needed to accept two typos. + * default: 8 + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + minWordSizefor2Typos?: number; + /** + * This option allows you to control the number of typos allowed in the result set + * default: true + * 'true' The typo tolerance is enabled and all matching hits are retrieved (default behavior). + * 'false' The typo tolerance is disabled. All results with typos will be hidden. + * 'min' Only keep results with the minimum number of typos. For example, if one result matches without typos, then all results with typos will be hidden. + * 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos. + * https://github.com/algolia/algoliasearch-client-js#typotolerance + */ + typoTolerance?: boolean | 'min' | 'strict'; + /** + * If set to false, disables typo tolerance on numeric tokens (numbers). + * default: true + * https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens + */ + allowTyposOnNumericTokens?: boolean; + /** + * If set to true, plural won't be considered as a typo + * default: false + * https://github.com/algolia/algoliasearch-client-js#ignoreplurals + */ + ignorePlurals?: boolean; + /** + * List of attributes on which you want to disable typo tolerance + * default: "" + * https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes + */ + disableTypoToleranceOnAttributes?: string; + /** + * Specify the separators (punctuation characters) to index. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#separatorstoindex + */ + separatorsToIndex?: string; + /** + * Selects how the query words are interpreted + * default: 'prefixLast' + * 'prefixAll' All query words are interpreted as prefixes. This option is not recommended. + * 'prefixLast' Only the last word is interpreted as a prefix (default behavior). + * 'prefixNone' No query word is interpreted as a prefix. This option is not recommended. + * https://github.com/algolia/algoliasearch-client-js#querytype + */ + queryType?: 'prefixAll' | 'prefixLast' | 'prefixNone'; + /** + * This option is used to select a strategy in order to avoid having an empty result page + * default: 'none' + * 'lastWords' When a query does not return any results, the last word will be added as optional + * 'firstWords' When a query does not return any results, the first word will be added as optional + * 'allOptional' When a query does not return any results, a second trial will be made with all words as optional + * 'none' No specific processing is done when a query does not return any results + * https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults + */ + removeWordsIfNoResults?: string; + /** + * Enables the advanced query syntax + * default: false + * https://github.com/algolia/algoliasearch-client-js#advancedsyntax + */ + advancedSyntax?: boolean; + /** + * A string that contains the comma separated list of words that should be considered as optional when found in the query + * default: [] + * https://github.com/algolia/algoliasearch-client-js#optionalwords + */ + optionalWords?: string[]; + /** + * Remove stop words from the query before executing it + * default: false + * true|false: enable or disable stop words for all 41 supported languages; or + * a list of language ISO codes (as a comma-separated string) for which stop words should be enable + * https://github.com/algolia/algoliasearch-client-js#removestopwords + */ + removeStopWords?: string[]; + /** + * List of attributes on which you want to apply word-splitting ("decompounding") for + * each of the languages supported (German, Dutch, and Finnish as of 05/2018) + * default: {de: [], nl: [], fi: []} + */ + decompoundedAttributes?: { [key in Partial<'nl' | 'de' | 'fi'>]: string[] }; + /** + * List of attributes on which you want to disable prefix matching + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableprefixonattributes + */ + disablePrefixOnAttributes?: string[]; + /** + * List of attributes on which you want to disable the computation of exact criteria + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableexactonattributes + */ + disableExactOnAttributes?: string[]; + /** + * This parameter control how the exact ranking criterion is computed when the query contains one word + * default: attribute + * 'none': no exact on single word query + * 'word': exact set to 1 if the query word is found in the record + * 'attribute': exact set to 1 if there is an attribute containing a string equals to the query + * https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery + */ + exactOnSingleWordQuery?: string; + /** + * Specify the list of approximation that should be considered as an exact match in the ranking formula + * default: ['ignorePlurals', 'singleWordSynonym'] + * 'ignorePlurals': alternative words added by the ignorePlurals feature + * 'singleWordSynonym': single-word synonym (For example "NY" = "NYC") + * 'multiWordsSynonym': multiple-words synonym + * https://github.com/algolia/algoliasearch-client-js#alternativesasexact + */ + alternativesAsExact?: ( + | "ignorePlurals" + | "singleWordSynonym" + | "multiWordsSynonym")[]; + /** + * The name of the attribute used for the Distinct feature + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributefordistinct + */ + attributeForDistinct?: string; + /** + * If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set. + * https://github.com/algolia/algoliasearch-client-js#distinct + */ + distinct?: boolean | number; + /** + * All numerical attributes are automatically indexed as numerical filters + * default '' + * https://github.com/algolia/algoliasearch-client-js#numericattributestoindex + */ + numericAttributesToIndex?: string[]; + /** + * Allows compression of big integer arrays. + * default: false + * https://github.com/algolia/algoliasearch-client-js#allowcompressionofintegerarray + */ + allowCompressionOfIntegerArray?: boolean; + /** + * Specify alternative corrections that you want to consider. + * default: [] + * https://github.com/algolia/algoliasearch-client-js#altcorrections + */ + altCorrections?: {}[]; + /** + * Configure the precision of the proximity ranking criterion + * default: 1 + * https://github.com/algolia/algoliasearch-client-js#minproximity + */ + minProximity?: number; + /** + * This is an advanced use-case to define a token substitutable by a list of words without having the original token searchable + * default: '' + * https://github.com/algolia/algoliasearch-client-js#placeholders + */ + placeholders?: any; + } + + interface Response { + /** + * Contains all the hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hits: any[]; + /** + * Current page + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + page: number; + /** + * Number of total hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbHits: number; + /** + * Number of pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbPages: number; + /** + * Number of hits per pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hitsPerPage: number; + /** + * Engine processing time (excluding network transfer) + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + processingTimeMS: number; + /** + * Query used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + query: string; + /** + * GET parameters used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + params: string; + facets?: { + [facetName: string]: { [facetValue: string]: number }; + }; + } + + interface MultiResponse { + results: Response[]; } } @@ -1929,5 +1820,5 @@ declare function algoliasearch( applicationId: string, apiKey: string, options?: algoliasearch.ClientOptions -): algoliasearch.AlgoliaClient; +): algoliasearch.Client; export = algoliasearch; diff --git a/types/algoliasearch/lite/index.d.ts b/types/algoliasearch/lite/index.d.ts new file mode 100644 index 0000000000..b9932f1346 --- /dev/null +++ b/types/algoliasearch/lite/index.d.ts @@ -0,0 +1,626 @@ +// Type definitions for algoliasearch-client-js 3.27.0 +// Project: https://github.com/algolia/algoliasearch-client-js +// Definitions by: Baptiste Coquelle +// Haroen Viaene +// Aurélien Hervé +// Samuel Vaillant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace algoliasearch { + /* + Interface for the algolia client object + */ + interface Client { + /** + * Initialization of the index + * https://github.com/algolia/algoliasearch-client-js#init-index---initindex + */ + initIndex(indexName: string): Index; + /** + * Query on multiple index + * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries + */ + search( + queries: { + indexName: string; + query: string; + params: QueryParameters; + }[], + cb: (err: Error, res: MultiResponse) => void + ): void; + /** + * Query on multiple index + * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries + */ + search( + queries: { + indexName: string; + query: string; + params: QueryParameters; + }[] + ): Promise; + /** + * Query for facet values of a specific facet + */ + searchForFacetValues( + queries: [{ indexName: string; params: SearchForFacetValues.Parameters }] + ): Promise; + /** + * clear browser cache + * https://github.com/algolia/algoliasearch-client-js#cache + */ + clearCache(): void; + /** + * Add a header to be sent with all upcoming requests + */ + setExtraHeader(name: string, value: string): void; + /** + * Get the value of an extra header + */ + getExtraHeader(name: string): string; + /** + * remove an extra header for all upcoming requests + */ + unsetExtraHeader(name: string): void; + } + /** + * Interface for the index algolia object + */ + interface Index { + indexName: string; + /** + * Gets a specific object + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObject(objectID: string, cb: (err: Error, res: {}) => void): void; + /** + * Gets specific attributes from an object + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObject( + objectID: string, + attributes: string[], + cb: (err: Error, res: {}) => void + ): void; + /** + * Gets a list of objects + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObjects( + objectIDs: string[], + cb: (err: Error, res: { results: {}[] }) => void + ): void; + /** + * Gets a list of objects + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObjects(objectIDs: string[]): Promise<{ results: {}[] }>; + /** + * Clear cache of an index + * https://github.com/algolia/algoliasearch-client-js#cache + */ + clearCache(): void; + /** + * Search in an index + * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search + */ + search( + params: QueryParameters, + cb: (err: Error, res: Response) => void + ): void; + /** + * Search in an index + * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search + */ + search(params: QueryParameters): Promise; + /** + * Search in an index + * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ + */ + searchForFacetValues( + options: SearchForFacetValues.Parameters + ): Promise; + /** + * Search in an index + * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ + */ + searchForFacetValues( + options: SearchForFacetValues.Parameters, + cb: (err: Error, res: SearchForFacetValues.Response) => void + ): void; + /** + * Browse an index + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browse(query: string, cb: (err: Error, res: BrowseResponse) => void): void; + /** + * Browse an index + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browse(query: string): Promise; + /** + * Browse an index from a cursor + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browseFrom( + cursor: string, + cb: (err: Error, res: BrowseResponse) => void + ): void; + /** + * Browse an index from a cursor + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browseFrom(cursor: string): Promise; + } + /** + * Interface describing available options when initializing a client + */ + interface ClientOptions { + /** + * Timeout for requests to our servers, in milliseconds + * default: 15s (node), 2s (browser) + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + timeout?: number; + /** + * Protocol to use when communicating with algolia + * default: current protocol(browser), https(node) + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + protocol?: string; + /** + * (node only) httpAgent instance to use when communicating with servers. + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + httpAgent?: any; + /** + * read: array of read hosts to use to call servers, computed automatically + * write: array of read hosts to use to call servers, computed automatically + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + hosts?: { read?: string[]; write?: string[] }; + } + interface BrowseResponse { + cursor?: string; + hits: {}[]; + params: string; + query: string; + processingTimeMS: number; + } + + interface QueryParameters { + /** + * Query string used to perform the search + * default: '' + * https://github.com/algolia/algoliasearch-client-js#query + */ + query?: string; + /** + * Filter the query with numeric, facet or/and tag filters + * default: "" + * https://github.com/algolia/algoliasearch-client-js#filters + */ + filters?: string; + /** + * A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer. + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoretrieve + */ + attributesToRetrieve?: string[]; + /** + * List of attributes you want to use for textual search + * default: attributeToIndex + * https://github.com/algolia/algoliasearch-client-js#restrictsearchableattributes + */ + restrictSearchableAttributes?: string[]; + /** + * You can use facets to retrieve only a part of your attributes declared in attributesForFaceting attributes + * default: "" + * https://github.com/algolia/algoliasearch-client-js#facets + */ + facets?: string; + /** + * Limit the number of facet values returned for each facet. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet + */ + maxValuesPerFacet?: number; + /** + * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestohighlight + */ + attributesToHighlight?: string[]; + /** + * Default list of attributes to snippet alongside the number of words to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestosnippet + */ + attributesToSnippet?: string[]; + /** + * Specify the string that is inserted before the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightpretag + */ + highlightPreTag?: string; + /** + * Specify the string that is inserted after the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + highlightPostTag?: string; + /** + * String used as an ellipsis indicator when a snippet is truncated. + * default: … + * https://github.com/algolia/algoliasearch-client-js#snippetellipsistext + */ + snippetEllipsisText?: string; + /** + * If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets + * default: false + * https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays + */ + restrictHighlightAndSnippetArrays?: boolean; + /** + * Pagination parameter used to select the number of hits per page + * default: 20 + * https://github.com/algolia/algoliasearch-client-js#hitsperpage + */ + hitsPerPage?: number; + /** + * Pagination parameter used to select the page to retrieve. + * default: 0 + * https://github.com/algolia/algoliasearch-client-js#page + */ + page?: number; + /** + * Offset of the first hit to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#offset + */ + offset?: number; + /** + * Number of hits to return. + * default: null + * https://github.com/algolia/algoliasearch-client-js#length + */ + length?: number; + /** + * The minimum number of characters needed to accept one typo. + * default: 4 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo + */ + minWordSizefor1Typo?: number; + /** + * The minimum number of characters needed to accept two typo. + * fault: 8 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor2typos + */ + minWordSizefor2Typos?: number; + /** + * This option allows you to control the number of typos allowed in the result set: + * default: true + * 'true' The typo tolerance is enabled and all matching hits are retrieved + * 'false' The typo tolerance is disabled. All results with typos will be hidden. + * 'min' Only keep results with the minimum number of typos + * 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos. + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor2typos + */ + typoTolerance?: boolean; + /** + * If set to false, disables typo tolerance on numeric tokens (numbers). + * default: + * https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens + */ + allowTyposOnNumericTokens?: boolean; + /** + * If set to true, plural won't be considered as a typo + * default: false + * https://github.com/algolia/algoliasearch-client-js#ignoreplurals + */ + ignorePlurals?: boolean; + /** + * List of attributes on which you want to disable typo tolerance + * default: "" + * https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes + */ + disableTypoToleranceOnAttributes?: string; + /** + * Search for entries around a given location + * default: "" + * https://github.com/algolia/algoliasearch-client-js#aroundlatlng + */ + aroundLatLng?: string; + /** + * Search for entries around a given latitude/longitude automatically computed from user IP address. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#aroundlatlngviaip + */ + aroundLatLngViaIP?: string; + /** + * Control the radius associated with a geo search. Defined in meters. + * default: null + * You can specify aroundRadius=all if you want to compute the geo distance without filtering in a geo area + * https://github.com/algolia/algoliasearch-client-js#aroundradius + */ + aroundRadius?: number | 'all'; + /** + * Control the precision of a geo search + * default: null + * https://github.com/algolia/algoliasearch-client-js#aroundprecision + */ + aroundPrecision?: number; + /** + * Define the minimum radius used for a geo search when aroundRadius is not set. + * default: null + * https://github.com/algolia/algoliasearch-client-js#minimumaroundradius + */ + minimumAroundRadius?: number; + /** + * Search entries inside a given area defined by the two extreme points of a rectangle + * default: null + * https://github.com/algolia/algoliasearch-client-js#insideboundingbox + */ + insideBoundingBox?: number[][]; + /** + * Selects how the query words are interpreted + * default: 'prefixLast' + * 'prefixAll' All query words are interpreted as prefixes. This option is not recommended. + * 'prefixLast' Only the last word is interpreted as a prefix (default behavior). + * 'prefixNone' No query word is interpreted as a prefix. This option is not recommended. + * https://github.com/algolia/algoliasearch-client-js#querytype + */ + queryType?: any; + /** + * Search entries inside a given area defined by a set of points + * defauly: '' + * https://github.com/algolia/algoliasearch-client-js#insidepolygon + */ + insidePolygon?: number[][]; + /** + * This option is used to select a strategy in order to avoid having an empty result page + * default: 'none' + * 'lastWords' When a query does not return any results, the last word will be added as optional + * 'firstWords' When a query does not return any results, the first word will be added as optional + * 'allOptional' When a query does not return any results, a second trial will be made with all words as optional + * 'none' No specific processing is done when a query does not return any results + * https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults + */ + removeWordsIfNoResults?: string; + /** + * Enables the advanced query syntax + * default: false + * https://github.com/algolia/algoliasearch-client-js#advancedsyntax + */ + advancedSyntax?: boolean; + /** + * A string that contains the comma separated list of words that should be considered as optional when found in the query + * default: [] + * https://github.com/algolia/algoliasearch-client-js#optionalwords + */ + optionalWords?: string[]; + /** + * Remove stop words from the query before executing it + * default: false + * true|false: enable or disable stop words for all 41 supported languages; or + * a list of language ISO codes (as a comma-separated string) for which stop words should be enable + * https://github.com/algolia/algoliasearch-client-js#removestopwords + */ + removeStopWords?: string[]; + /** + * List of attributes on which you want to disable the computation of exact criteria + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableexactonattributes + */ + disableExactOnAttributes?: string[]; + /** + * This parameter control how the exact ranking criterion is computed when the query contains one word + * default: attribute + * 'none': no exact on single word query + * 'word': exact set to 1 if the query word is found in the record + * 'attribute': exact set to 1 if there is an attribute containing a string equals to the query + * https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery + */ + exactOnSingleWordQuery?: string; + /** + * Specify the list of approximation that should be considered as an exact match in the ranking formula + * default: ['ignorePlurals', 'singleWordSynonym'] + * 'ignorePlurals': alternative words added by the ignorePlurals feature + * 'singleWordSynonym': single-word synonym (For example "NY" = "NYC") + * 'multiWordsSynonym': multiple-words synonym + * https://github.com/algolia/algoliasearch-client-js#alternativesasexact + */ + alternativesAsExact?: any; + /** + * If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set. + * https://github.com/algolia/algoliasearch-client-js#distinct + */ + distinct?: any; + /** + * If set to true, the result hits will contain ranking information in the _rankingInfo attribute. + * default: false + * https://github.com/algolia/algoliasearch-client-js#getrankinginfo + */ + getRankingInfo?: boolean; + /** + * All numerical attributes are automatically indexed as numerical filters + * default: '' + * https://github.com/algolia/algoliasearch-client-js#numericattributestoindex + */ + numericAttributesToIndex?: string[]; + /** + * @deprecated please use filters instead + * A string that contains the comma separated list of numeric filters you want to apply. + * https://github.com/algolia/algoliasearch-client-js#numericfilters-deprecated + */ + numericFilters?: string[]; + /** + * @deprecated + * Filter the query by a set of tags. + * https://github.com/algolia/algoliasearch-client-js#tagfilters-deprecated + */ + tagFilters?: string; + /** + * @deprecated + * Filter the query by a set of facets. + * https://github.com/algolia/algoliasearch-client-js#facetfilters-deprecated + */ + facetFilters?: string; + /** + * If set to false, this query will not be taken into account in the analytics feature. + * default true + * https://github.com/algolia/algoliasearch-client-js#analytics + */ + analytics?: boolean; + /** + * If set, tag your query with the specified identifiers + * default: null + * https://github.com/algolia/algoliasearch-client-js#analyticstags + */ + analyticsTags?: string[]; + /** + * If set to false, the search will not use the synonyms defined for the targeted index. + * default: true + * https://github.com/algolia/algoliasearch-client-js#synonyms + */ + synonyms?: boolean; + /** + * If set to false, words matched via synonym expansion will not be replaced by the matched synonym in the highlighted result. + * default: true + * https://github.com/algolia/algoliasearch-client-js#replacesynonymsinhighlight + */ + replaceSynonymsInHighlight?: boolean; + /** + * Configure the precision of the proximity ranking criterion + * default: 1 + * https://github.com/algolia/algoliasearch-client-js#minproximity + */ + minProximity?: number; + + nbShards?: number; + userData?: string | object; + } + + interface AlgoliaResponse { + /** + * Contains all the hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hits: any[]; + /** + * Current page + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + page: number; + /** + * Number of total hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbHits: number; + /** + * Number of pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbPage: number; + /** + * Number of hits per pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hitsPerPage: number; + /** + * Engine processing time (excluding network transfer) + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + processingTimeMS: number; + /** + * Query used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + query: string; + /** + * GET parameters used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + params: string; + facets: { + [facetName: string]: { [facetValue: string]: number }; + }; + } + + namespace SearchForFacetValues { + interface Parameters extends QueryParameters { + /** + * The facet to search in + */ + facetName: string; + /** + * The query for the search in this facet + */ + facetQuery: string; + } + + interface Response { + facetHits: { value: string; highlighted: string; count: number }[]; + exhaustiveFacetsCount: boolean; + processingTimeMS: number; + } + } + + interface Response { + /** + * Contains all the hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hits: any[]; + /** + * Current page + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + page: number; + /** + * Number of total hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbHits: number; + /** + * Number of pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbPages: number; + /** + * Number of hits per pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hitsPerPage: number; + /** + * Engine processing time (excluding network transfer) + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + processingTimeMS: number; + /** + * Query used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + query: string; + /** + * GET parameters used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + params: string; + facets?: { + [facetName: string]: { [facetValue: string]: number }; + }; + } + + interface MultiResponse { + results: Response[]; + } +} + +declare function algoliasearch( + applicationId: string, + apiKey: string, + options?: algoliasearch.ClientOptions +): algoliasearch.Client; +export = algoliasearch; diff --git a/types/algoliasearch/tsconfig.json b/types/algoliasearch/tsconfig.json index 3358732ba3..9a8a2a623c 100644 --- a/types/algoliasearch/tsconfig.json +++ b/types/algoliasearch/tsconfig.json @@ -18,6 +18,7 @@ }, "files": [ "index.d.ts", + "lite/index.d.ts", "algoliasearch-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/amazon-cognito-auth-js/index.d.ts b/types/amazon-cognito-auth-js/index.d.ts new file mode 100644 index 0000000000..d828fccfc8 --- /dev/null +++ b/types/amazon-cognito-auth-js/index.d.ts @@ -0,0 +1,577 @@ +// Type definitions for amazon-cognito-auth-js 1.2 +// Project: https://github.com/aws/amazon-cognito-auth-js +// Definitions by: Scott Escue +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/* + * Create global variable to provide access to types when used without module + * loading. + */ +export as namespace AmazonCognitoIdentity; + +// Stubs the XDomainRequest built-in from older IE browsers, does not follow the project's interface naming convention +export interface XDomainRequest { + readonly responseText: string; + timeout: number; + onprogress: () => void; + ontimeout: () => void; + onerror: () => void; + onload: () => void; + + open(method: string, url: string): void; + send(data: string): void; + abort(): void; +} + +export interface CognitoSessionData { + /** + * The session's Id token. + */ + IdToken?: CognitoIdToken; + + /** + * The session's refresh token. + */ + RefreshToken?: CognitoRefreshToken; + + /** + * The session's access token. + */ + AccessToken?: CognitoAccessToken; + + /** + * The session's token scopes. + */ + TokenScopes?: CognitoTokenScopes; + + /** + * The session's state. + */ + State?: string; +} + +export interface CognitoAuthOptions { + /** + * Required: User pool application client id. + */ + ClientId: string; + + /** + * Required: The application/user-pools Cognito web hostname,this is set at the Cognito console. + */ + AppWebDomain: string; + + /** + * Optional: The token scopes + */ + TokenScopesArray?: ReadonlyArray; + + /** + * Required: Required: The redirect Uri, which will be launched after authentication as signed in. + */ + RedirectUriSignIn: string; + + /** + * Required: The redirect Uri, which will be launched when signed out. + */ + RedirectUriSignOut: string; + + /** + * Optional: Pre-selected identity provider (this allows to automatically trigger social provider authentication flow). + */ + IdentityProvider?: string; + + /** + * Optional: UserPoolId for the configured cognito userPool. + */ + UserPoolId?: string; + + /** + * Optional: boolean flag indicating if the data collection is enabled to support cognito advanced security features. By default, this flag is set to true. + */ + AdvancedSecurityDataCollectionFlag?: boolean; +} + +export interface CognitoAuthUserHandler { + onSuccess: (authSession: CognitoAuthSession) => void; + onFailure: (err: any) => void; +} + +export interface CognitoConstants { + DOMAIN_SCHEME: string; + DOMAIN_PATH_SIGNIN: string; + DOMAIN_PATH_TOKEN: string; + DOMAIN_PATH_SIGNOUT: string; + DOMAIN_QUERY_PARAM_REDIRECT_URI: string; + DOMAIN_QUERY_PARAM_SIGNOUT_URI: string; + DOMAIN_QUERY_PARAM_RESPONSE_TYPE: string; + DOMAIN_QUERY_PARAM_IDENTITY_PROVIDER: string; + DOMAIN_QUERY_PARAM_USERCONTEXTDATA: string; + CLIENT_ID: string; + STATE: string; + SCOPE: string; + TOKEN: string; + CODE: string; + POST: string; + PARAMETERERROR: string; + SCOPETYPEERROR: string; + QUESTIONMARK: string; + POUNDSIGN: string; + COLONDOUBLESLASH: string; + SLASH: string; + AMPERSAND: string; + EQUALSIGN: string; + SPACE: string; + CONTENTTYPE: string; + CONTENTTYPEVALUE: string; + AUTHORIZATIONCODE: string; + IDTOKEN: string; + ACCESSTOKEN: string; + REFRESHTOKEN: string; + ERROR: string; + ERROR_DESCRIPTION: string; + STRINGTYPE: string; + STATELENGTH: number; + STATEORIGINSTRING: string; + WITHCREDENTIALS: string; + UNDEFINED: string; + SELF: string; + HOSTNAMEREGEX: RegExp; + QUERYPARAMETERREGEX1: RegExp; + QUERYPARAMETERREGEX2: RegExp; + HEADER: { 'Content-Type': string }; +} + +export class CognitoIdToken { + /** + * Constructs a new CognitoIdToken object + * @param IdToken The JWT Id token + */ + constructor(IdToken: string); + + /** + * @returns the record's token. + */ + getJwtToken(): string; + + /** + * Sets new value for id token. + * @param idToken The JWT Id token + */ + setJwtToken(idToken: string): void; + + /** + * @returns the token's expiration (exp member). + */ + getExpiration(): number; + + /** + * @returns the token's payload. + */ + decodePayload(): object; +} + +export class CognitoRefreshToken { + /** + * Constructs a new CognitoRefreshToken object + * @param RefreshToken The JWT refresh token. + */ + constructor(RefreshToken: string); + + /** + * @returns the record's token. + */ + getToken(): string; + + /** + * Sets new value for refresh token. + * @param refreshToken The JWT refresh token. + */ + setToken(refreshToken: string): void; +} + +export class CognitoAccessToken { + /** + * Constructs a new CognitoAccessToken object + * @param AccessToken The JWT access token. + */ + constructor(AccessToken: string); + + /** + * @returns the record's token. + */ + getJwtToken(): string; + + /** + * Sets new value for access token. + * @param accessToken The JWT access token. + */ + setJwtToken(accessToken: string): void; + + /** + * @returns the token's expiration (exp member). + */ + getExpiration(): number; + + /** + * @returns the username from payload. + */ + getUsername(): string; + + /** + * @returns the token's payload. + */ + decodePayload(): object; +} + +export class CognitoTokenScopes { + /** + * Constructs a new CognitoTokenScopes object + * @param TokenScopesArray The token scopes + */ + constructor(TokenScopesArray: ReadonlyArray); + + /** + * @returns the token scopes. + */ + getScopes(): string[]; + + /** + * Sets new value for token scopes. + * @param tokenScopes The token scopes + */ + setTokenScopes(tokenScopes: ReadonlyArray): void; +} + +export class CognitoAuthSession { + /** + * Constructs a new CognitoUserSession object + * @param sessionData The session's tokens, scopes, and state. + */ + constructor(sessionData: CognitoSessionData); + + /** + * @returns the session's Id token + */ + getIdToken(): CognitoIdToken; + + /** + * Set a new Id token + * @param IdToken The session's Id token. + */ + setIdToken(IdToken: CognitoIdToken): void; + + /** + * @returns the session's refresh token + */ + getRefreshToken(): CognitoRefreshToken; + + /** + * Set a new Refresh token + * @param RefreshToken The session's refresh token. + */ + setRefreshToken(RefreshToken: CognitoRefreshToken): void; + + /** + * @returns the session's access token + */ + getAccessToken(): CognitoAccessToken; + + /** + * Set a new Access token + * @param AccessToken The session's access token. + */ + setAccessToken(AccessToken: CognitoAccessToken): void; + + /** + * @returns the session's token scopes + */ + getTokenScopes(): CognitoTokenScopes; + + /** + * Set new token scopes + * @param tokenScopes The session's token scopes. + */ + setTokenScopes(tokenScopes: CognitoTokenScopes): void; + + /** + * @returns the session's state + */ + getState(): string; + + /** + * Set new state + * @param state The session's state. + */ + setState(State: string): void; + + /** + * Checks to see if the session is still valid based on session expiry information found + * in Access and Id Tokens and the current time + * @returns if the session is still valid + */ + isValid(): boolean; +} + +export class CognitoAuth { + /** + * Called on success or error. + */ + userhandler: CognitoAuthUserHandler; + + /** + * Constructs a new CognitoAuth object + * @param options Creation options + */ + constructor(options: CognitoAuthOptions); + + /** + * @returns the constants + */ + getCognitoConstants(): CognitoConstants; + + /** + * @returns the client id + */ + getClientId(): string; + + /** + * @returns the app web domain + */ + getAppWebDomain(): string; + + /** + * method for getting the current user of the application from the local storage + * + * @returns the user retrieved from storage + */ + getCurrentUser(): string; + + /** + * method for setting the current user's name + * @param Username the user's name + */ + setUser(Username: string): void; + + /** + * sets response type to 'code' + */ + useCodeGrantFlow(): void; + + /** + * sets response type to 'token' + */ + useImplicitFlow(): void; + + /** + * @returns the current session for this user + */ + getSignInUserSession(): CognitoAuthSession; + + /** + * @returns the user's username + */ + getUsername(): string; + + /** + * @param Username the user's username + */ + setUsername(Username: string): void; + + /** + * @returns the user's state + */ + getState(): string; + + /** + * @param State the user's state + */ + setState(State: string): void; + + /** + * This is used to get a session, either from the session object or from the local storage, or by using a refresh token + * @param RedirectUriSignIn Required: The redirect Uri, which will be launched after authentication. + * @param TokenScopesArray Required: The token scopes, it is an array of strings specifying all scopes for the tokens. + */ + getSession(): void; + + /** + * Parse the http request response and proceed according to different response types. + * @param httpRequestResponse the http request response + */ + parseCognitoWebResponse(httpRequestResponse: string): void; + + /** + * Get the query parameter map and proceed according to code response type. + * @param Query parameter map + */ + getCodeQueryParameter(map: ReadonlyMap): void; + + /** + * Get the query parameter map and proceed according to token response type. + * @param Query parameter map + */ + getTokenQueryParameter(map: ReadonlyMap): void; + + /** + * Get cached tokens and scopes and return a new session using all the cached data. + * @returns the auth session + */ + getCachedSession(): CognitoAuthSession; + + /** + * This is used to get last signed in user from local storage + * @returns the last user name + */ + getLastUser(): string; + + /** + * This is used to save the session tokens and scopes to local storage. + */ + cacheTokensScopes(): void; + + /** + * Compare two sets if they are identical. + * @param set1 one set + * @param set2 the other set + * @returns boolean value is true if two sets are identical + */ + compareSets(set1: ReadonlySet, set2: ReadonlySet): boolean; + + /** + * Get the hostname from url. + * @param url the url string + * @returns hostname string + */ + getHostName(url: string): string; + + /** + * Get http query parameters and return them as a map. + * @param url the url string + * @param splitMark query parameters split mark (prefix) + * @returns map + */ + getQueryParameters(url: string, splitMark: string): Map; + + /** + * helper function to generate a random string + * @param length the length of string + * @param chars a original string + * @returns a random value. + */ + generateRandomString(length: number, chars: string): string; + + /** + * This is used to clear the session tokens and scopes from local storage + */ + clearCachedTokensScopes(): void; + + /** + * This is used to build a user session from tokens retrieved in the authentication result + * @param refreshToken Successful auth response from server. + */ + refreshSession(refreshToken: string): void; + + /** + * Make the http POST request. + * @param header header JSON object + * @param body body JSON object + * @param url string + * @param onSuccess callback + * @param onFailure callback + */ + makePOSTRequest(header: object, body: object, url: string, + onSuccess: (responseText: string) => void, + onFailure: (responseText: string) => void): void; + + /** + * Create the XHR object + * @param method which method to call + * @param url the url string + * @returns xhr + */ + createCORSRequest(method: string, url: string): XMLHttpRequest | XDomainRequest; + + /** + * The http POST request onFailure callback. + * @param err the error object + */ + onFailure(err: any): void; + + /** + * The http POST request onSuccess callback when refreshing tokens. + * @param jsonData tokens + */ + onSuccessRefreshToken(jsonData: string): void; + + /** + * The http POST request onSuccess callback when exchanging code for tokens. + * @param jsonData tokens + */ + onSuccessExchangeForToken(jsonData: string): void; + + /** + * Launch Cognito Auth UI page. + * @param URL the url to launch + */ + launchUri(URL: string): void; + + /** + * @returns scopes string + */ + getSpaceSeperatedScopeString(): string; + + /** + * Create the FQDN(fully qualified domain name) for authorization endpoint. + * @returns url + */ + getFQDNSignIn(): string; + + /** + * Sign out the user. + */ + signOut(): void; + + /** + * Create the FQDN(fully qualified domain name) for signout endpoint. + * @returns url + */ + getFQDNSignOut(): string; + + /** + * This method returns the encoded data string used for cognito advanced security feature. + * This would be generated only when developer has included the JS used for collecting the + * data on their client. Please refer to documentation to know more about using AdvancedSecurity + * features + */ + getUserContextData(): string; + + /** + * Helper method to let the user know if he has either a valid cached session + * or a valid authenticated session from the app integration callback. + * @returns userSignedIn + */ + isUserSignedIn(): boolean; +} + +export class DateHelper { + /** + * @returns The current time in "ddd MMM D HH:mm:ss UTC YYYY" format. + */ + getNowString(): string; +} + +export class StorageHelper { + /** + * This is used to get a storage object + * @returns the storage + */ + constructor(); + + /** + * This is used to return the storage + * @returns the storage + */ + getStorage(): Storage; +} diff --git a/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-tests.ts b/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-tests.ts new file mode 100644 index 0000000000..42e58185e4 --- /dev/null +++ b/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-tests.ts @@ -0,0 +1,162 @@ +import * as lib from 'amazon-cognito-auth-js'; + +const idToken: lib.CognitoIdToken = new lib.CognitoIdToken('fak3T0ken1=='); +idToken.decodePayload(); // $ExpectType object +idToken.setJwtToken('fak3T0ken2=='); // $ExpectType void +idToken.getJwtToken(); // $ExpectType string +idToken.getExpiration(); // $ExpectType number + +const refreshToken: lib.CognitoRefreshToken = new lib.CognitoRefreshToken('refreshplease=='); +refreshToken.setToken('refreshagainplease=='); // $ExpectType void +refreshToken.getToken(); // $ExpectType string + +const accessToken: lib.CognitoAccessToken = new lib.CognitoAccessToken('fak3T0ken3=='); +accessToken.decodePayload(); // $ExpectType object +accessToken.setJwtToken('fak3T0ken4=='); // $ExpectType void +accessToken.getJwtToken(); // $ExpectType string +accessToken.getExpiration(); // $ExpectType number +accessToken.getUsername(); // $ExpectType string + +const tokenScopes: lib.CognitoTokenScopes = new lib.CognitoTokenScopes(['email', 'custom1']); +tokenScopes.setTokenScopes(['openid']); // $ExpectType void +tokenScopes.getScopes(); // $ExpectType string[] + +let sessionData: lib.CognitoSessionData = {}; +let authSession: lib.CognitoAuthSession = new lib.CognitoAuthSession(sessionData); + +sessionData = { + IdToken: idToken, + RefreshToken: refreshToken, + AccessToken: accessToken, + TokenScopes: tokenScopes, + State: '/myapp/home' +}; +authSession = new lib.CognitoAuthSession(sessionData); + +authSession.setIdToken(new lib.CognitoIdToken('fak3T0ken5==')); // $ExpectType void +authSession.setRefreshToken(new lib.CognitoRefreshToken('refreshmeyetagain==')); // $ExpectType void +authSession.setAccessToken(new lib.CognitoAccessToken('fak3T0ken6==')); // $ExpectType void +authSession.setTokenScopes(new lib.CognitoTokenScopes(['email'])); // $ExpectType void +authSession.setState('/myapp/login'); // $ExpectType void +authSession.getIdToken(); // $ExpectType CognitoIdToken +authSession.getRefreshToken(); // $ExpectType CognitoRefreshToken +authSession.getAccessToken(); // $ExpectType CognitoAccessToken +authSession.getTokenScopes(); // $ExpectType CognitoTokenScopes +authSession.getState(); // $ExpectType string + +let authOptions: lib.CognitoAuthOptions = { + ClientId: '1a2b3c4d5e6f7g', + AppWebDomain: 'myapp.auth.us-east-1.amazoncognito.com', + RedirectUriSignIn: 'https://myapp.com/login', + RedirectUriSignOut: 'https://myapp.com/logout' +}; +let auth: lib.CognitoAuth = new lib.CognitoAuth(authOptions); + +authOptions = { + ClientId: '1a2b3c4d5e6f7g', + AppWebDomain: 'myapp.auth.us-east-1.amazoncognito.com', + TokenScopesArray: ['email', 'openid'], + RedirectUriSignIn: 'https://myapp.com/login', + RedirectUriSignOut: 'https://myapp.com/logout', + IdentityProvider: 'Facebook', + UserPoolId: 'us-east-1_faKE4ReAl', + AdvancedSecurityDataCollectionFlag: true +}; +auth = new lib.CognitoAuth(authOptions); + +auth.getClientId(); // $ExpectType string +auth.getAppWebDomain(); // $ExpectType string +auth.getCurrentUser(); // $ExpectType string +auth.setUser('jane.doe'); // $ExpectType void +auth.useCodeGrantFlow(); // $ExpectType void +auth.useImplicitFlow(); // $ExpectType void +auth.getSignInUserSession(); // $ExpectType CognitoAuthSession +auth.getUsername(); // $ExpectType string +auth.setUsername('john.doe'); // $ExpectType void +auth.getState(); // $ExpectType string +auth.setState('/myhost/default.htm'); // $ExpectType void +auth.getSession(); // $ExpectType void +auth.parseCognitoWebResponse('url&stuff=true'); // $ExpectType void +auth.getCodeQueryParameter(new Map()); // $ExpectType void +auth.getTokenQueryParameter(new Map()); // $ExpectType void +auth.getCachedSession(); // $ExpectType CognitoAuthSession +auth.getLastUser(); // $ExpectType string +auth.cacheTokensScopes(); // $ExpectType void +auth.compareSets(new Set(['1']), new Set(['1'])); // $ExpectType boolean +auth.getHostName('https://site.com/page?size=10'); // $ExpectType string +auth.getQueryParameters('http://site.com?1=1&2=2', '?'); // $ExpectType Map +auth.generateRandomString(5, '159erf'); // $ExpectType string +auth.clearCachedTokensScopes(); // $ExpectType void +auth.refreshSession('refreshToken=='); // $ExpectType void +// $ExpectType void +auth.makePOSTRequest({ 'Content-Type': 'application/json' }, { pool: '2' }, + 'https://auth.com/signin', + (data) => console.log(data), + (error) => console.log(error)); +auth.createCORSRequest('POST', '/myapp/login'); // $ExpectType XMLHttpRequest | XDomainRequest +auth.onFailure('request failed'); // $ExpectType void +auth.onSuccessRefreshToken('{"name":"John", "age":31}'); // $ExpectType void +auth.onSuccessExchangeForToken('{"name":"Jane", "age":30}'); // $ExpectType void +auth.launchUri('https://auth.com/login'); // $ExpectType void +auth.getSpaceSeperatedScopeString(); // $ExpectType string +auth.getFQDNSignIn(); // $ExpectType string +auth.signOut(); // $ExpectType void +auth.getFQDNSignOut(); // $ExpectType string +auth.getUserContextData(); // $ExpectType string +auth.isUserSignedIn(); // $ExpectType boolean + +const userHandler: lib.CognitoAuthUserHandler = { + onSuccess: (authSession: lib.CognitoAuthSession) => console.log(authSession), + onFailure: (error: any) => console.log(error) +}; +auth.userhandler = userHandler; + +const constants: lib.CognitoConstants = auth.getCognitoConstants(); +constants.DOMAIN_SCHEME; // $ExpectType string +constants.DOMAIN_PATH_SIGNIN; // $ExpectType string +constants.DOMAIN_PATH_TOKEN; // $ExpectType string +constants.DOMAIN_PATH_SIGNOUT; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_REDIRECT_URI; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_SIGNOUT_URI; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_RESPONSE_TYPE; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_IDENTITY_PROVIDER; // $ExpectType string +constants.DOMAIN_QUERY_PARAM_USERCONTEXTDATA; // $ExpectType string +constants.CLIENT_ID; // $ExpectType string +constants.STATE; // $ExpectType string +constants.SCOPE; // $ExpectType string +constants.TOKEN; // $ExpectType string +constants.CODE; // $ExpectType string +constants.POST; // $ExpectType string +constants.PARAMETERERROR; // $ExpectType string +constants.SCOPETYPEERROR; // $ExpectType string +constants.QUESTIONMARK; // $ExpectType string +constants.POUNDSIGN; // $ExpectType string +constants.COLONDOUBLESLASH; // $ExpectType string +constants.SLASH; // $ExpectType string +constants.AMPERSAND; // $ExpectType string +constants.EQUALSIGN; // $ExpectType string +constants.SPACE; // $ExpectType string +constants.CONTENTTYPE; // $ExpectType string +constants.CONTENTTYPEVALUE; // $ExpectType string +constants.AUTHORIZATIONCODE; // $ExpectType string +constants.IDTOKEN; // $ExpectType string +constants.ACCESSTOKEN; // $ExpectType string +constants.REFRESHTOKEN; // $ExpectType string +constants.ERROR; // $ExpectType string +constants.ERROR_DESCRIPTION; // $ExpectType string +constants.STRINGTYPE; // $ExpectType string +constants.STATELENGTH; // $ExpectType number +constants.STATEORIGINSTRING; // $ExpectType string +constants.WITHCREDENTIALS; // $ExpectType string +constants.UNDEFINED; // $ExpectType string +constants.SELF; // $ExpectType string +constants.HOSTNAMEREGEX; // $ExpectType RegExp +constants.QUERYPARAMETERREGEX1; // $ExpectType RegExp +constants.QUERYPARAMETERREGEX2; // $ExpectType RegExp +constants.HEADER['Content-Type']; // $ExpectType string + +const dateHelper: lib.DateHelper = new lib.DateHelper(); +dateHelper.getNowString(); // $ExpectType string + +const storageHelper: lib.StorageHelper = new lib.StorageHelper(); +storageHelper.getStorage(); // $ExpectType Storage diff --git a/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-umd-tests.ts b/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-umd-tests.ts new file mode 100644 index 0000000000..1e30dbbeb8 --- /dev/null +++ b/types/amazon-cognito-auth-js/test/amazon-cognito-auth-js-umd-tests.ts @@ -0,0 +1,22 @@ +AmazonCognitoIdentity.CognitoIdToken; // $ExpectType typeof CognitoIdToken +AmazonCognitoIdentity.CognitoRefreshToken; // $ExpectType typeof CognitoRefreshToken +AmazonCognitoIdentity.CognitoAccessToken; // $ExpectType typeof CognitoAccessToken +AmazonCognitoIdentity.CognitoTokenScopes; // $ExpectType typeof CognitoTokenScopes +AmazonCognitoIdentity.CognitoAuthSession; // $ExpectType typeof CognitoAuthSession +AmazonCognitoIdentity.CognitoAuth; // $ExpectType typeof CognitoAuth +AmazonCognitoIdentity.DateHelper; // $ExpectType typeof DateHelper +AmazonCognitoIdentity.StorageHelper; // $ExpectType typeof StorageHelper + +const sessionData: AmazonCognitoIdentity.CognitoSessionData = {}; +new AmazonCognitoIdentity.CognitoAuthSession(sessionData); + +const authOptions: AmazonCognitoIdentity.CognitoAuthOptions = { + ClientId: '1a2b3c4d5e6f7g', + AppWebDomain: 'myapp.auth.us-east-1.amazoncognito.com', + RedirectUriSignIn: 'https://myapp.com/login', + RedirectUriSignOut: 'https://myapp.com/logout' +}; +const auth = new AmazonCognitoIdentity.CognitoAuth(authOptions); +auth.userhandler; // $ExpectType CognitoAuthUserHandler +auth.getCognitoConstants(); // $ExpectType CognitoConstants +auth.createCORSRequest('', ''); // $ExpectType XMLHttpRequest | XDomainRequest diff --git a/types/amazon-cognito-auth-js/tsconfig.json b/types/amazon-cognito-auth-js/tsconfig.json new file mode 100644 index 0000000000..df5a9f2d73 --- /dev/null +++ b/types/amazon-cognito-auth-js/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/amazon-cognito-auth-js-tests.ts", + "test/amazon-cognito-auth-js-umd-tests.ts" + ] +} diff --git a/types/node-common-errors/tslint.json b/types/amazon-cognito-auth-js/tslint.json similarity index 100% rename from types/node-common-errors/tslint.json rename to types/amazon-cognito-auth-js/tslint.json diff --git a/types/analytics-node/analytics-node-tests.ts b/types/analytics-node/analytics-node-tests.ts index 5dfabb426c..6740aaccff 100644 --- a/types/analytics-node/analytics-node-tests.ts +++ b/types/analytics-node/analytics-node-tests.ts @@ -4,7 +4,9 @@ var analytics: Analytics; function testConfig(): void { analytics = new Analytics('YOUR_WRITE_KEY', { flushAt: 20, - flushAfter: 10000 + flushAfter: 10000, + host: "http://example.com", + enable: true }); } diff --git a/types/analytics-node/index.d.ts b/types/analytics-node/index.d.ts index a1de134195..6834087ff7 100644 --- a/types/analytics-node/index.d.ts +++ b/types/analytics-node/index.d.ts @@ -39,7 +39,9 @@ declare namespace AnalyticsNode { export class Analytics { constructor(writeKey: string, opts?: { flushAt?: number, - flushAfter?: number + flushAfter?: number, + host?: string, + enable?: boolean }); /* The identify method lets you tie a user to their actions and record diff --git a/types/angular-meteor/index.d.ts b/types/angular-meteor/index.d.ts index c842dd2cf0..11d782ee47 100644 --- a/types/angular-meteor/index.d.ts +++ b/types/angular-meteor/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Urigo/angular-meteor // Definitions by: Peter Grman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// @@ -101,7 +101,7 @@ declare module 'angular' { * @param [autoClientSave=true] - By default, changes in the Angular object will automatically update the Meteor object. * - However if set to false, changes in the client won't be automatically propagated back to the Meteor object. */ - object(collection: Mongo.Collection, selector: Mongo.Selector|Mongo.ObjectID|string, autoClientSave?: boolean): AngularMeteorObject; + object(collection: Mongo.Collection, selector: Mongo.Selector|Mongo.ObjectID|string, autoClientSave?: boolean): AngularMeteorObject; /** * A service which is a wrapper for Meteor.subscribe. It subscribes to a Meteor.publish method in the client and returns a AngularJS promise when ready. diff --git a/types/angular-translate/index.d.ts b/types/angular-translate/index.d.ts index 69b1f63d72..719fcb5d5c 100644 --- a/types/angular-translate/index.d.ts +++ b/types/angular-translate/index.d.ts @@ -1,11 +1,9 @@ // Type definitions for Angular Translate (pascalprecht.translate module) 2.15 // Project: https://github.com/PascalPrecht/angular-translate -// Definitions by: Michel Salib +// Definitions by: Michel Salib , Gabriel Gil // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// - declare var _: string; export = _; @@ -69,7 +67,7 @@ declare module 'angular' { versionInfo(): string; loaderCache(): any; isReady(): boolean; - onReady(): angular.IPromise; + onReady(fn?: () => void): angular.IPromise; resolveClientLocale(): string; getAvailableLanguageKeys(): string[]; } diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index ca9d2c7568..1dff1a0451 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -1138,7 +1138,8 @@ angular.module('multiSlotTranscludeExample', []) }; }); -angular.module('componentExample', []) +// $ExpectType IModule +const componentModule = angular.module('componentExample', []) .component('counter', { require: {ctrl: '^ctrl'}, bindings: { @@ -1160,6 +1161,16 @@ angular.module('componentExample', []) }, template: '', transclude: true + }) + .component({ + aThirdComponent: { + controller: class AThirdComponentController { + count: number; + }, + bindings: { + count: '=' + } + } }); interface ICopyExampleUser { diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 4c896eb430..6dccefc926 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -196,6 +196,12 @@ declare namespace angular { * @param options A definition object passed into the component. */ component(name: string, options: IComponentOptions): IModule; + /** + * Use this method to register a component. + * + * @param object Object map of components where the keys are the names and the values are the component definition objects + */ + component(object: {[componentName: string]: IComponentOptions}): IModule; /** * Use this method to register work which needs to be performed on module loading. * @@ -1028,7 +1034,7 @@ declare namespace angular { all(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise ]): IPromise<[T1, T2, T3, T4]>; all(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise]): IPromise<[T1, T2, T3]>; all(values: [T1 | IPromise, T2 | IPromise]): IPromise<[T1, T2]>; - all(promises: Array>): IPromise; + all(promises: Array>): IPromise; /** * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved. * @@ -1273,6 +1279,7 @@ declare namespace angular { directive(object: {[directiveName: string]: Injectable>}): ICompileProvider; component(name: string, options: IComponentOptions): ICompileProvider; + component(object: {[componentName: string]: IComponentOptions}): ICompileProvider; aHrefSanitizationWhitelist(): RegExp; aHrefSanitizationWhitelist(regexp: RegExp): ICompileProvider; diff --git a/types/ansi-styles/ansi-styles-tests.ts b/types/ansi-styles/ansi-styles-tests.ts index 235f98dce1..d1d21719b4 100644 --- a/types/ansi-styles/ansi-styles-tests.ts +++ b/types/ansi-styles/ansi-styles-tests.ts @@ -1,53 +1,52 @@ +import { EscapeCode } from './escape-code'; +import AnsiStyles = require('ansi-styles'); -import ansi = require('ansi-styles'); +let ansiStyles = AnsiStyles as any, + nsNames = ['modifier', 'color', 'bgColor'], + namespaces = { + modifier: ['reset', 'bold', 'dim', 'italic', 'underline', 'inverse', 'hidden', 'strikethrough'], + color: ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'gray', + 'redBright', 'greenBright', 'yellowBright', 'blueBright', 'magentaBright', 'cyanBright', 'whiteBright'], + bgColor: ['bgBlack', 'bgRed', 'bgGreen', 'bgYellow', 'bgBlue', 'bgMagenta', 'bgCyan', + 'bgBlackBright', 'bgRedBright', 'bgGreenBright', 'bgYellowBright', 'bgBlueBright', 'bgMagentaBright', 'bgCyanBright', 'bgWhiteBright'], + } as any, + styles = [...namespaces.modifier, ...namespaces.color, ...namespaces.bgColor], + codePair = ['open', 'close'], + codeTypes = ['ansi', 'ansi256', 'ansi16m'], + colorFormats = ['ansi', 'rgb', 'hsl', 'hsv', 'hwb', 'cmyk', 'xyz', 'lab', 'lch', 'hex', 'keyword', 'ansi256', 'hcg', 'apple', 'gray'], + codesMap = 'codes'; -var styles = [ - ansi.reset, +checkStyle(ansiStyles, styles); +nsNames.forEach(ns => checkStyle(ansiStyles[ns], namespaces[ns])); - ansi.bold, - ansi.dim, - ansi.italic, - ansi.underline, - ansi.inverse, - ansi.hidden, - ansi.strikethrough, +checkIsMap(ansiStyles[codesMap], `ansiStyles.${codesMap} not a Map.`); +nsNames.forEach(ns => checkExist(ansiStyles[ns], `ansiStyles.${ns} is not exist.`)); - ansi.black, - ansi.red, - ansi.green, - ansi.yellow, - ansi.blue, - ansi.magenta, - ansi.cyan, - ansi.white, - ansi.gray, +['color', 'bgColor'].forEach(ns => checkConverter(ns, ansiStyles[ns], colorFormats)); - ansi.bgBlack, - ansi.bgRed, - ansi.bgGreen, - ansi.bgYellow, - ansi.bgBlue, - ansi.bgMagenta, - ansi.bgCyan, - ansi.bgWhite -] -for (var key in styles) { - check(key, styles[key]) +function checkStyle(namespace: any, styles: string[]) { + styles.forEach(s => checkCodePair(s, namespace[s])); +} +function checkCodePair(styleName: string, pair: any): void { + codePair.forEach(p => checkIsString(pair[p], `${styleName}.${p} is not a string.`)); } -function check(key:string, escapeCodes:ansi.EscapeCodePair): void { - if (uninitialized(escapeCodes.open)) { - throw new Error('key not found ~> ' + key + '.open') - } - if (uninitialized(escapeCodes.close)) { - throw new Error('key not found ~> ' + key + '.close') - } +function checkConverter(nsName: string, namespace: any, formats: string[]) { + formats.forEach(f => codeTypes.forEach(t => checkIsFunction(namespace[t][f], `ansiStyles.${nsName}.${t}.${f} is not a function.`))); + checkIsString(namespace.close, `${namespace}.close is not a string.`); } -function uninitialized(val:any): boolean { - return val === null || val === undefined +function checkExist(val: any, failMsg: string): void { + if (val == null) throw new Error(failMsg); +} +function checkIsString(val: any, failMsg: string): void { + if(typeof val != 'string') throw new Error(failMsg); +} +function checkIsFunction(fn: any, failMsg: string): void { + if (typeof fn != 'function') throw new Error(failMsg); +} +function checkIsMap(map: any, failMsg: string): void { + if (!(map instanceof Map)) throw new Error(failMsg); } - - diff --git a/types/ansi-styles/escape-code.d.ts b/types/ansi-styles/escape-code.d.ts new file mode 100644 index 0000000000..e9b1fe9d42 --- /dev/null +++ b/types/ansi-styles/escape-code.d.ts @@ -0,0 +1,106 @@ +import * as cssKeywords from 'color-name'; + + +export namespace EscapeCode { + export interface CodePair { + open: string; + close: string; + } + + interface Modifier { + reset: CodePair; + bold: CodePair; + dim: CodePair; + /** + * Not widely supported + */ + italic: CodePair; + underline: CodePair; + inverse: CodePair; + hidden: CodePair; + /** + * Not widely supported + */ + strikethrough: CodePair; + } + interface Color { + black: CodePair; + red: CodePair; + green: CodePair; + yellow: CodePair; + blue: CodePair; + magenta: CodePair; + cyan: CodePair; + white: CodePair; + /** + * bright black + */ + gray: CodePair; + grey: CodePair; + + redBright: CodePair; + greenBright: CodePair; + yellowBright: CodePair; + blueBright: CodePair; + magentaBright: CodePair; + cyanBright: CodePair; + whiteBright: CodePair; + } + interface BackgroundColor { + bgBlack: CodePair; + bgRed: CodePair; + bgGreen: CodePair; + bgYellow: CodePair; + bgBlue: CodePair; + bgMagenta: CodePair; + bgCyan: CodePair; + bgWhite: CodePair; + + bgBlackBright: CodePair; + bgRedBright: CodePair; + bgGreenBright: CodePair; + bgYellowBright: CodePair; + bgBlueBright: CodePair; + bgMagentaBright: CodePair; + bgCyanBright: CodePair; + bgWhiteBright: CodePair; + } + + interface Conversions { + ansi: (ansi: number) => string + rgb: (r: number, g: number, b: number) => string + hsl: (h: number, s: number, l: number) => string + hsv: (h: number, s: number, v: number) => string + hwb: (h: number, w: number, b: number) => string + cmyk: (c: number, m: number, y: number, k: number) => string + xyz: (x: number, y: number, z: number) => string + lab: (l: number, a: number, b: number) => string + lch: (l: number, c: number, h: number) => string + hex: (hex: string) => string + /** + * color keyword in css to ansi code + */ + keyword: (keyword: keyof typeof cssKeywords) => string + ansi256: (ansi256: number) => string + hcg: (h: number, c: number, g: number) => string + /** + * apple RGB to ansi code + */ + apple: (r: number, g: number, b: number) => string + gray: (grayscale: number) => string + } + interface ColorType { + /** + * 16 color ansi code + */ + ansi: Conversions + /** + * 256 color ansi code + */ + ansi256: Conversions + /** + * truecolor(16 million color) ansi code + */ + ansi16m: Conversions + } +} diff --git a/types/ansi-styles/index.d.ts b/types/ansi-styles/index.d.ts index 4522ece77a..a07ac962ab 100644 --- a/types/ansi-styles/index.d.ts +++ b/types/ansi-styles/index.d.ts @@ -1,40 +1,74 @@ -// Type definitions for ansi-styles 2.0.1 +// Type definitions for ansi-styles 3.2.1 // Project: https://github.com/sindresorhus/ansi-styles // Definitions by: bryn austin bellomy +// plylrnsdy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +import { EscapeCode } from './escape-code'; -export interface EscapeCodePair { - open: string; - close: string; -} -export declare var reset: EscapeCodePair; +export const reset: EscapeCode.CodePair; +export const bold: EscapeCode.CodePair; +export const dim: EscapeCode.CodePair; +/** + * Not widely supported + */ +export const italic: EscapeCode.CodePair; +export const underline: EscapeCode.CodePair; +export const inverse: EscapeCode.CodePair; +export const hidden: EscapeCode.CodePair; +/** + * Not widely supported + */ +export const strikethrough: EscapeCode.CodePair; -export declare var bold: EscapeCodePair; -export declare var dim: EscapeCodePair; -export declare var italic: EscapeCodePair; -export declare var underline: EscapeCodePair; -export declare var inverse: EscapeCodePair; -export declare var hidden: EscapeCodePair; -export declare var strikethrough: EscapeCodePair; +export const black: EscapeCode.CodePair; +export const red: EscapeCode.CodePair; +export const green: EscapeCode.CodePair; +export const yellow: EscapeCode.CodePair; +export const blue: EscapeCode.CodePair; +export const magenta: EscapeCode.CodePair; +export const cyan: EscapeCode.CodePair; +export const white: EscapeCode.CodePair; +/** + * bright black + */ +export const gray: EscapeCode.CodePair; +export const grey: EscapeCode.CodePair; -export declare var black: EscapeCodePair; -export declare var red: EscapeCodePair; -export declare var green: EscapeCodePair; -export declare var yellow: EscapeCodePair; -export declare var blue: EscapeCodePair; -export declare var magenta: EscapeCodePair; -export declare var cyan: EscapeCodePair; -export declare var white: EscapeCodePair; -export declare var gray: EscapeCodePair; +export const redBright: EscapeCode.CodePair; +export const greenBright: EscapeCode.CodePair; +export const yellowBright: EscapeCode.CodePair; +export const blueBright: EscapeCode.CodePair; +export const magentaBright: EscapeCode.CodePair; +export const cyanBright: EscapeCode.CodePair; +export const whiteBright: EscapeCode.CodePair; -export declare var bgBlack: EscapeCodePair; -export declare var bgRed: EscapeCodePair; -export declare var bgGreen: EscapeCodePair; -export declare var bgYellow: EscapeCodePair; -export declare var bgBlue: EscapeCodePair; -export declare var bgMagenta: EscapeCodePair; -export declare var bgCyan: EscapeCodePair; -export declare var bgWhite: EscapeCodePair; +export const bgBlack: EscapeCode.CodePair; +export const bgRed: EscapeCode.CodePair; +export const bgGreen: EscapeCode.CodePair; +export const bgYellow: EscapeCode.CodePair; +export const bgBlue: EscapeCode.CodePair; +export const bgMagenta: EscapeCode.CodePair; +export const bgCyan: EscapeCode.CodePair; +export const bgWhite: EscapeCode.CodePair; + +export const bgBlackBright: EscapeCode.CodePair; +export const bgRedBright: EscapeCode.CodePair; +export const bgGreenBright: EscapeCode.CodePair; +export const bgYellowBright: EscapeCode.CodePair; +export const bgBlueBright: EscapeCode.CodePair; +export const bgMagentaBright: EscapeCode.CodePair; +export const bgCyanBright: EscapeCode.CodePair; +export const bgWhiteBright: EscapeCode.CodePair; + +/** + * Raw escape codes (i.e. without the CSI escape prefix \u001B[ and render mode postfix m) are available. + * + * This is a Map with the open codes as keys and close codes as values. + */ +export const codes: Map +export const modifier: EscapeCode.Modifier +export const color: EscapeCode.Color & EscapeCode.ColorType & { close: string } +export const bgColor: EscapeCode.BackgroundColor & EscapeCode.ColorType & { close: string } diff --git a/types/aphrodite/index.d.ts b/types/aphrodite/index.d.ts index 583e84e996..a82ec2f36b 100644 --- a/types/aphrodite/index.d.ts +++ b/types/aphrodite/index.d.ts @@ -12,13 +12,7 @@ type FontFamily = | BaseCSSProperties['fontFamily'] | CSS.FontFace; -// Replace with Exclude once on 2.8+ -type Diff = ( - & { [P in T]: P } - & { [P in U]: never } - & { [x: string]: never } -)[T]; -type Omit = Pick>; +type Omit = Pick; type CSSProperties = Omit & { fontFamily?: FontFamily | FontFamily[]; diff --git a/types/apicache/apicache-tests.ts b/types/apicache/apicache-tests.ts new file mode 100644 index 0000000000..1f9eb98dda --- /dev/null +++ b/types/apicache/apicache-tests.ts @@ -0,0 +1,17 @@ +import { middleware, newInstance, options } from 'apicache'; + +let cache = middleware; + +options({ + statusCodes: { + exclude: [404, 429, 500], + include: [200, 304] + } +}); + +cache = newInstance({ + statusCodes: { + exclude: [404, 429, 500], + include: [200, 304] + } +}); diff --git a/types/apicache/index.d.ts b/types/apicache/index.d.ts new file mode 100644 index 0000000000..b62fd7356d --- /dev/null +++ b/types/apicache/index.d.ts @@ -0,0 +1,77 @@ +// Type definitions for apicache 1.2 +// Project: https://github.com/kwhitley/apicache +// Definitions by: Daniel Sogl +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { RedisClient } from 'redis'; + +export const id: number; + +/** + * clears cache target (key or group), or entire cache if no value passed, returns new index. + */ +export function clear(target: string | any[]): any; + +/** used to create a new ApiCache instance with the same options as the current one */ +export function clone(): any; + +export function getDuration(duration: string): any; + +/** + * returns current cache index [of keys] + */ +export function getIndex(): any; + +/** + * the actual middleware that will be used in your routes. duration is in the following format + * "[length] [unit]", as in "10 minutes" or "1 day". A second param is a middleware toggle function, + * accepting request and response params, and must return truthy to enable cache for the request. + * Third param is the options that will override global ones and affect this middleware only. + */ +export function middleware( + duration?: string, + toggleMiddleware?: any, + localOptions?: Options +): any; + +/** + * used to create a new ApiCache instance (by default, simply requiring this library shares a common instance) + */ +export function newInstance(config: Options): any; + +/** + * getter/setter for global options. If used as a setter, this function is + * chainable, allowing you to do things such as... say... return the middleware. + */ +export function options(options: Options): any; + +export function resetIndex(): void; + +export interface Options { + /** if true, enables console output */ + debug?: boolean; + /** should be either a number (in ms) or a string, defaults to 1 hour */ + defaultDuration?: string; + /** if false, turns off caching globally (useful on dev) */ + enabled?: boolean; + /** + * if provided, uses the [node-redis](https://github.com/NodeRedis/node_redis) client instead of [memory-cache](https://github.com/ptarjan/node-cache) + */ + redisClient?: RedisClient; + /** appendKey takes the req/res objects and returns a custom value to extend the cache key */ + appendKey?: any; + /** list of headers that should never be cached */ + headerBlacklist?: string[]; + statusCodes?: { + /** list status codes to specifically exclude (e.g. [404, 403] cache all responses unless they had a 404 or 403 status) */ + exclude?: number[]; + /** list status codes to require (e.g. [200] caches ONLY responses with a success/200 code) */ + include?: number[]; + }; + /** + * 'cache-control': 'no-cache' // example of header overwrite + */ + headers?: { + [key: string]: string; + }; +} diff --git a/types/apicache/tsconfig.json b/types/apicache/tsconfig.json new file mode 100644 index 0000000000..9ae5f1f827 --- /dev/null +++ b/types/apicache/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "apicache-tests.ts"] +} diff --git a/types/apicache/tslint.json b/types/apicache/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/apicache/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/arangodb/arangodb-tests.ts b/types/arangodb/arangodb-tests.ts new file mode 100644 index 0000000000..7e0fd6383e --- /dev/null +++ b/types/arangodb/arangodb-tests.ts @@ -0,0 +1,98 @@ +import { aql, db, query } from "@arangodb"; +import { md5 } from "@arangodb/crypto"; +import { createRouter } from "@arangodb/foxx"; +import sessionsMiddleware = require("@arangodb/foxx/sessions"); +import jwtStorage = require("@arangodb/foxx/sessions/storages/jwt"); +import cookieTransport = require("@arangodb/foxx/sessions/transports/cookie"); + +console.warnStack(new Error(), "something went wrong"); + +interface User { + username: string; + password?: string; +} +const coll = module.context.collection("users")!; +coll.save({ username: "user" }); +const doc = coll.any(); +console.log(doc.username); + +const users = coll as ArangoDB.Collection; +const admin = users.firstExample({ username: "admin" })!; +users.update(admin, { password: md5("hunter2") }); +console.logLines("user", admin._key, admin.username); + +db._query(aql` + FOR u IN ${users} + RETURN u +`); + +interface Banana { + color: string; + shape: { + type: string; + coords: string[]; + }; +} + +const bananas = db._createDocumentCollection("bananas", { + waitForSync: false, + keyOptions: { + type: "autoincrement", + increment: 11, + offset: 23 + } +}) as ArangoDB.Collection; +bananas.ensureIndex({ + type: "hash", + unique: true, + fields: ["color", "shape.type"] +}); +bananas.updateByExample( + bananas.any(), + { shape: { type: "round" } }, + { mergeObjects: true } +); +bananas.ensureIndex({ + type: "geo", + fields: ["latLng"] +}); + +const router = createRouter(); +module.context.use(router); + +router.get("/", (req, res) => { + if (req.cookie("sid", { secret: "keyboardcat" })) { + res.set("content-type", "text/plain"); + res.write("Welcome back, Commander"); + } else { + res.json({ success: false }); + } +}); + +router.use((req, res, next) => { + if (req.is("json")) res.throw("too many requests"); + next(); +}); + +router.use( + sessionsMiddleware({ + storage: jwtStorage({ algorithm: "none" }), + transport: "header" + }) +); +router.use( + sessionsMiddleware({ + storage: jwtStorage({ algorithm: "HS512", secret: "tacocat" }), + transport: cookieTransport({ secret: "banana", algorithm: "sha256" }) + }) +); + +console.log( + query` + FOR u IN users + ${aql.literal( + Math.random() < 0.5 ? "FILTER u.admin" : "FILTER !u.admin" + )} + RETURN u + `.toArray() +); diff --git a/types/arangodb/index.d.ts b/types/arangodb/index.d.ts new file mode 100644 index 0000000000..5c3f56020f --- /dev/null +++ b/types/arangodb/index.d.ts @@ -0,0 +1,1896 @@ +// Type definitions for ArangoDB 3.4 +// Project: https://github.com/arangodb/arangodb +// Definitions by: Alan Plum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace ArangoDB { + type JwtAlgorithm = "HS512" | "HS384" | "HS256"; + type HashAlgorithm = + | "sha512" + | "sha384" + | "sha256" + | "sha224" + | "sha1" + | "md5"; + type HttpMethod = + | "HEAD" + | "GET" + | "POST" + | "PUT" + | "PATCH" + | "DELETE" + | "OPTIONS"; + type HttpStatus = + | "continue" + | "switching protocols" + | "processing" + | "ok" + | "created" + | "accepted" + | "non-authoritative information" + | "no content" + | "reset content" + | "partial content" + | "multi-status" + | "already reported" + | "im used" + | "multiple choices" + | "moved permanently" + | "found" + | "see other" + | "not modified" + | "use proxy" + | "(unused)" + | "temporary redirect" + | "permanent redirect" + | "bad request" + | "unauthorized" + | "payment required" + | "forbidden" + | "not found" + | "method not allowed" + | "not acceptable" + | "proxy authentication required" + | "request timeout" + | "conflict" + | "gone" + | "length required" + | "precondition failed" + | "payload too large" + | "uri too long" + | "unsupported media type" + | "range not satisfiable" + | "expectation failed" + | "i'm a teapot" + | "misdirected request" + | "unprocessable entity" + | "locked" + | "failed dependency" + | "unordered collection" + | "upgrade required" + | "precondition required" + | "too many requests" + | "request header fields too large" + | "unavailable for legal reasons" + | "internal server error" + | "not implemented" + | "bad gateway" + | "service unavailable" + | "gateway timeout" + | "http version not supported" + | "variant also negotiates" + | "insufficient storage" + | "loop detected" + | "bandwidth limit exceeded" + | "not extended" + | "network authentication required"; + type EdgeDirection = "any" | "inbound" | "outbound"; + type EngineType = "mmfiles" | "rocksdb"; + type IndexType = "hash" | "skiplist" | "fulltext" | "geo"; + type ViewType = "arangosearch"; + type KeyGeneratorType = "traditional" | "autoincrement"; + type ErrorName = + | "ERROR_NO_ERROR" + | "ERROR_FAILED" + | "ERROR_SYS_ERROR" + | "ERROR_OUT_OF_MEMORY" + | "ERROR_INTERNAL" + | "ERROR_ILLEGAL_NUMBER" + | "ERROR_NUMERIC_OVERFLOW" + | "ERROR_ILLEGAL_OPTION" + | "ERROR_DEAD_PID" + | "ERROR_NOT_IMPLEMENTED" + | "ERROR_BAD_PARAMETER" + | "ERROR_FORBIDDEN" + | "ERROR_OUT_OF_MEMORY_MMAP" + | "ERROR_CORRUPTED_CSV" + | "ERROR_FILE_NOT_FOUND" + | "ERROR_CANNOT_WRITE_FILE" + | "ERROR_CANNOT_OVERWRITE_FILE" + | "ERROR_TYPE_ERROR" + | "ERROR_LOCK_TIMEOUT" + | "ERROR_CANNOT_CREATE_DIRECTORY" + | "ERROR_CANNOT_CREATE_TEMP_FILE" + | "ERROR_REQUEST_CANCELED" + | "ERROR_DEBUG" + | "ERROR_IP_ADDRESS_INVALID" + | "ERROR_FILE_EXISTS" + | "ERROR_LOCKED" + | "ERROR_DEADLOCK" + | "ERROR_SHUTTING_DOWN" + | "ERROR_ONLY_ENTERPRISE" + | "ERROR_RESOURCE_LIMIT" + | "ERROR_ARANGO_ICU_ERROR" + | "ERROR_CANNOT_READ_FILE" + | "ERROR_HTTP_BAD_PARAMETER" + | "ERROR_HTTP_UNAUTHORIZED" + | "ERROR_HTTP_FORBIDDEN" + | "ERROR_HTTP_NOT_FOUND" + | "ERROR_HTTP_METHOD_NOT_ALLOWED" + | "ERROR_HTTP_NOT_ACCEPTABLE" + | "ERROR_HTTP_PRECONDITION_FAILED" + | "ERROR_HTTP_SERVER_ERROR" + | "ERROR_HTTP_SERVICE_UNAVAILABLE" + | "ERROR_HTTP_GATEWAY_TIMEOUT" + | "ERROR_HTTP_CORRUPTED_JSON" + | "ERROR_HTTP_SUPERFLUOUS_SUFFICES" + | "ERROR_ARANGO_ILLEGAL_STATE" + | "ERROR_ARANGO_DATAFILE_SEALED" + | "ERROR_ARANGO_READ_ONLY" + | "ERROR_ARANGO_DUPLICATE_IDENTIFIER" + | "ERROR_ARANGO_DATAFILE_UNREADABLE" + | "ERROR_ARANGO_DATAFILE_EMPTY" + | "ERROR_ARANGO_RECOVERY" + | "ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND" + | "ERROR_ARANGO_CORRUPTED_DATAFILE" + | "ERROR_ARANGO_ILLEGAL_PARAMETER_FILE" + | "ERROR_ARANGO_CORRUPTED_COLLECTION" + | "ERROR_ARANGO_MMAP_FAILED" + | "ERROR_ARANGO_FILESYSTEM_FULL" + | "ERROR_ARANGO_NO_JOURNAL" + | "ERROR_ARANGO_DATAFILE_ALREADY_EXISTS" + | "ERROR_ARANGO_DATADIR_LOCKED" + | "ERROR_ARANGO_COLLECTION_DIRECTORY_ALREADY_EXISTS" + | "ERROR_ARANGO_MSYNC_FAILED" + | "ERROR_ARANGO_DATADIR_UNLOCKABLE" + | "ERROR_ARANGO_SYNC_TIMEOUT" + | "ERROR_ARANGO_CONFLICT" + | "ERROR_ARANGO_DATADIR_INVALID" + | "ERROR_ARANGO_DOCUMENT_NOT_FOUND" + | "ERROR_ARANGO_DATA_SOURCE_NOT_FOUND" + | "ERROR_ARANGO_COLLECTION_PARAMETER_MISSING" + | "ERROR_ARANGO_DOCUMENT_HANDLE_BAD" + | "ERROR_ARANGO_MAXIMAL_SIZE_TOO_SMALL" + | "ERROR_ARANGO_DUPLICATE_NAME" + | "ERROR_ARANGO_ILLEGAL_NAME" + | "ERROR_ARANGO_NO_INDEX" + | "ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED" + | "ERROR_ARANGO_INDEX_NOT_FOUND" + | "ERROR_ARANGO_CROSS_COLLECTION_REQUEST" + | "ERROR_ARANGO_INDEX_HANDLE_BAD" + | "ERROR_ARANGO_DOCUMENT_TOO_LARGE" + | "ERROR_ARANGO_COLLECTION_NOT_UNLOADED" + | "ERROR_ARANGO_COLLECTION_TYPE_INVALID" + | "ERROR_ARANGO_VALIDATION_FAILED" + | "ERROR_ARANGO_ATTRIBUTE_PARSER_FAILED" + | "ERROR_ARANGO_DOCUMENT_KEY_BAD" + | "ERROR_ARANGO_DOCUMENT_KEY_UNEXPECTED" + | "ERROR_ARANGO_DATADIR_NOT_WRITABLE" + | "ERROR_ARANGO_OUT_OF_KEYS" + | "ERROR_ARANGO_DOCUMENT_KEY_MISSING" + | "ERROR_ARANGO_DOCUMENT_TYPE_INVALID" + | "ERROR_ARANGO_DATABASE_NOT_FOUND" + | "ERROR_ARANGO_DATABASE_NAME_INVALID" + | "ERROR_ARANGO_USE_SYSTEM_DATABASE" + | "ERROR_ARANGO_ENDPOINT_NOT_FOUND" + | "ERROR_ARANGO_INVALID_KEY_GENERATOR" + | "ERROR_ARANGO_INVALID_EDGE_ATTRIBUTE" + | "ERROR_ARANGO_INDEX_DOCUMENT_ATTRIBUTE_MISSING" + | "ERROR_ARANGO_INDEX_CREATION_FAILED" + | "ERROR_ARANGO_WRITE_THROTTLE_TIMEOUT" + | "ERROR_ARANGO_COLLECTION_TYPE_MISMATCH" + | "ERROR_ARANGO_COLLECTION_NOT_LOADED" + | "ERROR_ARANGO_DOCUMENT_REV_BAD" + | "ERROR_ARANGO_DATAFILE_FULL" + | "ERROR_ARANGO_EMPTY_DATADIR" + | "ERROR_ARANGO_TRY_AGAIN" + | "ERROR_ARANGO_BUSY" + | "ERROR_ARANGO_MERGE_IN_PROGRESS" + | "ERROR_ARANGO_IO_ERROR" + | "ERROR_REPLICATION_NO_RESPONSE" + | "ERROR_REPLICATION_INVALID_RESPONSE" + | "ERROR_REPLICATION_MASTER_ERROR" + | "ERROR_REPLICATION_MASTER_INCOMPATIBLE" + | "ERROR_REPLICATION_MASTER_CHANGE" + | "ERROR_REPLICATION_LOOP" + | "ERROR_REPLICATION_UNEXPECTED_MARKER" + | "ERROR_REPLICATION_INVALID_APPLIER_STATE" + | "ERROR_REPLICATION_UNEXPECTED_TRANSACTION" + | "ERROR_REPLICATION_INVALID_APPLIER_CONFIGURATION" + | "ERROR_REPLICATION_RUNNING" + | "ERROR_REPLICATION_APPLIER_STOPPED" + | "ERROR_REPLICATION_NO_START_TICK" + | "ERROR_REPLICATION_START_TICK_NOT_PRESENT" + | "ERROR_REPLICATION_WRONG_CHECKSUM" + | "ERROR_REPLICATION_SHARD_NONEMPTY" + | "ERROR_CLUSTER_NO_AGENCY" + | "ERROR_CLUSTER_NO_COORDINATOR_HEADER" + | "ERROR_CLUSTER_COULD_NOT_LOCK_PLAN" + | "ERROR_CLUSTER_COLLECTION_ID_EXISTS" + | "ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_READ_CURRENT_VERSION" + | "ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION" + | "ERROR_CLUSTER_TIMEOUT" + | "ERROR_CLUSTER_COULD_NOT_REMOVE_COLLECTION_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_REMOVE_COLLECTION_IN_CURRENT" + | "ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE" + | "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT" + | "ERROR_CLUSTER_SHARD_GONE" + | "ERROR_CLUSTER_CONNECTION_LOST" + | "ERROR_CLUSTER_MUST_NOT_SPECIFY_KEY" + | "ERROR_CLUSTER_GOT_CONTRADICTING_ANSWERS" + | "ERROR_CLUSTER_NOT_ALL_SHARDING_ATTRIBUTES_GIVEN" + | "ERROR_CLUSTER_MUST_NOT_CHANGE_SHARDING_ATTRIBUTES" + | "ERROR_CLUSTER_UNSUPPORTED" + | "ERROR_CLUSTER_ONLY_ON_COORDINATOR" + | "ERROR_CLUSTER_READING_PLAN_AGENCY" + | "ERROR_CLUSTER_COULD_NOT_TRUNCATE_COLLECTION" + | "ERROR_CLUSTER_AQL_COMMUNICATION" + | "ERROR_ARANGO_DOCUMENT_NOT_FOUND_OR_SHARDING_ATTRIBUTES_CHANGED" + | "ERROR_CLUSTER_COULD_NOT_DETERMINE_ID" + | "ERROR_CLUSTER_ONLY_ON_DBSERVER" + | "ERROR_CLUSTER_BACKEND_UNAVAILABLE" + | "ERROR_CLUSTER_UNKNOWN_CALLBACK_ENDPOINT" + | "ERROR_CLUSTER_AGENCY_STRUCTURE_INVALID" + | "ERROR_CLUSTER_AQL_COLLECTION_OUT_OF_SYNC" + | "ERROR_CLUSTER_COULD_NOT_CREATE_INDEX_IN_PLAN" + | "ERROR_CLUSTER_COULD_NOT_DROP_INDEX_IN_PLAN" + | "ERROR_CLUSTER_CHAIN_OF_DISTRIBUTESHARDSLIKE" + | "ERROR_CLUSTER_MUST_NOT_DROP_COLL_OTHER_DISTRIBUTESHARDSLIKE" + | "ERROR_CLUSTER_UNKNOWN_DISTRIBUTESHARDSLIKE" + | "ERROR_CLUSTER_INSUFFICIENT_DBSERVERS" + | "ERROR_CLUSTER_COULD_NOT_DROP_FOLLOWER" + | "ERROR_CLUSTER_SHARD_LEADER_REFUSES_REPLICATION" + | "ERROR_CLUSTER_SHARD_FOLLOWER_REFUSES_OPERATION" + | "ERROR_CLUSTER_SHARD_LEADER_RESIGNED" + | "ERROR_CLUSTER_AGENCY_COMMUNICATION_FAILED" + | "ERROR_CLUSTER_DISTRIBUTE_SHARDS_LIKE_REPLICATION_FACTOR" + | "ERROR_CLUSTER_DISTRIBUTE_SHARDS_LIKE_NUMBER_OF_SHARDS" + | "ERROR_CLUSTER_LEADERSHIP_CHALLENGE_ONGOING" + | "ERROR_CLUSTER_NOT_LEADER" + | "ERROR_CLUSTER_COULD_NOT_CREATE_VIEW_IN_PLAN" + | "ERROR_QUERY_KILLED" + | "ERROR_QUERY_PARSE" + | "ERROR_QUERY_EMPTY" + | "ERROR_QUERY_SCRIPT" + | "ERROR_QUERY_NUMBER_OUT_OF_RANGE" + | "ERROR_QUERY_VARIABLE_NAME_INVALID" + | "ERROR_QUERY_VARIABLE_REDECLARED" + | "ERROR_QUERY_VARIABLE_NAME_UNKNOWN" + | "ERROR_QUERY_COLLECTION_LOCK_FAILED" + | "ERROR_QUERY_TOO_MANY_COLLECTIONS" + | "ERROR_QUERY_DOCUMENT_ATTRIBUTE_REDECLARED" + | "ERROR_QUERY_FUNCTION_NAME_UNKNOWN" + | "ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH" + | "ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH" + | "ERROR_QUERY_INVALID_REGEX" + | "ERROR_QUERY_BIND_PARAMETERS_INVALID" + | "ERROR_QUERY_BIND_PARAMETER_MISSING" + | "ERROR_QUERY_BIND_PARAMETER_UNDECLARED" + | "ERROR_QUERY_BIND_PARAMETER_TYPE" + | "ERROR_QUERY_INVALID_LOGICAL_VALUE" + | "ERROR_QUERY_INVALID_ARITHMETIC_VALUE" + | "ERROR_QUERY_DIVISION_BY_ZERO" + | "ERROR_QUERY_ARRAY_EXPECTED" + | "ERROR_QUERY_FAIL_CALLED" + | "ERROR_QUERY_GEO_INDEX_MISSING" + | "ERROR_QUERY_FULLTEXT_INDEX_MISSING" + | "ERROR_QUERY_INVALID_DATE_VALUE" + | "ERROR_QUERY_MULTI_MODIFY" + | "ERROR_QUERY_INVALID_AGGREGATE_EXPRESSION" + | "ERROR_QUERY_COMPILE_TIME_OPTIONS" + | "ERROR_QUERY_EXCEPTION_OPTIONS" + | "ERROR_QUERY_COLLECTION_USED_IN_EXPRESSION" + | "ERROR_QUERY_DISALLOWED_DYNAMIC_CALL" + | "ERROR_QUERY_ACCESS_AFTER_MODIFICATION" + | "ERROR_QUERY_FUNCTION_INVALID_NAME" + | "ERROR_QUERY_FUNCTION_INVALID_CODE" + | "ERROR_QUERY_FUNCTION_NOT_FOUND" + | "ERROR_QUERY_FUNCTION_RUNTIME_ERROR" + | "ERROR_QUERY_BAD_JSON_PLAN" + | "ERROR_QUERY_NOT_FOUND" + | "ERROR_QUERY_IN_USE" + | "ERROR_QUERY_USER_ASSERT" + | "ERROR_QUERY_USER_WARN" + | "ERROR_CURSOR_NOT_FOUND" + | "ERROR_CURSOR_BUSY" + | "ERROR_TRANSACTION_INTERNAL" + | "ERROR_TRANSACTION_NESTED" + | "ERROR_TRANSACTION_UNREGISTERED_COLLECTION" + | "ERROR_TRANSACTION_DISALLOWED_OPERATION" + | "ERROR_TRANSACTION_ABORTED" + | "ERROR_USER_INVALID_NAME" + | "ERROR_USER_INVALID_PASSWORD" + | "ERROR_USER_DUPLICATE" + | "ERROR_USER_NOT_FOUND" + | "ERROR_USER_CHANGE_PASSWORD" + | "ERROR_USER_EXTERNAL" + | "ERROR_SERVICE_INVALID_NAME" + | "ERROR_SERVICE_INVALID_MOUNT" + | "ERROR_SERVICE_DOWNLOAD_FAILED" + | "ERROR_SERVICE_UPLOAD_FAILED" + | "ERROR_LDAP_CANNOT_INIT" + | "ERROR_LDAP_CANNOT_SET_OPTION" + | "ERROR_LDAP_CANNOT_BIND" + | "ERROR_LDAP_CANNOT_UNBIND" + | "ERROR_LDAP_CANNOT_SEARCH" + | "ERROR_LDAP_CANNOT_START_TLS" + | "ERROR_LDAP_FOUND_NO_OBJECTS" + | "ERROR_LDAP_NOT_ONE_USER_FOUND" + | "ERROR_LDAP_USER_NOT_IDENTIFIED" + | "ERROR_LDAP_INVALID_MODE" + | "ERROR_TASK_INVALID_ID" + | "ERROR_TASK_DUPLICATE_ID" + | "ERROR_TASK_NOT_FOUND" + | "ERROR_GRAPH_INVALID_GRAPH" + | "ERROR_GRAPH_COULD_NOT_CREATE_GRAPH" + | "ERROR_GRAPH_INVALID_VERTEX" + | "ERROR_GRAPH_COULD_NOT_CREATE_VERTEX" + | "ERROR_GRAPH_COULD_NOT_CHANGE_VERTEX" + | "ERROR_GRAPH_INVALID_EDGE" + | "ERROR_GRAPH_COULD_NOT_CREATE_EDGE" + | "ERROR_GRAPH_COULD_NOT_CHANGE_EDGE" + | "ERROR_GRAPH_TOO_MANY_ITERATIONS" + | "ERROR_GRAPH_INVALID_FILTER_RESULT" + | "ERROR_GRAPH_EMPTY" + | "ERROR_SESSION_UNKNOWN" + | "ERROR_SESSION_EXPIRED" + | "SIMPLE_CLIENT_UNKNOWN_ERROR" + | "SIMPLE_CLIENT_COULD_NOT_CONNECT" + | "SIMPLE_CLIENT_COULD_NOT_WRITE" + | "SIMPLE_CLIENT_COULD_NOT_READ" + | "COMMUNICATOR_REQUEST_ABORTED" + | "COMMUNICATOR_DISABLED" + | "ERROR_MALFORMED_MANIFEST_FILE" + | "ERROR_INVALID_SERVICE_MANIFEST" + | "ERROR_SERVICE_FILES_MISSING" + | "ERROR_SERVICE_FILES_OUTDATED" + | "ERROR_INVALID_FOXX_OPTIONS" + | "ERROR_INVALID_MOUNTPOINT" + | "ERROR_SERVICE_NOT_FOUND" + | "ERROR_SERVICE_NEEDS_CONFIGURATION" + | "ERROR_SERVICE_MOUNTPOINT_CONFLICT" + | "ERROR_SERVICE_MANIFEST_NOT_FOUND" + | "ERROR_SERVICE_OPTIONS_MALFORMED" + | "ERROR_SERVICE_SOURCE_NOT_FOUND" + | "ERROR_SERVICE_SOURCE_ERROR" + | "ERROR_SERVICE_UNKNOWN_SCRIPT" + | "ERROR_MODULE_NOT_FOUND" + | "ERROR_MODULE_SYNTAX_ERROR" + | "ERROR_MODULE_FAILURE" + | "ERROR_NO_SMART_COLLECTION" + | "ERROR_NO_SMART_GRAPH_ATTRIBUTE" + | "ERROR_CANNOT_DROP_SMART_COLLECTION" + | "ERROR_KEY_MUST_BE_PREFIXED_WITH_SMART_GRAPH_ATTRIBUTE" + | "ERROR_ILLEGAL_SMART_GRAPH_ATTRIBUTE" + | "ERROR_AGENCY_INQUIRY_SYNTAX" + | "ERROR_AGENCY_INFORM_MUST_BE_OBJECT" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_TERM" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_ID" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_ACTIVE" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_POOL" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_MIN_PING" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_MAX_PING" + | "ERROR_AGENCY_INFORM_MUST_CONTAIN_TIMEOUT_MULT" + | "ERROR_AGENCY_INQUIRE_CLIENT_ID_MUST_BE_STRING" + | "ERROR_AGENCY_CANNOT_REBUILD_DBS" + | "ERROR_SUPERVISION_GENERAL_FAILURE" + | "ERROR_DISPATCHER_IS_STOPPING" + | "ERROR_QUEUE_UNKNOWN" + | "ERROR_QUEUE_FULL"; + + // Collection + + type DocumentCollectionType = 2; + type EdgeCollectionType = 3; + type CollectionType = DocumentCollectionType | EdgeCollectionType; + + interface CollectionChecksum { + checksum: string; + revision: string; + } + + interface CollectionFigures { + alive: { + count: number; + size: number; + }; + dead: { + count: number; + size: number; + deletion: number; + }; + datafiles: { + count: number; + fileSize: number; + }; + journals: { + count: number; + fileSize: number; + }; + compactors: { + count: number; + fileSize: number; + }; + shapefiles: { + count: number; + fileSize: number; + }; + shapes: { + count: number; + size: number; + }; + attributes: { + count: number; + size: number; + }; + indexes: { + count: number; + size: number; + }; + lastTick: number; + uncollectedLogfileEntries: number; + documentReferences: number; + waitingFor: string; + compactionStatus: { + time: string; + message: string; + count: number; + filesCombined: number; + bytesRead: number; + bytesWritten: number; + }; + } + + interface CollectionPropertiesOptions { + waitForSync?: boolean; + journalSize?: number; + indexBuckets?: number; + replicationFactor?: number; + } + + interface CreateCollectionOptions { + waitForSync?: boolean; + journalSize?: number; + isVolatile?: boolean; + isSystem?: boolean; + keyOptions?: { + type?: KeyGeneratorType; + allowUserKeys?: boolean; + increment?: number; + offset?: number; + }; + numberOfShards?: number; + shardKeys?: string[]; + replicationFactor?: number; + } + + interface CollectionProperties { + waitForSync: boolean; + journalSize: number; + isSystem: boolean; + isVolatile: boolean; + keyOptions?: { + type: KeyGeneratorType; + allowUserKeys: boolean; + increment?: number; + offset?: number; + }; + indexBuckets: number; + numberOfShards?: number; + shardKeys?: string[]; + replicationFactor?: number; + } + + // Indexes + + interface IndexLike { + [key: string]: any; + id: string; + } + + interface IndexDescription { + type: IndexType; + fields: ReadonlyArray; + sparse?: boolean; + unique?: boolean; + deduplicate?: boolean; + } + + interface Index { + id: string; + type: IndexType; + fields: Array; + sparse: boolean; + unique: boolean; + deduplicate: boolean; + isNewlyCreated: boolean; + selectivityEstimate: number; + code: number; + } + + // Document + + interface ObjectWithId { + [key: string]: any; + _id: string; + } + + interface ObjectWithKey { + [key: string]: any; + _key: string; + } + + type DocumentLike = ObjectWithId | ObjectWithKey; + + type Patch = { [K in keyof T]?: T[K] | Patch }; + + interface DocumentMetadata { + _key: string; + _id: string; + _rev: string; + } + + interface UpdateMetadata extends DocumentMetadata { + _oldRev: string; + } + + type Document = { [K in keyof T]: T[K] } & + DocumentMetadata & { _from?: string; _to?: string } & { + [key: string]: any; + }; + type DocumentData = { [K in keyof T]: T[K] } & + Partial; + type Edge = Document & { + _from: string; + _to: string; + }; + + interface InsertResult extends DocumentMetadata { + new?: Document; + } + interface UpdateResult extends UpdateMetadata { + old?: Document; + new?: Document; + } + interface RemoveResult extends DocumentMetadata { + old?: Document; + } + + interface InsertOptions { + waitForSync?: boolean; + silent?: boolean; + returnNew?: boolean; + } + + interface ReplaceOptions extends InsertOptions { + overwrite?: boolean; + returnOld?: boolean; + } + + interface UpdateOptions extends ReplaceOptions { + keepNull?: boolean; + mergeObjects?: boolean; + } + + interface UpdateByExampleOptions { + keepNull?: boolean; + waitForSync?: boolean; + limit?: number; + mergeObjects?: boolean; + } + + interface RemoveOptions { + waitForSync?: boolean; + overwrite?: boolean; + returnOld?: boolean; + silent?: boolean; + } + + interface RemoveByExampleOptions { + waitForSync?: boolean; + limit?: number; + } + + interface IterateOptions { + limit?: number; + probability?: number; + } + + type DocumentIterator = ( + document: Document, + number: number + ) => void; + + interface Collection { + // Collection + checksum( + withRevisions?: boolean, + withData?: boolean + ): CollectionChecksum; + count(): number; + drop(options?: { isSystem?: boolean }): void; + figures(): CollectionFigures; + load(): void; + path(): string; + properties( + properties?: CollectionPropertiesOptions + ): CollectionProperties; + revision(): string; + rotate(): void; + toArray(): Array>; + truncate(): void; + type(): CollectionType; + unload(): void; + + // Indexes + dropIndex(index: string | IndexLike): boolean; + ensureIndex(description: IndexDescription): Index; + getIndexes(): Array>; + index(index: string | IndexLike): Index | null; + + // Document + all(): Cursor>; + any(): Document; + byExample(example: Partial>): Cursor>; + document(selector: string | DocumentLike): Document; + document( + selectors: ReadonlyArray + ): Array>; + exists(name: string): boolean; + firstExample(example: Partial>): Document | null; + insert(data: DocumentData, options?: InsertOptions): InsertResult; + insert( + array: ReadonlyArray>, + options?: InsertOptions + ): Array>; + insert( + from: string, + to: string, + data: DocumentData, + options?: InsertOptions + ): InsertResult; + edges( + vertex: string | ObjectWithId | ReadonlyArray + ): Array>; + inEdges( + vertex: string | ObjectWithId | ReadonlyArray + ): Array>; + outEdges( + vertex: string | ObjectWithId | ReadonlyArray + ): Array>; + iterate(iterator: DocumentIterator, options?: IterateOptions): void; + remove( + selector: string | DocumentLike, + options?: RemoveOptions + ): RemoveResult; + remove( + selectors: ReadonlyArray, + options?: RemoveOptions + ): RemoveResult[]; + removeByExample( + example: Partial>, + waitForSync?: boolean, + limit?: number + ): number; + removeByExample( + example: Partial>, + options?: RemoveByExampleOptions + ): number; + rename(newName: string): void; + replace( + selector: string | DocumentLike, + data: DocumentData, + options?: ReplaceOptions + ): UpdateResult; + replace( + selectors: ReadonlyArray, + data: ReadonlyArray>, + options?: ReplaceOptions + ): Array>; + replaceByExample( + example: Partial>, + newValue: DocumentData, + waitForSync?: boolean, + limit?: number + ): number; + replaceByExample( + example: Partial>, + newValue: DocumentData, + options?: { waitForSync?: boolean; limit?: number } + ): number; + save(data: DocumentData, options?: InsertOptions): InsertResult; + save( + array: ReadonlyArray>, + options?: InsertOptions + ): Array>; + save( + from: string, + to: string, + data: DocumentData, + options?: InsertOptions + ): InsertResult; + update( + selector: string | DocumentLike, + data: Patch>, + options?: UpdateOptions + ): UpdateResult; + update( + selectors: ReadonlyArray, + data: ReadonlyArray>>, + options?: UpdateOptions + ): Array>; + updateByExample( + example: Partial>, + newValue: Patch>, + keepNull?: boolean, + waitForSync?: boolean, + limit?: number + ): number; + updateByExample( + example: Partial>, + newValue: Patch>, + options?: UpdateByExampleOptions + ): number; + } + + // Database + + interface DatabaseUser { + username: string; + passwd?: string; + active?: boolean; + extra?: object; + } + + // AQL + + interface Query { + query: string; + bindVars?: object; + options?: QueryOptions; + } + + interface AqlLiteral { + toAQL: () => string; + } + + interface Cursor { + toArray(): T[]; + hasNext(): boolean; + next(): T; + count(count?: boolean): number; + getExtra(): QueryExtra; + setBatchSize(size: number): void; + getBatchSize(): number; + execute(batchSize?: number): void; + dispose(): void; + } + + interface Statement { + bind(name: string, value: any): void; + setBatchSize(size: number): void; + getBatchSize(): number; + execute(): Cursor; + } + + interface QueryOptions { + memoryLimit?: number; + failOnWarning?: boolean; + cache?: boolean; + count?: boolean; + fullCount?: boolean; + profile?: boolean; + maxWarningCount?: number; + maxNumberOfPlans?: number; + stream?: boolean; + // RocksDB + maxTransactionsSize?: number; + intermediateCommitSize?: number; + intermediateCommitCount?: number; + // enterprise + skipInaccessibleCollections?: boolean; + } + + interface QueryExtra { + stats: { + writesExecuted: number; + writesIgnored: number; + scannedFull: number; + scannedIndex: number; + filtered: number; + httpRequests: number; + fullCount: number; + executionTime: number; + }; + warnings: string[]; + } + + interface QueryAstNode { + type: string; + subNodes?: QueryAstNode[]; + [key: string]: any; + } + + interface ParsedQuery { + parsed: boolean; + collections: string[]; + parameters: string[]; + bindVars: string[]; + ast: QueryAstNode[]; + } + + // Views + + interface View { + // TODO + [key: string]: any; + } + type ViewProperties = object; // TODO + + // Global + + interface TransactionCollections { + read?: string | string[]; + write?: string | string[]; + allowImplicit?: boolean; + } + interface Transaction { + collections: TransactionCollections | string[]; + action: (params: object) => void | string; + waitForSync?: boolean; + lockTimeout?: number; + params?: object; + // RocksDB + maxTransactionsSize?: number; + intermediateCommitSize?: number; + intermediateCommitCount?: number; + } + + interface Database { + // Database + _createDatabase( + name: string, + options?: never, + users?: DatabaseUser[] + ): true; + _databases(): string[]; + _dropDatabase(name: string): true; + _useDatabase(name: string): Database; + + // Indexes + _index(index: string | IndexLike): Index | null; + _dropIndex(index: string | IndexLike): boolean; + + // Properties + _id(): string; + _isSystem(): boolean; + _name(): string; + _path(): string; + _version(): string; + + // Collection + _collection(name: string): Collection; + _collections(): Collection[]; + _create(name: string, properties?: CreateCollectionOptions): Collection; + _createDocumentCollection( + name: string, + properties?: CreateCollectionOptions + ): Collection; + _createEdgeCollection( + name: string, + properties?: CreateCollectionOptions + ): Collection; + _drop(name: string): void; + _truncate(name: string): void; + + // AQL + _createStatement(query: Query | string): Statement; + _query( + query: Query | string, + bindVars?: object, + options?: QueryOptions + ): Cursor; + _explain(query: Query | string): void; + _parse(query: string): ParsedQuery; + + // Document + _document(name: string): Document; + _exists(selector: string | ObjectWithId): DocumentMetadata; + _remove(selector: string | ObjectWithId): DocumentMetadata; + _replace( + selector: string | ObjectWithId, + data: object + ): DocumentMetadata; + _update( + selector: string | ObjectWithId, + data: object + ): DocumentMetadata; + + // Views + _view(name: string): View | null; + _views(): View[]; + _createView( + name: string, + type: ViewType, + properties: ViewProperties + ): View; + _dropView(name: string): void; + + // Global + _engine(): EngineType; + _engineStats(): { [key: string]: any }; + _executeTransaction(transaction: Transaction): void; + } +} + +declare namespace Foxx { + interface Session { + uid: string | null; + created: number; + data: any; + } + interface SessionStorage { + new?: () => Session; + fromClient: (sid: string) => Session | null; + forClient: (session: Session) => string | null; + } + interface SessionTransport { + get?: (req: Request) => string | null; + set?: (res: Response, sid: string) => void; + clear?: (res: Response) => void; + } + interface CollectionSessionStorage extends SessionStorage { + new: () => Session; + save: (session: Session) => Session; + clear: (session: Session) => boolean; + prune: () => string[]; + } + interface SessionsMiddleware extends DelegateMiddleware { + storage: SessionStorage; + transport: SessionTransport[]; + } + + type SimpleMiddleware = ( + req: Request, + res: Response, + next: NextFunction + ) => void; + interface DelegateMiddleware { + register: (endpoint: Endpoint) => SimpleMiddleware; + } + type Middleware = SimpleMiddleware | DelegateMiddleware; + type Handler = ((req: Request, res: Response) => void); + type NextFunction = () => void; + + interface ValidationResult { + value: T; + error: any; + } + + interface Schema { + isJoi: boolean; + validate(value: T): ValidationResult; + } + + interface Model { + schema: Schema; + fromClient?: (value: any) => any; + forClient?: (value: any) => any; + } + + interface DocumentationRouterOptions { + mount: string; + indexFile: string; + swaggerRoot: string; + before: (req: Request, res: Response) => void | false; + } + + interface MediaType { + type: string; + subtype: string; + suffix?: string; + parameters: { + charset: string; + }; + } + + interface TypeDefinition { + fromClient?: ( + body: string | Buffer, + req: Request, + type: MediaType + ) => any; + forClient?: ( + body: any + ) => { + data: string; + headers: { [key: string]: string | undefined }; + }; + } + + type Ranges = Array<{ + start: number; + end: number; + }> & { type: string }; + + type ConfigurationType = + | "integer" + | "boolean" + | "string" + | "number" + | "json" + | "password" + | "int" + | "bool"; + interface ConfigurationDefinition { + default?: any; + type?: ConfigurationType; + description?: string; + required: boolean; + } + interface DependencyDefinition { + name: string; + version: string; + description?: string; + required: boolean; + multiple: boolean; + } + interface AssetDefinition { + path: string; + gzip?: boolean; + type?: string; + } + + interface Manifest { + name?: string; + version?: string; + keywords?: string; + license?: string; + repository?: { type: string; url: string }; + author: string; + contributors?: any[]; + description: string; + thumbnail?: string; + engines?: { [key: string]: string | undefined }; + defaultDocument?: string; + lib: string; + main?: string; + configuration?: { [key: string]: ConfigurationDefinition }; + dependencies?: { [key: string]: DependencyDefinition }; + provides?: { [key: string]: string | undefined }; + files?: { [key: string]: AssetDefinition }; + scripts?: { [key: string]: string | undefined }; + tests?: string[]; + } + + interface Context { + argv: any[]; + basePath: string; + baseUrl: string; + collectionPrefix: string; + configuration: { [key: string]: any }; + dependencies: { [key: string]: any }; + isDevelopment: boolean; + isProduction: boolean; + manifest: Manifest; + mount: string; + collection(name: string): ArangoDB.Collection | null; + collectionName(name: string): string; + createDocumentationRouter( + opts?: + | Partial + | DocumentationRouterOptions["before"] + | DocumentationRouterOptions["swaggerRoot"] + ): Router; + file(name: string): Buffer; + file(name: string, encoding: string): string; + fileName(name: string): string; + registerType(type: string, def: TypeDefinition): void; + use( + path: string, + routerOrMiddleware: Router | Middleware, + name?: string + ): Endpoint; + use(routerOrMiddleware: Router | Middleware, name?: string): Endpoint; + } + + interface Request { + arangoUser: string | null; + arangoVersion: number; + baseUrl: string; + body: any; + context: Context; + database: string; + headers: { [key: string]: string | undefined }; + hostname: string; + method: ArangoDB.HttpMethod; + originalUrl: string; + path: string; + pathParams: { [key: string]: any }; + port: number; + protocol: string; + queryParams: { [key: string]: any }; + rawBody: Buffer; + remoteAddress: string; + remoteAddresses: string[]; + remotePort: number; + secure: boolean; + session?: Session; + sessionStorage?: SessionStorage; + suffix: string; + trustProxy: boolean; + url: string; + xhr: boolean; + accepts(types: string[]): string | false; + accepts(...types: string[]): string | false; + acceptsCharsets(charsets: string[]): string | false; + acceptsCharsets(...charsets: string[]): string | false; + acceptsEncodings(encodings: string[]): string | false; + acceptsEncodings(...encodings: string[]): string | false; + acceptsLanguages(languages: string[]): string | false; + acceptsLanguages(...languages: string[]): string | false; + cookie( + name: string, + options?: { secret?: string; algorithm?: ArangoDB.HashAlgorithm } + ): string | null; + get(name: string): string | undefined; + header(name: string): string | undefined; + is(types: string[]): string; + is(...types: string[]): string; + json(): any; + makeAbsolute( + path: string, + query?: string | { [key: string]: string | undefined } + ): string; + param(name: string): any; + range(size?: number): Ranges | number; + reverse(name: string, params?: object): string; + } + + interface Response { + body: Buffer | string; + context: Context; + headers: { [key: string]: any }; + statusCode: number; + attachment(filename?: string): this; + cookie( + name: string, + value: string, + options?: { + ttl?: number; + algorithm?: ArangoDB.HashAlgorithm; + secret?: string; + path?: string; + domain?: string; + secure?: boolean; + httpOnly?: boolean; + } + ): this; + download(path: string, filename?: string): this; + getHeader(name: string): string | undefined; + json(data: any): this; + redirect(status: number | ArangoDB.HttpStatus, path: string): this; + redirect(path: string): this; + removeHeader(name: string): this; + send(data: any, type?: string): this; + sendFile(path: string, options?: { lastModified: boolean }): this; + sendStatus(status: number | ArangoDB.HttpStatus): this; + setHeader(name: string, value: string): this; + set(name: string, value: string): this; + set(headers: { [name: string]: string }): this; + status(status: number | ArangoDB.HttpStatus): this; + throw( + status: number | ArangoDB.HttpStatus, + reason: string, + error: Error + ): never; + throw( + status: number | ArangoDB.HttpStatus, + reason: string, + options?: { cause?: Error; extra?: any } + ): never; + throw(status: number | ArangoDB.HttpStatus, error: Error): never; + throw( + status: number | ArangoDB.HttpStatus, + options?: { cause?: Error; extra?: any } + ): never; + type(type?: string): string; + vary(names: string[]): this; + vary(...names: string[]): this; + write(data: string | Buffer): this; + } + + interface Endpoint { + header(name: string, schema: Schema, description?: string): this; + header(name: string, description: string): this; + pathParam(name: string, schema: Schema, description?: string): this; + pathParam(name: string, description: string): this; + queryParam(name: string, schema: Schema, description?: string): this; + queryParam(name: string, description: string): this; + body( + schema: Schema | Model | [Model], + mimes?: string[], + description?: string + ): this; + body( + schemaOrMimes: Schema | Model | [Model] | string[], + description?: string + ): this; + body(description: string): this; + response( + status: number | ArangoDB.HttpStatus, + schema: Schema | Model | [Model], + mimes?: string[], + description?: string + ): this; + response( + status: number | ArangoDB.HttpStatus, + mimes: string[], + description?: string + ): this; + response( + status: number | ArangoDB.HttpStatus, + description: string + ): this; + summary(summary: string): this; + description(description: string): this; + deprecated(deprecated: boolean): this; + error(status: number | ArangoDB.HttpStatus, description: string): this; + tag(...tags: string[]): this; + } + + function route(handler: Handler, name?: string): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + middleware6: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + middleware6: SimpleMiddleware, + middleware7: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + middleware6: SimpleMiddleware, + middleware7: SimpleMiddleware, + middleware8: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + function route( + pathOrMiddleware: string | SimpleMiddleware, + middleware1: SimpleMiddleware, + middleware2: SimpleMiddleware, + middleware3: SimpleMiddleware, + middleware4: SimpleMiddleware, + middleware5: SimpleMiddleware, + middleware6: SimpleMiddleware, + middleware7: SimpleMiddleware, + middleware8: SimpleMiddleware, + middleware9: SimpleMiddleware, + handler: Handler, + name?: string + ): Endpoint; + + interface Router { + get: typeof route; + post: typeof route; + put: typeof route; + patch: typeof route; + delete: typeof route; + all: typeof route; + use( + path: string, + routerOrMiddleware: Router | Middleware, + name?: string + ): Endpoint; + use(routerOrMiddleware: Router | Middleware, name?: string): Endpoint; + } +} + +declare module "@arangodb" { + function aql(strings: TemplateStringsArray, ...args: any[]): ArangoDB.Query; + namespace aql { + function literal(value: any): ArangoDB.AqlLiteral; + } + function query( + strings: TemplateStringsArray, + ...args: any[] + ): ArangoDB.Cursor; + function time(): number; + const db: ArangoDB.Database & { + [key: string]: ArangoDB.Collection | undefined; + }; + const errors: { + [Name in ArangoDB.ErrorName]: { code: number; message: string } + }; +} + +declare module "@arangodb/foxx/router" { + function createRouter(): Foxx.Router; + export = createRouter; +} + +declare module "@arangodb/foxx/graphql" { + import { GraphQLSchema, formatError } from "graphql"; + type GraphQLModule = object; + type GraphQLFormatErrorFunction = typeof formatError; + interface GraphQLOptions { + schema: GraphQLSchema; + context?: any; + rootValue?: object; + pretty?: boolean; + formatError?: GraphQLFormatErrorFunction; + validationRules?: any[]; + graphiql?: boolean; + graphql?: GraphQLModule; + } + function createGraphQLRouter( + options: GraphQLOptions | GraphQLSchema + ): Foxx.Router; + export = createGraphQLRouter; +} + +declare module "@arangodb/foxx/sessions" { + interface SessionsOptions { + storage: Foxx.SessionStorage | string | ArangoDB.Collection; + transport: + | Foxx.SessionTransport + | Foxx.SessionTransport[] + | "cookie" + | "header"; + autoCreate?: boolean; + } + function sessionsMiddleware( + options: SessionsOptions + ): Foxx.SessionsMiddleware; + export = sessionsMiddleware; +} + +declare module "@arangodb/foxx/sessions/storages/collection" { + interface CollectionStorageOptions { + collection: string | ArangoDB.Collection; + ttl?: number; + pruneExpired?: boolean; + autoUpdate?: boolean; + } + function collectionStorage( + options: + | CollectionStorageOptions + | CollectionStorageOptions["collection"] + ): Foxx.CollectionSessionStorage; + export = collectionStorage; +} + +declare module "@arangodb/foxx/sessions/storages/jwt" { + interface SafeJwtStorageOptions { + algorithm?: ArangoDB.JwtAlgorithm; + secret: string; + ttl?: number; + verify?: boolean; + maxExp?: number; + } + interface UnsafeJwtStorageOptions { + algorithm: "none"; + ttl?: number; + verify?: boolean; + maxExp?: number; + } + function jwtStorage( + options: + | SafeJwtStorageOptions + | UnsafeJwtStorageOptions + | SafeJwtStorageOptions["secret"] + ): Foxx.SessionStorage; + export = jwtStorage; +} + +declare module "@arangodb/foxx/sessions/transports/cookie" { + interface CookieTransportOptions { + name?: string; + ttl?: number; + algorithm?: ArangoDB.HashAlgorithm; + secret?: string; + path?: string; + domain?: string; + secure?: string; + httpOnly?: string; + } + function cookieTransport( + options?: CookieTransportOptions + ): Foxx.SessionTransport; + function cookieTransport(name: string): Foxx.SessionTransport; + export = cookieTransport; +} + +declare module "@arangodb/foxx/sessions/transports/header" { + interface HeaderTransportOptions { + name?: string; + } + function headerTransport( + options?: HeaderTransportOptions + ): Foxx.SessionTransport; + function headerTransport(name: string): Foxx.SessionTransport; + export = headerTransport; +} + +declare module "@arangodb/foxx/auth" { + interface AuthData { + method: string; + salt: string; + hash: string; + } + interface Authenticator { + create(password: string): AuthData; + verify(hash?: AuthData, password?: string): boolean; + } + interface AuthOptions { + method?: ArangoDB.HashAlgorithm; + saltLength?: number; + } + function createAuth(options?: AuthOptions): Authenticator; + export = createAuth; +} + +declare module "@arangodb/foxx/oauth1" { + interface OAuth1Options { + requestTokenEndpoint: string; + authEndpoint: string; + accessTokenEndpoint: string; + activeUserEndpoint?: string; + clientId: string; + clientSecret: string; + signatureMethod?: "HMAC-SHA1" | "PLAINTEXT"; + } + interface OAuth1Client { + fetchRequestToken( + oauth_callback: string, + qs?: { [key: string]: string | undefined } + ): any; + getAuthUrl( + oauth_token: string, + qs?: { [key: string]: string | undefined } + ): string; + exchangeRequestToken( + oauth_token: string, + oauth_verifier: string, + qs?: { [key: string]: string | undefined } + ): any; + fetchActiveUser( + oauth_token: string, + oauth_token_secret: string, + qs?: { [key: string]: string | undefined } + ): any; + createSignedRequest( + method: ArangoDB.HttpMethod, + url: string, + parameters: string | { [key: string]: string | undefined } | null, + oauth_token: string, + oauth_token_secret: string + ): { + url: string; + qs: string; + headers: { accept: "application/json"; authorization: string }; + }; + } + function createOAuth1Client(options: OAuth1Options): OAuth1Client; + export = createOAuth1Client; +} + +declare module "@arangodb/foxx/oauth2" { + interface OAuth2Options { + authEndpoint: string; + tokenEndpoint: string; + refreshEndpoint?: string; + activeUserEndpoint?: string; + clientId: string; + clientSecret: string; + } + interface OAuth2Client { + getAuthUrl( + redirect_uri: string, + options?: { response_type?: string } + ): string; + exchangeGrantToken( + code: string, + redirect_uri: string, + options?: { grant_type?: string } + ): any; + fetchActiveUser(access_token: string): any; + } + function createOAuth2Client(options: OAuth2Options): OAuth2Client; + export = createOAuth2Client; +} + +declare module "@arangodb/foxx" { + function createRouter(): Foxx.Router; +} + +declare module "@arangodb/request" { + interface Response { + rawBody: Buffer; + body: string | Buffer; + json?: any; + headers: { [key: string]: string | undefined }; + status: number; + statusCode: number; + message: string; + throw(message?: string): void | never; + } + interface RequestOptions { + qs?: object; + useQuerystring?: boolean; + headers?: { [key: string]: string | undefined }; + body?: any; + json?: boolean; + form?: any; + auth?: { username: string; password?: string } | { bearer: string }; + sslProtocol?: number; + followRedirect?: boolean; + maxRedirects?: number; + encoding?: string | null; + timeout?: number; + returnBodyOnError?: boolean; + } + function method(options: { url: string } & RequestOptions): Response; + function method(url: string, options?: RequestOptions): Response; + interface Request { + ( + options: { + url: string; + method?: ArangoDB.HttpMethod; + } & RequestOptions + ): Response; + head: typeof method; + get: typeof method; + post: typeof method; + put: typeof method; + patch: typeof method; + delete: typeof method; + } + const request: Request; + export = request; +} + +declare module "@arangodb/crypto" { + function createNonce(): string; + function checkAndMarkNonce(nonce: string): void; + function rand(): number; + function genRandomAlphaNumbers(length: number): string; + function genRandomNumbers(length: number): string; + function genRandomSalt(length: number): string; + function jwtEncode( + key: string, + message: string, + algorithm: ArangoDB.JwtAlgorithm + ): string; + function jwtEncode(key: null, message: string, algorithm: "none"): string; + function jwtDecode( + key: string | null, + token: string, + noVerify?: boolean + ): string | null; + function md5(message: string): string; + function sha1(message: string): string; + function sha224(message: string): string; + function sha256(message: string): string; + function sha384(message: string): string; + function sha512(message: string): string; + function constantEquals(a: string, b: string): boolean; + function pbkdf2( + salt: string, + password: string, + iterations: number, + keyLength: number + ): string; + function hmac( + key: string, + message: string, + algorithm: ArangoDB.HashAlgorithm + ): string; +} + +declare module "@arangodb/general-graph" { + interface EdgeDefinition { + collection: string; + from: string[]; + to: string[]; + } + interface CommonNeighbors { + left: string; + right: string; + neighbors: string[]; + } + interface CountCommonNeighbors { + [key: string]: Array<{ [key: string]: number | undefined }> | undefined; + } + interface CommonProperties { + [key: string]: + | Array<{ _id: string } & { [key: string]: any }> + | undefined; + } + interface CountCommonProperties { + [key: string]: number | undefined; + } + interface Path< + A extends object = any, + B extends object = any, + E extends object = any, + V extends object = never + > { + source: ArangoDB.Document; + destination: ArangoDB.Document; + edges: Array>; + vertice: Array>; + } + interface ShortestPath { + vertices: string[]; + edges: Array>; + distance: number; + } + interface Distance { + startVertex: string; + vertex: string; + distance: number; + } + interface Eccentricity { + [key: string]: number | undefined; + } + type Closeness = Eccentricity; + type Betweenness = Eccentricity; + type Example = Array | object | string | null; + interface ConnectingEdgesOptions { + edgeExamples?: Example; + edgeCollectionRestriction?: string[] | string; + vertex1CollectionRestriction?: string[] | string; + vertex2CollectionRestriction?: string[] | string; + } + interface NeighborsOptions { + direction?: ArangoDB.EdgeDirection; + edgeExamples?: Example; + neighborExamples?: Example; + edgeCollectionRestriction?: string[] | string; + vertexCollectionRestriction?: string[] | string; + minDepth?: number; + maxDepth?: number; + } + interface CommonPropertiesOptions { + vertex1CollectionRestriction?: string[] | string; + vertex2CollectionRestriction?: string[] | string; + ignoredProperties?: string[] | string; + } + interface PathsOptions { + direction?: ArangoDB.EdgeDirection; + followCycles?: boolean; + minLength?: number; + maxLength?: number; + } + interface ShortestPathOptions { + direction?: ArangoDB.EdgeDirection; + edgeCollectionRestriction?: string[] | string; + startVertexCollectionRestriction?: string[] | string; + endVertexCollectionRestriction?: string[] | string; + weight?: string; + defaultWeight?: number; + } + type EccentricityOptions = ShortestPathOptions; + type ClosenessOptions = ShortestPathOptions; + interface BetweennessOptions { + direction?: ArangoDB.EdgeDirection; + weight?: string; + defaultWeight?: number; + } + type RadiusOptions = BetweennessOptions; + type DiameterOptions = BetweennessOptions; + interface Graph { + _extendEdgeDefinitions(edgeDefinition: EdgeDefinition): void; + _editEdgeDefinitions(edgeDefinition: EdgeDefinition): void; + _deleteEdgeDefinition( + edgeCollectionName: string, + dropCollection?: boolean + ): void; + _addVertexCollection( + orphanCollectionName: string, + createCollection?: boolean + ): void; + _orphanCollections(): string[]; + _removeVertexCollection( + orphanCollectionName: string, + dropCollection?: boolean + ): void; + _getConnectingEdges( + vertexExample1: Example, + vertexExample2: Example, + options: ConnectingEdgesOptions + ): ArangoDB.Edge; + _fromVertex(edgeId: string): ArangoDB.Document; + _toVertex(edgeId: string): ArangoDB.Document; + _neighbors( + vertexExample: Example, + options?: NeighborsOptions + ): string[]; + _commonNeighbors( + vertex1Example: Example, + vertex2Example: Example, + vertex1Options?: NeighborsOptions, + vertex2Options?: NeighborsOptions + ): CommonNeighbors[]; + _countCommonNeighbors( + vertex1Example: Example, + vertex2Example: Example, + vertex1Options?: NeighborsOptions, + vertex2Options?: NeighborsOptions + ): CountCommonNeighbors[]; + _commonProperties( + vertexExample1: Example, + vertex2Example: Example, + options?: CommonPropertiesOptions + ): CommonProperties[]; + _countCommonProperties( + vertex1Example: Example, + vertex2Example: Example, + options?: CommonPropertiesOptions + ): CountCommonProperties[]; + _paths(options?: PathsOptions): Path[]; + _shortestPath( + startVertexExample: Example, + endVertexExample: Example, + options?: ShortestPathOptions + ): ShortestPath[]; + _distanceTo( + startVertexExample: Example, + endVertexExample: Example, + options?: ShortestPathOptions + ): Distance[]; + _absoluteEccentricity( + vertexExample: Example, + options?: EccentricityOptions + ): Eccentricity; + _eccentricity( + vertexExample: Example, + options?: EccentricityOptions + ): Eccentricity; + _absoluteCloseness( + vertexExample: Example, + options?: ClosenessOptions + ): Closeness; + _closeness( + vertexExample: Example, + options?: ClosenessOptions + ): Closeness; + _absoluteBetweenness( + vertexExample: Example, + options?: BetweennessOptions + ): Betweenness; + _betweenness( + vertexExample: Example, + options?: BetweennessOptions + ): Betweenness; + _radius(vertexExample: Example, options?: RadiusOptions): number; + _diameter(vertexExample: Example, options?: DiameterOptions): number; + } + function _create( + name: string, + edgeDefinitions?: EdgeDefinition[], + orphanCollections?: string[] + ): Graph & { + [key: string]: ArangoDB.Collection | undefined; + }; + function _list(): string[]; + function _graph( + name: string + ): Graph & { + [key: string]: ArangoDB.Collection | undefined; + }; + function _drop(name: string, dropCollections?: boolean): boolean; + function _relation( + name: string, + fromVertexCollections: string[] | string, + toVertexCollections: string[] | string + ): EdgeDefinition; + function _edgeDefinitions(...relations: EdgeDefinition[]): EdgeDefinition[]; + function _extendEdgeDefinitions( + edgeDefinitions: EdgeDefinition[], + ...relations: EdgeDefinition[] + ): EdgeDefinition[]; +} + +declare module "@arangodb/locals" { + const context: Foxx.Context; +} + +interface NodeModule { + context: Foxx.Context; +} + +interface Console { + logLines(...args: any[]): void; + errorLines(...args: any[]): void; + warnLines(...args: any[]): void; + infoLines(...args: any[]): void; + debugLines(...args: any[]): void; + errorStack(err: Error, msg?: string): void; + warnStack(err: Error, msg?: string): void; + infoStack(err: Error, msg?: string): void; + debugStack(err: Error, msg?: string): void; +} diff --git a/types/arangodb/tsconfig.json b/types/arangodb/tsconfig.json new file mode 100644 index 0000000000..f778fd7c47 --- /dev/null +++ b/types/arangodb/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "arangodb-tests.ts"] +} diff --git a/types/react-native-linear-gradient/tslint.json b/types/arangodb/tslint.json similarity index 100% rename from types/react-native-linear-gradient/tslint.json rename to types/arangodb/tslint.json diff --git a/types/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts index dadb02d265..4944b00bf2 100644 --- a/types/arcgis-js-api/index.d.ts +++ b/types/arcgis-js-api/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for ArcGIS API for JavaScript 4.6 +// Type definitions for ArcGIS API for JavaScript 4.7 // Project: http://js.arcgis.com // Definitions by: Esri +// Bjorn Svensson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -163,6 +164,8 @@ declare namespace __esri { export type ElevationLayerLayerviewDestroyEventHandler = (event: ElevationLayerLayerviewDestroyEvent) => void; + export type ElevationSamplerChangedEventHandler = (event: ElevationSamplerChangedEvent) => void; + export type FeatureLayerLayerviewCreateEventHandler = (event: FeatureLayerLayerviewCreateEvent) => void; export type FeatureLayerLayerviewDestroyEventHandler = (event: FeatureLayerLayerviewDestroyEvent) => void; @@ -203,14 +206,20 @@ declare namespace __esri { export type MapNotesLayerLayerviewDestroyEventHandler = (event: MapNotesLayerLayerviewDestroyEvent) => void; + export type MapViewBlurEventHandler = (event: MapViewBlurEvent) => void; + export type MapViewClickEventHandler = (event: MapViewClickEvent) => void; export type MapViewDoubleClickEventHandler = (event: MapViewDoubleClickEvent) => void; export type MapViewDragEventHandler = (event: MapViewDragEvent) => void; + export type MapViewFocusEventHandler = (event: MapViewFocusEvent) => void; + export type MapViewHoldEventHandler = (event: MapViewHoldEvent) => void; + export type MapViewImmediateClickEventHandler = (event: MapViewImmediateClickEvent) => void; + export type MapViewKeyDownEventHandler = (event: MapViewKeyDownEvent) => void; export type MapViewKeyUpEventHandler = (event: MapViewKeyUpEvent) => void; @@ -291,7 +300,7 @@ declare namespace __esri { interface BasemapConstructor { /** - * Basemap is used for creating custom basemaps. These basemaps may be created from tiled services you publish to your own server or from tiled services published by third parties. + * Creates a new basemap object. Basemaps can be created from a [PortalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html), from a well known [basemap ID](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#fromId), or can be used for creating custom basemaps. These basemaps may be created from tiled services you publish to your own server, or from tiled services published by third parties. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) */ @@ -827,6 +836,12 @@ declare namespace __esri { export interface configWorkers extends Object { + /** + * The absolute url to the AMD loader used in the worker. The default url points to the AMD loader used by the API. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) + */ + loaderUrl?: any; /** * The configuration parameters for [the workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html). * @@ -837,6 +852,12 @@ declare namespace __esri { export interface configWorkersLoaderConfig extends Object { + /** + * The AMD loader loads all code relative to the baseUrl. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) + */ + baseUrl?: string; /** * Determines if the specified feature capabilities are supported. * @@ -1037,7 +1058,7 @@ declare namespace __esri { export const Error: Error; - export class Evented { + interface Evented { /** * Emits an event on the instance. This method should only be used when creating subclasses of this class. * @@ -1047,7 +1068,7 @@ declare namespace __esri { * @param event The event payload. * */ - protected emit(type: string, event: any): void; + emit(type: string, event: any): void; /** * Indicates whether there is an event listener on the instance that matches the provided event name. * @@ -1069,11 +1090,96 @@ declare namespace __esri { on(type: string, listener: EventHandler): IHandle; } + interface EventedConstructor { + + + new(): Evented; + } + + export const Evented: EventedConstructor; + export type EventHandler = (event: any) => void; + interface HandleOwner extends Accessor { + /** + * Handle registry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles) + */ + handles: void; + } + + interface HandleOwnerConstructor { + + + new(properties?: HandleOwnerProperties): HandleOwner; + } + + export const HandleOwner: HandleOwnerConstructor; + + interface HandleOwnerProperties { + /** + * Handle registry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles) + */ + handles?: void; + } + + interface Handles extends Accessor { + /** + * Adds a group of handles. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#add) + * + * @param handles An array or collection handles to group. + * @param key group handle key + * + */ + add(handles: WatchHandle | WatchHandle[] | Collection, key?: any): void; + /** + * Returns true if a group exists for the provided key, false otherwise. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#has) + * + * @param key group handle key + * + */ + has(key: any): boolean; + /** + * Removes a group of handles. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#remove) + * + * @param key A group key or an array or collection of group keys to remove. + * + */ + remove(key?: any): void; + /** + * Removes all handles. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#removeAll) + * + * + */ + removeAll(): void; + } + + interface HandlesConstructor { + + + new(properties?: HandlesProperties): Handles; + } + + export const Handles: HandlesConstructor; + + interface HandlesProperties { + + } + interface JSONSupport { /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-JSONSupport.html#toJSON) * @@ -1093,7 +1199,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-JSONSupport.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Classification_objects/02r30000019z000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): any; @@ -1149,11 +1255,11 @@ declare namespace __esri { readonly loadWarnings: any[]; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `always()` may be used to execute a function if the promise is rejected or resolved. The input function will always execute no matter the response. For more information about promises, see the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page. + * **Deprecated at 4.7.** `always()` may be used to execute a function if creating an instance of the class is rejected or resolved. The input function will always execute no matter the response. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#always) * - * @param callbackOrErrback The function to execute when the promise is rejected or resolved. + * @param callbackOrErrback The function to execute when creating an instance of the class is rejected or resolved. * */ always(callbackOrErrback?: Function): IPromise; @@ -1166,7 +1272,7 @@ declare namespace __esri { */ cancelLoad(): void; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isFulfilled()` may be used to verify if the promise is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isFulfilled()` may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isFulfilled) * @@ -1174,7 +1280,7 @@ declare namespace __esri { */ isFulfilled(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isRejected()` may be used to verify if the promise is rejected. If it is rejected, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isRejected()` may be used to verify if creating an instance of the class is rejected. If it is rejected, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isRejected) * @@ -1182,7 +1288,7 @@ declare namespace __esri { */ isRejected(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isResolved()` may be used to verify if the promise is resolved. If it is resolved, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isResolved()` may be used to verify if creating an instance of the class is resolved. If it is resolved, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isResolved) * @@ -1198,36 +1304,24 @@ declare namespace __esri { */ load(): IPromise; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Use `otherwise()` to call a function once the promise is rejected. + * **Deprecated at 4.7.** Use `otherwise()` to call a function once creating an instance of the class is rejected. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#otherwise) * - * @param errback The function to execute when the promise fails. + * @param errback The function to execute when creating an instance of the class fails. * */ otherwise(errback?: Function): IPromise; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `then()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the promise resolves (when the instance of the class loads). The `errback` executes if the promise fails. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for additional details. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#then) - * - * @param callback The function to call when the promise resolves. - * @param errback The function to execute when the promise fails. - * @param progback The function to invoke when the promise emits a progress update. - * - */ - then(callback?: Function, errback?: Function, progback?: Function): IPromise; - /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the promise resolves (when the instance of the class loads). The `errback` executes if the promise fails. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for additional details. + * `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the instance of the class loads. The `errback` executes if the instance of the class fails to load. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#when) * * @param callback The function to call when the promise resolves. * @param errback The function to execute when the promise fails. - * @param progback The function to invoke when the promise emits a progress update. * */ - when(callback?: Function, errback?: Function, progback?: Function): IPromise; + when(callback?: Function, errback?: Function): IPromise; } interface LoadableConstructor { @@ -1244,16 +1338,16 @@ declare namespace __esri { interface corePromise { /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `always()` may be used to execute a function if the promise is rejected or resolved. The input function will always execute no matter the response. For more information about promises, see the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page. + * **Deprecated at 4.7.** `always()` may be used to execute a function if creating an instance of the class is rejected or resolved. The input function will always execute no matter the response. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#always) * - * @param callbackOrErrback The function to execute when the promise is rejected or resolved. + * @param callbackOrErrback The function to execute when creating an instance of the class is rejected or resolved. * */ always(callbackOrErrback?: Function): IPromise; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isFulfilled()` may be used to verify if the promise is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isFulfilled()` may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isFulfilled) * @@ -1261,7 +1355,7 @@ declare namespace __esri { */ isFulfilled(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isRejected()` may be used to verify if the promise is rejected. If it is rejected, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isRejected()` may be used to verify if creating an instance of the class is rejected. If it is rejected, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isRejected) * @@ -1269,7 +1363,7 @@ declare namespace __esri { */ isRejected(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `isResolved()` may be used to verify if the promise is resolved. If it is resolved, `true` will be returned. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for more information about promises. + * `isResolved()` may be used to verify if creating an instance of the class is resolved. If it is resolved, `true` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isResolved) * @@ -1277,36 +1371,24 @@ declare namespace __esri { */ isResolved(): boolean; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Use `otherwise()` to call a function once the promise is rejected. + * **Deprecated at 4.7.** Use `otherwise()` to call a function once creating an instance of the class is rejected. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#otherwise) * - * @param errback The function to execute when the promise fails. + * @param errback The function to execute when creating an instance of the class fails. * */ otherwise(errback?: Function): IPromise; /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `then()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the promise resolves (when the instance of the class loads). The `errback` executes if the promise fails. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for additional details. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#then) - * - * @param callback The function to call when the promise resolves. - * @param errback The function to execute when the promise fails. - * @param progback The function to invoke when the promise emits a progress update. - * - */ - then(callback?: Function, errback?: Function, progback?: Function): IPromise; - /** - * An instance of this class is a [Promise](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html). Therefore `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the promise resolves (when the instance of the class loads). The `errback` executes if the promise fails. See the [Working with Promises](https://developers.arcgis.com/javascript/latest/guide/working-with-promises/index.html) guide page for additional details. + * `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the instance of the class loads. The `errback` executes if the instance of the class fails to load. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#when) * * @param callback The function to call when the promise resolves. * @param errback The function to execute when the promise fails. - * @param progback The function to invoke when the promise emits a progress update. * */ - when(callback?: Function, errback?: Function, progback?: Function): IPromise; + when(callback?: Function, errback?: Function): IPromise; } interface corePromiseConstructor { @@ -1404,6 +1486,120 @@ declare namespace __esri { export const requireUtils: requireUtils; + /** + * Various utilities and convenience functions for executing code at various phases of browser frames. The scheduling module allows you to register tasks that are executed in every animation frame. This can be used to synchronize updates with ongoing animations of the view, or to animate the view manually by adjusting the extent or camera in every frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html) + */ + interface scheduling { + /** + * Registers a frame task. An animation frame is composed of different phases to let various actors execute code before, after, or during the rendering of [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask) + * + * @param phases The callbacks for each phase of the frame. + * + */ + addFrameTask(phases: PhaseCallbacks): FrameTaskHandle; + /** + * Schedules the execution of a `callback` function at the next web browser tick. Unlike [addFrameTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask), a scheduled `callback` will only run once. Scheduling a task for the next execution tick can be useful when you want to throttle/accumulate functionality over a single javascript execution context. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#schedule) + * + * @param callback The function to call at the next tick. + * + */ + schedule(callback: Function): any; + } + + export const scheduling: scheduling; + + /** + * An object to remove or pause a frame task registered with [addFrameTask()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle) + */ + export interface FrameTaskHandle extends Object { + /** + * Pause the execution the frame task at every frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle) + * + * + */ + pause(): void; + /** + * Resumes the execution the frame task. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle) + * + * + */ + resume(): void; + /** + * Removes the frame task. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle) + * + * + */ + remove(): void; + } + + export type PhaseCallback = (event: PhaseEvent) => void; + + /** + * A set of [callbacks](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallback) that will be called at specific phases of the animation frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks) + */ + export interface PhaseCallbacks extends Object { + /** + * A callback called before rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks) + */ + prepare?: PhaseCallback; + /** + * A callback to execute rendering logic. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks) + */ + render?: PhaseCallback; + /** + * A callback to execute state update logic. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks) + */ + update?: PhaseCallback; + } + + /** + * An object with timing information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent) + */ + export interface PhaseEvent extends Object { + /** + * The absolute time at the start of the current animation frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent) + */ + time: number; + /** + * The elapsed time since the last animation frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent) + */ + deltaTime: number; + /** + * The amount of time spent within the current animation frame. This can be used for budgeting (e.g. some tasks may already have run). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent) + */ + elapsedFrameTime: number; + } + interface urlUtils { /** @@ -1701,15 +1897,29 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open) * - * @param client The instance of the client which will be using the [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html). * @param modulePath A fully qualified URL to a script to execute with the workers framework. + * @param options Worker options. See properties below for object specifications. + * @param options.client The objects defining the API accessible from the module. + * @param options.strategy + * Indicates how to load the module. See the table below for a list of possible values. + * + * Possible Value | Description + * ---------------|------------ + * distributed | The module is loaded in each available worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting an available worker. Use this strategy if the module doesn't maintain information between invocations (stateless). + * dedicated | The module is loaded in one worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting a same worker. Use this strategy if the module maintains information from previous invocations or communication between main and worker threads needs to be stateful. + * local | The module is loaded in the main thread. Use this strategy if when using the worker framework API while disabling the use of workers. * */ - open(client: any, modulePath: string): IPromise; + open(modulePath: string, options?: workersOpenOptions): IPromise; } export const workers: workers; + /** + * The Connection class is used to access code loaded into a separate thread via the [workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html) + */ interface Connection { /** * A convenient method that broadcasts a message to all workers. Use this method if it is mandatory that all workers need to have a piece of information which is critical for them to process additional requests. @@ -1718,10 +1928,10 @@ declare namespace __esri { * * @param methodName The name of the method to invoke on all workers. * @param data The object which contains all required parameters to be passed to the method. The data passed between the main thread and the workers framework are copied, not shared. Objects are serialized and de-serialized on both ends. - * @param buffers An array of [transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) buffers. Each buffer in the array should have a corresponding entry in the data object. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a big performance improvement when sending large data sets. + * @param transferList An array of [Transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) objects. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a big performance improvement when sending large data sets. * */ - broadcast(methodName: string, data?: any, buffers?: ArrayBuffer[]): IPromise; + broadcast(methodName: string, data?: any, transferList?: any[]): IPromise; /** * Closes the existing connection instance to workers. Notify all workers to destroy the connection instance and unload the connection module. * @@ -1737,25 +1947,39 @@ declare namespace __esri { * * @param methodName The name of the method to be invoked in the script. * @param data The object which contains all required parameters to be passed to the method. The data passed between the main thread and the workers framework are copied, not shared. Objects are serialized and de-serialized on both ends. - * @param buffers An array of [transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) buffers. Each buffer in the array should have a corresponding entry in the data object. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a big performance improvement when sending large data sets. + * @param transferList An array of [Transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) objects. Each transferable object in the array should have a corresponding entry in the data object. Transferable objects are transferred from one context to another with a zero-copy operation, which results in a big performance improvement when sending large data sets. * */ - invoke(methodName: string, data?: any, buffers?: ArrayBuffer[]): IPromise; + invoke(methodName: string, data?: any, transferList?: any[]): IPromise; } - interface ConnectionConstructor { + export const Connection: Connection; + + + export interface workersOpenOptions extends Object { /** - * The Connection class is used to access code loaded into a separate thread via the [workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html). + * The objects defining the API accessible from the module. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open) */ - - - new(client: any, id: number): Connection; + client?: any; + /** + * Indicates how to load the module. See the table below for a list of possible values. + * + * Possible Value | Description + * ---------------|------------ + * distributed | The module is loaded in each available worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting an available worker. Use this strategy if the module doesn't maintain information between invocations (stateless). + * dedicated | The module is loaded in one worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting a same worker. Use this strategy if the module maintains information from previous invocations or communication between main and worker threads needs to be stateful. + * local | The module is loaded in the main thread. Use this strategy if when using the worker framework API while disabling the use of workers. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open) + * + * @default distributed + */ + strategy?: any; } - export const Connection: ConnectionConstructor; - /** * A convenience module for importing [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/guide/typescript-setup/index.html). For example, rather than importing geometries one at a time like this: * @@ -1867,6 +2091,213 @@ declare namespace __esri { radiusUnit?: string; } + /** + * Converts between [points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) and formatted coordinates notation strings such as: + * * decimal degrees + * * degrees, minutes, and seconds + * * U.S. National Grid (USNG) + * * Military Grid Reference System (MGRS). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html) + */ + interface coordinateFormatter { + /** + * Parses coordinates in latitude/longitude notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The coordinates may use decimal degrees, degrees and decimal minutes, or degrees, minutes, and seconds format. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the latitude/longitude string. If no spatial reference is provided, it is assumed the latitude/longitude coordinates are in WGS84. **Supported characters** + * + * | Symbol | Character | Name | Unicode number | HTML code | + * | --- | --- | --- | --- | --- | + * | Degree | * | Asterisk | U+002A | &#42; | + * | | ^ | Circumflex Accent | U+005E | &#94;| + * | | ~ | Tilde | U+007E | &#126; | + * | | ° | Degree Sign | U+00B0 | &#176; | + * | Minute | ' | Apostrophe | U+0027 | &#39; | + * | | ′ | Prime | U+2032 | &#8242; | + * | Second | " | Quotation Mark | U+0022 | &#34; | + * + * The latitude/longitude string may contain leading and trailing whitespace, and may also contain a space, comma, or vertical bar symbol to separate the latitude from the longitude. It may also contain the characters 'N', 'S', 'E' and 'W', or use a minus (-) symbol to indicate the hemisphere of each value. Latitude/longitude notation examples: + * * 55 56 39.123N 003 09 43.034W + * * 55°56′39″N 3°09′43″W + * * 55~56.65205', -003~09.71723' + * * 55.9442008* | -3.1619539* + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromLatitudeLongitude) + * + * @param coordinates The latitude/longitude notation string for the coordinates. + * @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm). If `null`, WGS84 will be used. + * + */ + fromLatitudeLongitude(coordinates: string, spatialReference?: SpatialReference): Point; + /** + * Parses coordinates in Military Grid Reference System (MGRS) notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the MGRS string. If no spatial reference is provided, it is assumed the MGRS string is referenced to WGS84. Note that the choice between zone 01 and 60 has no impact when reading from an MGRS notation string. The MGRS string can contain leading and trailing whitespace and can have whitespace between the grid zone designator, the 100km square identifier, and the numerical eastings and northings. MGRS notation examples: + * * 30UVG898998 + * * 30UVG 89885 99877 + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromMgrs) + * + * @param coordinates The MGRS notation string for the coordinates. + * @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) referenced by the MGRS coordinates. If `null`, WGS84 will be used. + * @param conversionMode The mode used by the given MGRS coordinates. **Known values**: automatic | new-180-in-zone-01 | new-180-in-zone-60 | old-180-in-zone-01 | old-180-in-zone-60 + * + */ + fromMgrs(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point; + /** + * Parses coordinates in United States National Grid (USNG) notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the USNG string. If no spatial reference is provided and the USNG string is suffixed with "(NAD 27)", it is assumed the USNG string is referenced to NAD 27. If no spatial reference is provided and no such suffix exists, it is assumed the USNG string is referenced to WGS84. USNG notation examples: + * * 13TFJ 23 59 + * * 13TFJ2374159574 + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromUsng) + * + * @param coordinates The USNG notation string for the coordinates. + * @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) that the USNG coordinates are in. If `null`, WGS84 will be used. + * + */ + fromUsng(coordinates: string, spatialReference?: SpatialReference): Point; + /** + * Parses coordinates in Universal Transverse Mercator (UTM) notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the UTM string. If no spatial reference is provided, it is assumed the UTM string is referenced to WGS84. The UTM string can contain leading and trailing whitespace and can have whitespace between the zone and latitude designator and the numerical eastings and northings. UTM notation examples: + * * 30U 489885 6199877 + * * 30U4898856199877 + * * 30N 489885 6199877 (using N/S indicator) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromUtm) + * + * @param coordinates The UTM notation string for the coordinates. + * @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) that the UTM coordinates are in. If `null`, WGS84 will be used. + * @param conversionMode The latitude notation scheme used by the given UTM coordinates, either a latitudinal band, or a hemisphere designator. **Known values**: latitude-band-indicators | north-south-indicators + * + */ + fromUtm(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point; + /** + * Indicates if all dependencies of this module have been loaded. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#isLoaded) + * + * + */ + isLoaded(): boolean; + /** + * Indicates if this module is supported in the current browser. The browser must support [WebAssembly](https://caniuse.com/#feat=wasm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#isSupported) + * + * + */ + isSupported(): boolean; + /** + * Load this module's dependencies. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#load) + * + * + */ + load(): IPromise; + /** + * Returns formatted coordinates in latitude/longitude notation representing the given point's location. The latitude/longitude string will contain a space separating the latitude from the longitude value, and the characters 'N' or 'S', and 'E' and 'W', to indicate the hemisphere of each value. The string will also contain spaces separating the components (degrees, minutes, seconds) of each value. The precision of the output is controlled by both the `format` and `decimalPlaces` parameters. For example: + * + * | Decimal places | format | Example output | Angular precision | Approximate precision | + * | --- | --- | --- | --- | --- | + * | 0 | dd | 056N 0003W | 1deg | 100km | + * | 1 | dd | 55.9N 003.2W | 0.1deg | 10km | + * | 2 | dd | 55.94N 003.16W | 0.01deg | 1km | + * | 3 | dd | 55.944N 003.162W | 0.001deg | 100m | + * | 0 | ddm | 55 057N 003 010W | 1min | 2km | + * | 1 | ddm | 55 56.7N 003 09.7W | 0.1min | 200m | + * | 2 | ddm | 55 56.65N 003 09.72W | 0.01min | 20m | + * | 3 | ddm | 55 56.650N 003 09.717W | 0.001min | 2m | + * | 0 | dms | 55 56 039N 003 09 043W | 1sec | 30m | + * | 1 | dms | 55 56 39.1N 003 09 43.0W | 0.1sec| 3m | + * | 2 | dms | 55 56 39.12N 003 09 43.03W | 0.01sec | 300mm | + * | 3 | dms | 55 56 39.123N 003 09 43.034W | 0.001sec | 30mm | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toLatitudeLongitude) + * + * @param point The location to be represented as a formatted latitude/longitude string. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm). + * @param format The mode to use when formatting the latitude/longitude string. **Known values**: dd | ddm | dms + * @param decimalPlaces The number of decimal places to use, it should be an integer from 0 to 16. + * + */ + toLatitudeLongitude(point: Point, format: string, decimalPlaces?: number): string; + /** + * Returns formatted coordinates in Military Grid Reference System (MGRS) notation representing the given point's location. Note that the choice between zone 01 and 60 has an impact only when generating the MGRS notation string for a point with longitude of exactly 180deg. The precision value controls the number of digits used to represent each numerical easting and northing value within the MGRS string. For example: + * + * | precision | add_spaces | Example output | Approximate precision | + * | --- | --- | --- | --- | + * | 0 | false | 30UVG | 100km | + * | 1 | false | 30UVG89 | 10km | + * | 2 | false | 30UVG8999 | 1km | + * | 3 | false | 30UVG898998 | 100m | + * | 4 | false | 30UVG89889988 | 10m | + * | 5 | false | 30UVG8988499881 | 1m | + * | 0 | true | 30U VG | 100km | + * | 1 | true | 30U VG 8 9 | 10m | + * | 2 | true | 30U VG 89 99 | 1km | + * | 3 | true | 30U VG 898 998 | 100m | + * | 4 | true | 30U VG 8988 9988 | 10m | + * | 5 | true | 30U VG 89884 99881 | 1m | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toMgrs) + * + * @param point The location to be represented in MGRS notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) + * @param conversionMode The mode to use for the returned MGRS notation string. **Known values**: automatic | new-180-in-zone-01 | new-180-in-zone-60 | old-180-in-zone-01 | old-180-in-zone-60 + * @param precision The precision with which to represent the coordinates, it should be an integer from 0 to 8. + * @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the grid zone designator, the 100km square identifier, and the numerical easting and northing values. + * + */ + toMgrs(point: Point, conversionMode: string, precision?: number, addSpaces?: boolean): string; + /** + * Returns formatted coordinates in United States National Grid (USNG) notation representing the given point's location. The precision value controls the number of digits used to represent each numerical easting and northing value within the USNG string. For example: + * + * | precision | add_spaces | Example output | Approximate precision | + * | --- | --- | --- | --- | + * | 0 | false | 13TFJ | 100km | + * | 1 | false | 13TFJ25 | 10km | + * | 2 | false | 13TFJ2359 | 1km | + * | 3 | false | 13TFJ237595 | 100m | + * | 4 | false | 13TFJ23745951 | 10m | + * | 5 | false | 13TFJ2374359512 | 1m | + * | 0 | true | 13T FJ | 100km | + * | 1 | true | 13T FJ 2 5 | 10m | + * | 2 | true | 13T FJ 23 59 | 1km | + * | 3 | true | 13T FJ 237 595 | 100m | + * | 4 | true | 13T FJ 2374 5951 | 10m | + * | 5 | true | 13T FJ 23743 59512 | 1m | + * | 4* | false | 13TFJ23795929 (NAD 27) | 10m | + * | 2* | true | 13T FJ 23 59 (NAD 27) | 1km | + * * *When the point's spatial reference is based on NAD 27.* + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toUsng) + * + * @param point The location to be represented in USNG notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm). + * @param precision The precision with which to represent the coordinates, it should be an integer from 0 to 8. + * @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the grid zone designator, the 100km square identifier, and the numerical easting and northing values. + * + */ + toUsng(point: Point, precision?: number, addSpaces?: boolean): string; + /** + * Returns formatted coordinates in Universal Transverse Mercator (UTM) notation representing the given point's location. Example output for a point in the southern hemisphere: + * + * | conversionMode | add_spaces | Example output | + * | --- | --- | --- | + * | latitude-band-indicators | false | 30U4898846199881 | + * | latitude-band-indicators | true | 30U 489884 6199881 | + * | north-south-indicators | false | 30N4898846199881 | + * | north-south-indicators | true | 30N 489884 6199881 | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toUtm) + * + * @param point The location to be represented in UTM notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) + * @param conversionMode The latitude notation scheme to use in the returned UTM notation string, either a latitudinal band, or a hemisphere designator. **Known values**: latitude-band-indicators | north-south-indicators + * @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the UTM zone and latitude designator and each numerical easting and northing value. + * + */ + toUtm(point: Point, conversionMode: string, addSpaces?: boolean): string; + } + + export const coordinateFormatter: coordinateFormatter; + interface Extent extends Geometry { /** * The center point of the extent in map units. @@ -2165,7 +2596,7 @@ declare namespace __esri { */ spatialReference: SpatialReference; /** - * The geometry type. **Possible Values:** point | multipoint | polyline | polygon | extent + * The geometry type. **Possible Values:** point | multipoint | polyline | polygon | extent | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#type) */ @@ -2218,7 +2649,7 @@ declare namespace __esri { interface geometryEngine { /** - * Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). + * Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#buffer) * @@ -2384,7 +2815,7 @@ declare namespace __esri { */ geodesicArea(geometry: Polygon, unit: string | number): number; /** - * Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#buffer) instead. If the input geometries have a [geographic coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). + * Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#buffer) instead. If the input geometries have a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer) * @@ -2636,7 +3067,7 @@ declare namespace __esri { interface geometryEngineAsync { /** - * Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). + * Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#buffer) * @@ -2802,7 +3233,7 @@ declare namespace __esri { */ geodesicArea(geometry: Polygon, unit: string | number): IPromise; /** - * Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#buffer) instead. If the input geometries have a [geographic coordinate system](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). + * Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#buffer) instead. If the input geometries have a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer) * @@ -3085,6 +3516,538 @@ declare namespace __esri { vertCRS?: string; } + interface Mesh extends Geometry { + /** + * An array of mesh components that can be used to apply materials to different regions of the same mesh. There are three common usage patterns for components. 1. **Specify a material for the whole mesh.** In this case, use a single component with only a material (leaving faces as `null`). 2. **Reuse vertex attributes.** When modeling continuous surfaces, it can be convenient to only specify vertices once and then simply refer to them. In this case, use a single component with faces set to index the vertex attributes that form triangles. 3. **Specify multiple materials for the same mesh.** In this case, use multiple components with faces that determine to which region of the mesh the material of the component applies. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#components) + */ + components: MeshComponent[]; + /** + * For Mesh, the type is always `mesh`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#type) + */ + readonly type: "mesh"; + /** + * Object describing the attributes of each vertex of the mesh. Vertex attributes are flat numerical arrays that describe the position (mandatory), normal (used for lighting calculations and shading) and uv (used for mapping material images to the mesh surface) for each vertex. Vertex attributes can be addressed by indices specified in the components [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property. If the mesh does not contain any components, or if a component does not specify any faces, then the vertex attributes are interpreted as if each consecutive vertex triple makes up a triangle. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + vertexAttributes: MeshVertexAttributes; + + /** + * Adds a component to the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#addComponent) + * + * @param component The component to add. + * + */ + addComponent(component: MeshComponent): void; + /** + * Centers the mesh at the specified location without changing its scale. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [centerAt()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt) + * + * @param location The location at which to center the mesh. + * @param params Additional parameters. + * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset applied to center the mesh is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * @param params.origin The origin at which to center. If not specified, the mesh will be centered at the mesh extent center. + * + */ + centerAt(location: Point, params?: MeshCenterAtParams): Mesh; + /** + * Creates a deep clone of the Mesh object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) + * + * + */ + clone(): Mesh; + /** + * Offsets the mesh geometry by the specified distance in x, y, and z. The units of x, y, and z are the units of the spatial reference. When the offset is applied geographically (default for either WGS84 or WebMercator), then the offsets are interpreted in meters. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [offset()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset) + * + * @param dx The amount to offset the geometry in the x direction. + * @param dy The amount to offset the geometry in the y direction. + * @param dz The amount to offset the geometry in the z direction. + * @param params Additional parameters. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + */ + offset(dx: number, dy: number, dz: number, params?: MeshOffsetParams): Mesh; + /** + * Removes a component from the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#removeComponent) + * + * @param component The component to remove. + * + */ + removeComponent(component: MeshComponent): void; + /** + * Rotates the mesh geometry around its x, y and z axis (in that order). For each rotation angle, the rotation direction is clockwise when looking in the direction of the respective axis. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [rotate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate) + * + * @param angleX The angle by which to rotate around the x-axis (in degrees). + * @param angleY The angle by which to rotate around the y-axis (in degrees). + * @param angleZ The angle by which to rotate around the z-axis (in degrees). + * @param params Additional parameters. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the rotation is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * @param params.origin The origin around which to rotate. If not specified, the mesh will be rotated around the mesh extent center. + * + */ + rotate(angleX: number, angleY: number, angleZ: number, params?: MeshRotateParams): Mesh; + /** + * Notifies that any cached values that depend on vertex attributes need to be recalculated. Use this method after modifying the vertex attributes in place so that values that depend on them (such as the calculation of the extent) are recalculated accordingly. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributesChanged) + * + * + */ + vertexAttributesChanged(): void; + } + + interface MeshConstructor { + /** + * A mesh is a general, client-side 3D [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) type composed of [vertices with attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes). The vertices include geographic position, normals that affect lighting/shading and uv coordinates that can be used to map images to the mesh. Vertices are combined into 3D primitives to render the mesh in the scene (only triangle primitives are currently supported). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html) + */ + + new(properties?: MeshProperties): Mesh; + + + /** + * Creates a mesh representing a box. The spatial reference of the resulting mesh is the same as the location where it is placed. **Box UV coordinate space** The box geometry will have UV coordinates generated according to the following scheme: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + * + * @param location The location bottom center of the box. + * @param params Additional parameters. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.material The material to be used for the mesh. + * @param params.imageFace The face for generating image uv coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the `imageFace` parameter to one of `east`, `west`, `north`, `south`, `up` or `down`, the specified face will have full sized UV coordinates while the other faces will pertain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided `material` parameter will be applied to the specified `imageFace`. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box. + * + */ + createBox(location: Point, params?: MeshCreateBoxParams): Mesh; + /** + * Creates a mesh representing a cylinder. The spatial reference of the resulting mesh is the same as the location where it is placed. **Cylinder UV coordinate space** The cylinder geometry will have UV coordinates generated according to the following scheme (example is shown for 8 vertices cylinder): + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + * + * @param location The location of the bottom center of the cylinder. + * @param params Additional parameters. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance). + * @param params.material The material to be used for the mesh. + * + */ + createCylinder(location: Point, params?: MeshCreateCylinderParams): Mesh; + /** + * Creates a new mesh geometry from a polygon geometry. The resulting mesh contains only a position vertex attribute and a single component with faces. The default shading will be set to `flat`. The spatial reference of the resulting mesh is the same as the input polygon. The resulting mesh will not contain any uv nor normal vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon) + * + * @param polygon The input polygon. + * @param params Optional parameters. + * @param params.material The material to be used for the mesh. + * + */ + createFromPolygon(polygon: Polygon, params?: MeshCreateFromPolygonParams): Mesh; + /** + * Creates a mesh representing a plane. The spatial reference of the resulting mesh is the same as the location where it is placed. A plane consists of two triangles and may be conveniently oriented at creation time. **Plane UV coordinate space** The plane geometry will have UV coordinates generated according to the following scheme: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + * + * @param location The location of the bottom center of the plane. + * @param params Additional parameters. + * @param params.size A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.facing Direction the plane is facing. Possible values are `east`, `west`, `north`, `south`, `up` and `down`. Defaults to `up`, + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.material The material to be used for the mesh. + * + */ + createPlane(location: Point, params?: MeshCreatePlaneParams): Mesh; + /** + * Creates a mesh representing a sphere. The spatial reference of the resulting mesh is the same as the location where it is placed. **Sphere UV coordinate space** The sphere geometry will have UV coordinates generated according to the following scheme (example is shown for 8x8 vertices sphere): + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + * + * @param location The location of the bottom center of the sphere. + * @param params Additional parameters. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance). + * @param params.material The material to be used for the mesh. + * + */ + createSphere(location: Point, params?: MeshCreateSphereParams): Mesh; + + fromJSON(json: any): Mesh; + } + + export const Mesh: MeshConstructor; + + interface MeshProperties extends GeometryProperties { + /** + * An array of mesh components that can be used to apply materials to different regions of the same mesh. There are three common usage patterns for components. 1. **Specify a material for the whole mesh.** In this case, use a single component with only a material (leaving faces as `null`). 2. **Reuse vertex attributes.** When modeling continuous surfaces, it can be convenient to only specify vertices once and then simply refer to them. In this case, use a single component with faces set to index the vertex attributes that form triangles. 3. **Specify multiple materials for the same mesh.** In this case, use multiple components with faces that determine to which region of the mesh the material of the component applies. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#components) + */ + components?: MeshComponentProperties[]; + /** + * Object describing the attributes of each vertex of the mesh. Vertex attributes are flat numerical arrays that describe the position (mandatory), normal (used for lighting calculations and shading) and uv (used for mapping material images to the mesh surface) for each vertex. Vertex attributes can be addressed by indices specified in the components [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property. If the mesh does not contain any components, or if a component does not specify any faces, then the vertex attributes are interpreted as if each consecutive vertex triple makes up a triangle. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + vertexAttributes?: MeshVertexAttributesProperties; + } + + + export interface MeshCenterAtParams extends Object { + /** + * Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset applied to center the mesh is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt) + */ + geographic?: boolean; + /** + * The origin at which to center. If not specified, the mesh will be centered at the mesh extent center. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt) + */ + origin?: Point; + } + + + export interface MeshCreateBoxParams extends Object { + /** + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + size?: number | MeshCreateBoxParamsSize; + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + geographic?: boolean; + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + material?: MeshCreateBoxParamsMaterial; + /** + * The face for generating image uv coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the `imageFace` parameter to one of `east`, `west`, `north`, `south`, `up` or `down`, the specified face will have full sized UV coordinates while the other faces will pertain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided `material` parameter will be applied to the specified `imageFace`. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + imageFace?: string; + } + + + export interface MeshCreateBoxParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreateBoxParamsSize extends Object { + /** + * The width of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + width?: number; + /** + * The depth of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + depth?: number; + /** + * The height of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + height?: number; + } + + + export interface MeshCreateCylinderParams extends Object { + /** + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + size?: number | MeshCreateCylinderParamsSize; + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + geographic?: boolean; + /** + * The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + densificationFactor?: number; + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + material?: MeshCreateCylinderParamsMaterial; + } + + + export interface MeshCreateCylinderParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + color: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreateCylinderParamsSize extends Object { + /** + * The width of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + width?: number; + /** + * The depth of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + depth?: number; + /** + * The height of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + height?: number; + } + + + export interface MeshCreateFromPolygonParams extends Object { + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon) + */ + material?: MeshCreateFromPolygonParamsMaterial; + } + + + export interface MeshCreateFromPolygonParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreatePlaneParams extends Object { + /** + * A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + size?: number | MeshCreatePlaneParamsSize; + /** + * Direction the plane is facing. Possible values are `east`, `west`, `north`, `south`, `up` and `down`. Defaults to `up`, + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + facing?: string; + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + geographic?: boolean; + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + material?: MeshCreatePlaneParamsMaterial; + } + + + export interface MeshCreatePlaneParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreatePlaneParamsSize extends Object { + /** + * The width of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + width?: number; + /** + * The height of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + height?: number; + } + + + export interface MeshCreateSphereParams extends Object { + /** + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + size?: number | MeshCreateSphereParamsSize; + /** + * Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + geographic?: boolean; + /** + * The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + densificationFactor?: number; + /** + * The material to be used for the mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + material?: MeshCreateSphereParamsMaterial; + } + + + export interface MeshCreateSphereParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface MeshCreateSphereParamsSize extends Object { + /** + * The width of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + width?: number; + /** + * The depth of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + depth?: number; + /** + * The height of the created mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + height?: number; + } + + + export interface MeshOffsetParams extends Object { + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset) + */ + geographic?: boolean; + } + + + export interface MeshRotateParams extends Object { + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the rotation is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate) + */ + geographic?: boolean; + /** + * The origin around which to rotate. If not specified, the mesh will be rotated around the mesh extent center. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate) + */ + origin?: Point; + } + + + export interface MeshVertexAttributesProperties extends Object { + /** + * A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial reference system of the geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + position?: Float64Array | number[] | Float32Array; + /** + * A flat array of vertex uv coordinates (2 elements per vertex). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + uv?: Float32Array | number[] | Float64Array; + /** + * A flat array of the vertex normals (3 elements per vertex). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + normal?: Float32Array | number[] | Uint32Array; + } + + export interface MeshVertexAttributes extends AnonymousAccessor { + /** + * A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial reference system of the geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + position: Float64Array; + /** + * A flat array of vertex uv coordinates (2 elements per vertex). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + uv?: Float32Array; + /** + * A flat array of the vertex normals (3 elements per vertex). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) + */ + normal?: Float32Array; + } + interface Multipoint extends Geometry { /** * An array of points. @@ -3620,6 +4583,80 @@ declare namespace __esri { paths?: number[][][]; } + /** + * A client-side projection engine for converting geometries from one [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) to another. When projecting geometries the starting spatial reference must be specified on the input geometry. You can specify a specific geographic (datum) transformation for the [project](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) operation, or accept the default transformation if one is needed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) + */ + interface projection { + /** + * Returns the default geographic transformation used to convert the geometry from the input spatial reference to the output spatial reference. The default transformation is used when [projecting geometries](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) where the datum transformation is required but not specified in the `geographicTransformation` parameter. + * > **Known Limitations** + * * This method returns equation-based geographic transformations only. + * * Geographic transformations are returned with their maximum number of [steps](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps). Currently, number of steps is limited to 2. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformation) + * + * @param inSpatialReference The input spatial reference from which to project geometries. This is the spatial reference of the input geometries. + * @param outSpatialReference The spatial reference to which you are converting the geometries. + * @param extent An extent used to determine the suitability of the returned transformation. The extent will be re-projected to the `inSpatialReference` if it has a different spatial reference. + * + */ + getTransformation(inSpatialReference: SpatialReference | SpatialReferenceProperties, outSpatialReference: SpatialReference, extent?: Extent): GeographicTransformation; + /** + * Returns a list of all geographic transformations suitable to convert geometries from the input spatial reference to the specified output spatial reference. The list is ordered in descending order by suitability, with the most suitable being first in the list. + * > **Known Limitations** + * * This method returns all the suitable equation-based geographic transformations. + * * Geographic transformations are returned with their maximum number of [steps](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps). Currently, number of steps is limited to 2. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformations) + * + * @param inSpatialReference The spatial reference that the geometries are currently using. + * @param outSpatialReference The spatial reference to which you are converting the geometries to. + * @param extent An extent used to determine the suitability of the returned transformations. The extent will be re-projected to the input spatial reference if necessary. + * + */ + getTransformations(inSpatialReference: SpatialReference | SpatialReferenceProperties, outSpatialReference: SpatialReference, extent?: Extent): GeographicTransformation[]; + /** + * Indicates if all dependencies of this module have been loaded. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#isLoaded) + * + * + */ + isLoaded(): boolean; + /** + * Indicates if this module is supported in the browser. The browser must support [WebAssembly](https://caniuse.com/#feat=wasm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#isSupported) + * + * + */ + isSupported(): boolean; + /** + * Loads this module's dependencies. This method must be called before [projecting](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) geometries. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#load) + * + * + */ + load(): IPromise; + /** + * Projects a geometry or an array of geometries to the specified output spatial reference. A default geographic transformation is used if not explicitly provided, but required. Use the [getTransformation()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformation) method to find out which transformation is used by default for the given input and output spatial references. Note that you must [load](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#load) this module before attempting to project geometries. + * > **Known Limitations** This method uses the spatial reference of the first geometry as an input spatial reference. Therefore all geometries in the array must have the same spatial reference. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) + * + * @param geometry The geometry or geometries to project. + * @param outSpatialReference The spatial reference to which you are converting the geometries' coordinates. + * @param geographicTransformation The geographic transformation used to transform the geometries. Specify this parameter to project a geometry when the default transformation is not appropriate for your requirements. + * + */ + project(geometry: Geometry | Geometry[], outSpatialReference: SpatialReference | SpatialReferenceProperties, geographicTransformation?: GeographicTransformation): Geometry | Geometry[]; + } + + export const projection: projection; + interface ScreenPoint extends Accessor { /** * X-coordinate in pixels relative to the top-left corner of the view. @@ -3701,7 +4738,7 @@ declare namespace __esri { */ readonly isWrappable: boolean; /** - * The well-known ID of a spatial reference. See [Projected Coordinate Systems](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) and [Geographic Coordinate Systems](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) for the list of supported spatial references. + * The well-known ID of a spatial reference. See [Projected Coordinate Systems](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) and [Geographic Coordinate Systems](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) for the list of supported spatial references. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid) */ @@ -3758,7 +4795,7 @@ declare namespace __esri { interface SpatialReferenceProperties { /** - * The well-known ID of a spatial reference. See [Projected Coordinate Systems](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) and [Geographic Coordinate Systems](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) for the list of supported spatial references. + * The well-known ID of a spatial reference. See [Projected Coordinate Systems](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) and [Geographic Coordinate Systems](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) for the list of supported spatial references. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid) */ @@ -3771,6 +4808,123 @@ declare namespace __esri { wkt?: string; } + interface GeographicTransformation { + /** + * Geographic transformation steps. Each step represents a geographic transformation that will be used in the process of transforming coordinates from one geographic coordinate system to another. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps) + */ + steps: GeographicTransformationStep[]; + + /** + * Returns the inverse of the geographic transformation calling this method or `null` if the transformation is not invertible. The inverse of a transformation converts coordinates using the same method and parameters, but in the opposite direction of the original object. For example if the original object represents the `NAD_1983_HARN_To_NAD_1983_NSRS2007_1` transformation, then the inverse will transform from `NAD 83 (NSRS 2007)` to `NAD 83 (HARN)`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#getInverse) + * + * + */ + getInverse(): GeographicTransformation; + } + + interface GeographicTransformationConstructor { + /** + * Projecting your data between coordinate systems sometimes requires transforming between geographic coordinate systems. Geographic transformations are used to transform coordinates between spatial references that have different geographic coordinate systems, and thus different datums. Using the most suitable transformation ensures the best possible accuracy when converting geometries from one spatial reference to another. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html) + */ + + + new(properties?: any): GeographicTransformation; + } + + export const GeographicTransformation: GeographicTransformationConstructor; + + interface GeographicTransformationStep { + /** + * Indicates with the geographic transformation is inverted. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#isInverse) + * + * @default false + */ + isInverse: boolean; + /** + * The well-known id (wkid) hat represents a known geographic transformation. See [Geographic datum transformations](https://developers.arcgis.com/java/10-2/guide/datum-transformations.htm#ESRI_SECTION1_7635FE2A60E6449898D5AD0ADE2CA0C3) for the list of supported equation-based geographic transformations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#wkid) + */ + wkid: number; + /** + * The well-known text (wkt) that represents a known geographic transformation. See [Geographic datum transformations](https://developers.arcgis.com/java/10-2/guide/datum-transformations.htm#ESRI_SECTION1_7635FE2A60E6449898D5AD0ADE2CA0C3) for the list of supported equation-based geographic transformations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#wkt) + */ + wkt: string; + + /** + * Gets the inverse of the geographic transformation step used to call this method or `null` if the transformation step is not invertible. The inverse of a transformation converts coordinates using the same method and parameters, but in the opposite direction of the original object. For example if the original object represents the `NAD_1983_HARN_To_NAD_1983_NSRS2007_1` transformation, then the inverse will transform from `NAD 83 (NSRS 2007)` to `NAD 83 (HARN)`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#getInverse) + * + * + */ + getInverse(): GeographicTransformationStep; + } + + interface GeographicTransformationStepConstructor { + + + + new(properties?: any): GeographicTransformationStep; + } + + export const GeographicTransformationStep: GeographicTransformationStepConstructor; + + interface ImageMeshColor extends Accessor { + /** + * For ImageMeshColor the type is always `image`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#type) + */ + readonly type: "image"; + /** + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#url) + */ + url: string; + + /** + * Creates a deep clone. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#clone) + * + * + */ + clone(): ImageMeshColor; + } + + interface ImageMeshColorConstructor { + /** + * ImageMeshColor is a type of mesh color that represents an image mapped to the mesh by its uv vertex attributes. ImageMeshColor instances can be used with the [MeshComponent.material.color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html) + */ + + new(properties?: ImageMeshColorProperties): ImageMeshColor; + } + + export const ImageMeshColor: ImageMeshColorConstructor; + + interface ImageMeshColorProperties { + /** + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#url) + */ + url?: string; + } + interface jsonUtils { /** @@ -3778,7 +4932,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-jsonUtils.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geometry_objects/02r3000000n1000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): Geometry; @@ -3795,6 +4949,200 @@ declare namespace __esri { export const jsonUtils: jsonUtils; + interface MeshComponent extends Accessor { + /** + * A flat array of indices that refer to vertices in the [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) of the mesh to which the component belongs. Each triple of indices defines a triangle to render (i.e. the faces array must always have a length that is a multiple of 3). Note that the indices refer to **vertices** and not to the index of the first coordinate of a vertex in the [vertexAttributes.position](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) array. If faces is `null`, then all the vertices in the mesh will be rendered as triangles for this component. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) + */ + faces: Uint32Array; + /** + * The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + */ + material: MeshComponentMaterial; + /** + * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported: + * + * | Type | Description | + * |------|-------------| + * | source | Shading uses the normals as defined in the vertex attributes. If no normals are defined, then shading defaults back to `flat` | + * | flat | Shading uses normals created per triangle face. This type of shading is good for objects with sharp edges such as boxes. | + * | smooth | Shading uses per-vertex normals that average the normals of all the faces a vertex is a part of. This type of shading is good for meshes that approximate curved surfaces such as spheres. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#shading) + */ + shading: string; + + /** + * Creates a deep clone. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#clone) + * + * + */ + clone(): MeshComponent; + } + + interface MeshComponentConstructor { + /** + * The MeshComponent class is used to apply one or more materials to a single [Mesh](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html). The [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property is a flat array of indices in the mesh [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) and defines the region of vertices in the mesh on which to apply the material. Each triple of values in the flat array of indices specifies a triangle to be rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html) + */ + + new(properties?: MeshComponentProperties): MeshComponent; + } + + export const MeshComponent: MeshComponentConstructor; + + interface MeshComponentProperties { + /** + * A flat array of indices that refer to vertices in the [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) of the mesh to which the component belongs. Each triple of indices defines a triangle to render (i.e. the faces array must always have a length that is a multiple of 3). Note that the indices refer to **vertices** and not to the index of the first coordinate of a vertex in the [vertexAttributes.position](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) array. If faces is `null`, then all the vertices in the mesh will be rendered as triangles for this component. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) + */ + faces?: Uint32Array | number[] | Uint16Array; + /** + * The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + */ + material?: MeshComponentMaterialProperties; + /** + * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported: + * + * | Type | Description | + * |------|-------------| + * | source | Shading uses the normals as defined in the vertex attributes. If no normals are defined, then shading defaults back to `flat` | + * | flat | Shading uses normals created per triangle face. This type of shading is good for objects with sharp edges such as boxes. | + * | smooth | Shading uses per-vertex normals that average the normals of all the faces a vertex is a part of. This type of shading is good for meshes that approximate curved surfaces such as spheres. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#shading) + */ + shading?: string; + } + + + export interface MeshComponentMaterialProperties extends Object { + /** + * the material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + */ + color?: ValueMeshColorProperties | ImageMeshColorProperties; + } + + export interface MeshComponentMaterial extends AnonymousAccessor { + /** + * the material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + */ + color: ValueMeshColor | ImageMeshColor; + } + + + interface meshUtils { + /** + * Creates a mesh geometry by sampling elevation data from an elevation service on a regular grid. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation) + * + * @param source The source from which to query the elevation data. + * @param extent The extent from which to create the mesh. + * @param params Optional parameters. + * @param params.material The material. + * @param params.demResolution Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer.queryElevation](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details on the different settings. + * + */ + createFromElevation(source: ElevationLayer | Ground | ElevationSampler, extent: Extent, params?: meshUtilsCreateFromElevationParams): IPromise; + /** + * Georeferences vertices specified in a Cartesian coordinate system. This is useful when converting general 3D model meshes not typically georeferenced. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from a local (0, 0, 0) Cartesian system to the properly georeferenced coordinates at the specified location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) + * + * @param vertexAttributes The position and normal buffers to georeference. + * @param location The location at which to georeference the position and normal buffers. + * @param params Optional parameters. + * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system. + * + */ + georeference(vertexAttributes: VertexAttributes, location: Point, params?: meshUtilsGeoreferenceParams): VertexAttributes; + /** + * Merges multiple meshes into a single mesh. All mesh geometries must be in the same spatial reference. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#merge) + * + * @param geometries One or more meshes. + * + */ + merge(geometries: Mesh[]): Mesh; + } + + export const meshUtils: meshUtils; + + /** + * Represents the position and normal vertex attribute buffers of a mesh. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes) + */ + export interface VertexAttributes extends Object { + /** + * The position buffer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes) + */ + position: Float64Array; + /** + * The normal buffer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes) + */ + normal?: Float32Array; + } + + + export interface meshUtilsCreateFromElevationParams extends Object { + /** + * The material. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation) + */ + material?: meshUtilsCreateFromElevationParamsMaterial; + /** + * Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer.queryElevation](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details on the different settings. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation) + * + * @default auto + */ + demResolution?: number | string; + } + + + export interface meshUtilsCreateFromElevationParamsMaterial extends Object { + /** + * The material color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation) + */ + color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[]; + } + + + export interface meshUtilsGeoreferenceParams extends Object { + /** + * Indicates whether to georeference relative to the globe or the projected coordinate system. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) + */ + geographic?: boolean; + } + interface normalizeUtils { /** @@ -3811,6 +5159,51 @@ declare namespace __esri { export const normalizeUtils: normalizeUtils; + interface ValueMeshColor extends Accessor { + /** + * For ValueMeshColor the type is always `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#type) + */ + readonly type: "value"; + /** + * The color value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#value) + */ + value: Color; + + /** + * Creates a deep clone. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#clone) + * + * + */ + clone(): ValueMeshColor; + } + + interface ValueMeshColorConstructor { + /** + * ValueMeshColor is a type of mesh color that represents a single uniform color to be applied to a mesh component. ValueMeshColor instances can be used with the [MeshComponent.material.color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html) + */ + + new(properties?: ValueMeshColorProperties): ValueMeshColor; + } + + export const ValueMeshColor: ValueMeshColorConstructor; + + interface ValueMeshColorProperties { + /** + * The color value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#value) + */ + value?: Color | number[] | string; + } + interface webMercatorUtils { /** @@ -4025,6 +5418,17 @@ declare namespace __esri { * */ clone(): Ground; + /** + * Creates an elevation sampler for the given extent by querying the ground layers for elevation data and caching it so values may be sampled quickly afterwards. The sampler uses the elevation data from the first layer that has data available. For getting elevation data from a specific layer use [ElevationLayer.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler) + * + * @param extent The extent for which to create the sampler. + * @param options Additional sampler options. + * @param options.noDataValue The value to use when there is no data available. + * + */ + createElevationSampler(extent: Extent, options?: GroundCreateElevationSamplerOptions): IPromise; /** * Queries the ground layer services for elevation values for the given geometry. The returned result contains a copy of the geometry with z-values sampled from elevation data from the first layer that has data available. * @@ -4089,6 +5493,18 @@ declare namespace __esri { } + export interface GroundCreateElevationSamplerOptions extends Object { + /** + * The value to use when there is no data available. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler) + * + * @default 0 + */ + noDataValue?: number; + } + + export interface GroundQueryElevationOptions extends Object { /** * Indicates whether to return additional sample information for each sampled coordinate. @@ -4248,7 +5664,7 @@ declare namespace __esri { dialog: any; /** - * When accessing secure resources via Oauth 2.0 from ArcGIS.com or one of its sub-domains the IdentityManager redirects the user to the ArcGIS.com or Portal for ArcGIS sign-in page. Once the user successfully logs in they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected. The IdentityManager calls the custom handler function with an object containing redirection properties. + * Once a user successfully logs in, they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected. The IdentityManager calls the custom handler function with an object containing redirection properties. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setOAuthRedirectionHandler) * @@ -4269,11 +5685,7 @@ declare namespace __esri { on(name: "credential-create", eventHandler: IdentityManagerCredentialCreateEventHandler): IHandle; - on(name: "credential-create", modifiers: string[], eventHandler: IdentityManagerCredentialCreateEventHandler): IHandle; - on(name: "credentials-destroy", eventHandler: IdentityManagerCredentialsDestroyEventHandler): IHandle; - - on(name: "credentials-destroy", modifiers: string[], eventHandler: IdentityManagerCredentialsDestroyEventHandler): IHandle; } interface IdentityManagerConstructor { @@ -4307,6 +5719,14 @@ declare namespace __esri { * @default 60 */ tokenValidity: number; + /** + * If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. For instance, let's say an application accesses secure resources from ArcGIS.com or one of its subdomains. Once the application attempts to access this resource, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once a user successfully logs in, they are redirected back to the application. The same holds true if the application accesses secure resources from ArcGIS Enterprise as the IdentityManager will redirect the user to its sign-in page. If you do not wish for the application to automatically redirect, set this property to `false`. (Please note that this is not a common scenario. For most, using the OAuth sign-in behavior should handle most of their authentication needs.) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#useSignInPage) + * + * @default true + */ + useSignInPage: boolean; /** * Returns the [Credential](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html) if the user has already signed in to access the given resource. If the user has not signed in, then the promise will be rejected and its error callback will be called. @@ -4457,7 +5877,7 @@ declare namespace __esri { */ setProtocolErrorHandler(handlerFunction: IdentityManagerBaseSetProtocolErrorHandlerHandlerFunction): void; /** - * When accessing secure resources from ArcGIS.com or one of its subdomains, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once the user successfully logs in they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected by creating a custom redirection handler. The IdentityManager calls the custom handler function with an object containing the redirection properties. + * If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. For instance, let's say an application accesses secure resources from ArcGIS.com or one of its subdomains. Once the application attempts to access this resource, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once a user successfully logs in, they are redirected back to the application. The same holds true if the application accesses secure resources from ArcGIS Enterprise as the IdentityManager will redirect the user to its sign-in page. Use this method if the application needs to execute custom logic before the page is redirected by creating a custom redirection handler. The IdentityManager calls the custom handler function with an object containing the redirection properties. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setRedirectionHandler) * @@ -4735,7 +6155,7 @@ declare namespace __esri { */ popupWindowFeatures: string; /** - * The ArcGIS for Portal URL. + * The ArcGIS Enterprise portal URL. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#portalUrl) * @@ -4827,7 +6247,7 @@ declare namespace __esri { */ popupWindowFeatures?: string; /** - * The ArcGIS for Portal URL. + * The ArcGIS Enterprise portal URL. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#portalUrl) * @@ -4969,11 +6389,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: BaseDynamicLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: BaseDynamicLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: BaseDynamicLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseDynamicLayerLayerviewDestroyEventHandler): IHandle; } interface BaseDynamicLayerConstructor { @@ -5072,11 +6488,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: BaseElevationLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: BaseElevationLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: BaseElevationLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseElevationLayerLayerviewDestroyEventHandler): IHandle; } interface BaseElevationLayerConstructor { @@ -5243,11 +6655,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: BaseTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: BaseTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: BaseTileLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: BaseTileLayerLayerviewDestroyEventHandler): IHandle; } interface BaseTileLayerConstructor { @@ -5310,6 +6718,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#copyright) */ copyright: string; + /** + * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful when the dataset is large and you don't want to bring all features to the client for analysis. Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#definitionExpression) + */ + definitionExpression: string; /** * The column delimiter. See the table below for possible values. * @@ -5430,6 +6844,15 @@ declare namespace __esri { * @default true */ screenSizePerspectiveEnabled: boolean; + /** + * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the CSV file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data. + * > **Known Limitations** The browser must support [WebAssembly](https://caniuse.com/#feat=wasm) if a spatial reference other than WGS84 or Web Mercator is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#spatialReference) + * + * @default SpatialReference.WGS84 + */ + spatialReference: SpatialReference; /** * The URL of the CSV file. * @@ -5437,14 +6860,83 @@ declare namespace __esri { */ url: string; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If no parameters are specified, then the extent and count of all features satisfying the layer's configuration/filters are returned. + * > **Capabilities and Limitations** The following lists capabilities with some limitations when executing a query: + * * Use [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where) to query based on a SQL where clause. + * * You can perform spatial queries using the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) parameters with the following limitations: + * * The `geometry` parameter only supports [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries. + * * The only supported `spatialRelationship` is `intersects`. + * * The `distance` and `units` parameters are not supported. + * * You can query fields for statistics using onStatisticField. However, + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The `orderByField` param is not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryExtent) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryExtent(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns the number of features that satisfy the query. If no parameters are specified, then the total number of features satisfying the layer's configuration/filters is returned. + * > **Capabilities and Limitations** The following lists capabilities with some limitations when executing a query: + * * Use [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where) to query based on a SQL where clause. + * * You can perform spatial queries using the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) parameters with the following limitations: + * * The `geometry` parameter only supports [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries. + * * The only supported `spatialRelationship` is `intersects`. + * * The `distance` and `units` parameters are not supported. + * * You can query fields for statistics using onStatisticField. However, + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The `orderByField` param is not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryFeatureCount) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryFeatureCount(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html), which can be accessed using the `.then()` method once the promise resolves. A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) features, which can be added to the [view's graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics). This array will not be populated if zero results are found. + * > **Capabilities and Limitations** The following lists capabilities with some limitations when executing a query: + * * Use [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where) to query based on a SQL where clause. + * * You can perform spatial queries using the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) parameters with the following limitations: + * * The `geometry` parameter only supports [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries. + * * The only supported `spatialRelationship` is `intersects`. + * * The `distance` and `units` parameters are not supported. + * * You can query fields for statistics using onStatisticField. However, + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The `orderByField` param is not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryFeatures) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryFeatures(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns an array of Object IDs for features that satisfy the input query. If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned. + * > **Capabilities and Limitations** The following lists capabilities with some limitations when executing a query: + * * Use [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where) to query based on a SQL where clause. + * * You can perform spatial queries using the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) parameters with the following limitations: + * * The `geometry` parameter only supports [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries. + * * The only supported `spatialRelationship` is `intersects`. + * * The `distance` and `units` parameters are not supported. + * * You can query fields for statistics using onStatisticField. However, + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The `orderByField` param is not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryObjectIds) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryObjectIds(params?: Query | QueryProperties): IPromise; + on(name: "layerview-create", eventHandler: CSVLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: CSVLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: CSVLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: CSVLayerLayerviewDestroyEventHandler): IHandle; } interface CSVLayerConstructor { @@ -5466,6 +6958,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#copyright) */ copyright?: string; + /** + * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful when the dataset is large and you don't want to bring all features to the client for analysis. Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#definitionExpression) + */ + definitionExpression?: string; /** * The column delimiter. See the table below for possible values. * @@ -5586,6 +7084,15 @@ declare namespace __esri { * @default true */ screenSizePerspectiveEnabled?: boolean; + /** + * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the CSV file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data. + * > **Known Limitations** The browser must support [WebAssembly](https://caniuse.com/#feat=wasm) if a spatial reference other than WGS84 or Web Mercator is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#spatialReference) + * + * @default SpatialReference.WGS84 + */ + spatialReference?: SpatialReferenceProperties; /** * The URL of the CSV file. * @@ -5601,10 +7108,11 @@ declare namespace __esri { * * Mode | Description * ------|------------ - * on-the-ground | Graphics are draped on the terrain surface. This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) - * geometries rendered with [ObjectSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). - * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined - * by summing up the terrain elevation and the result of `featureExpressionInfo` (if defined). This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html). absolute-height | Graphics are placed at an absolute height above sea level. This height is determined by the result of `featureExpressionInfo` (if defined). This mode doesn't take the elevation of the terrain into account. relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. + * on-the-ground | Graphics are draped on the terrain surface. This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [ObjectSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing up the terrain elevation and the result of `featureExpressionInfo` (if defined). This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html). + * absolute-height | Graphics are placed at an absolute height above sea level. This height is determined by the result of `featureExpressionInfo` (if defined). This mode doesn't take the elevation of the terrain into account. + * relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo) */ @@ -5642,7 +7150,7 @@ declare namespace __esri { export interface CSVLayerFeatureReduction extends Object { /** - * Type of the decluttering method. The only supported type at the moment is `"selection"`. In this method, some of the overlapping features are hidden such that none of the remaining features intersect on screen. Label deconfliction also respects this option and hides labels that would overlap with the features of this layer. + * Type of the decluttering method. The only supported type at the moment is `selection`. In this method, some of the overlapping features are hidden such that none of the remaining features intersect on screen. Label deconfliction also respects this option and hides labels that would overlap with the features of this layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#featureReduction) */ @@ -5687,7 +7195,7 @@ declare namespace __esri { * @param height The height of the view in pixels. * @param options The parameter options is an object with the following properties. * @param options.allowImageDataAccess Indicates if the access to the pixels of the image is required. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. * */ @@ -5702,7 +7210,7 @@ declare namespace __esri { * @param height The height of the view in pixels. * @param options The parameter options is an object with the following properties. * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * */ getImageUrl(extent: Extent, width: number, height: number, options?: DynamicLayerGetImageUrlOptions): IPromise | string; @@ -5740,7 +7248,7 @@ declare namespace __esri { */ allowImageDataAccess?: boolean; /** - * The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage) */ @@ -5762,7 +7270,7 @@ declare namespace __esri { */ pixelRatio?: number; /** - * The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl) */ @@ -5777,6 +7285,18 @@ declare namespace __esri { */ url: string; + /** + * Creates an elevation sampler for the given [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) by querying the service layer for elevation data and caching it so values may be sampled quickly afterwards. The resolution of the cached data can be set using the `demResolution` option. In many cases, `auto` demResolution can be used to get high quality elevation samples without the need to know exactly where the data in the service is located. This is particularly useful for services which combine elevation data from many sources (such as the world elevation service). If more control, or higher quality samples are required, use either `finest-contiguous` or a fixed `{number}` resolution. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) + * + * @param extent The extent for which to create the sampler. + * @param options Additional query options. See the table below. + * @param options.demResolution Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details. + * @param options.noDataValue The value to use when there is no data available. + * + */ + createElevationSampler(extent: Extent, options?: ElevationLayerCreateElevationSamplerOptions): IPromise; /** * Requests a tile from the service and decodes the data into a linear array of elevation values. The returned promise resolves with a plain object describing the obtained elevation data for the tile. The object has the following properties: * @@ -5809,7 +7329,7 @@ declare namespace __esri { * * demResolution | Description * -----------------------|------------- - * `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 100). Note that this may result in values being sampled from different resolutions. + * `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 20). Note that this may result in values being sampled from different resolutions. * `finest-contiguous` | Sample elevation from the finest available resolution (cell size) across the entire geometry. * `{number}` | Sample elevation from the resolution closest to the specified resolution (in meters). * @param options.returnSampleInfo Indicates whether to return additional sample information for each coordinate. @@ -5821,11 +7341,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: ElevationLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: ElevationLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: ElevationLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: ElevationLayerLayerviewDestroyEventHandler): IHandle; } interface ElevationLayerConstructor { @@ -5852,13 +7368,33 @@ declare namespace __esri { } + export interface ElevationLayerCreateElevationSamplerOptions extends Object { + /** + * Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) + * + * @default auto + */ + demResolution?: number | string; + /** + * The value to use when there is no data available. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) + * + * @default 0 + */ + noDataValue?: number; + } + + export interface ElevationLayerQueryElevationOptions extends Object { /** * Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See the table below for more details on the different settings. * * demResolution | Description * -----------------------|------------- - * `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 100). Note that this may result in values being sampled from different resolutions. + * `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 20). Note that this may result in values being sampled from different resolutions. * `finest-contiguous` | Sample elevation from the finest available resolution (cell size) across the entire geometry. * `{number}` | Sample elevation from the resolution closest to the specified resolution (in meters). * @@ -5962,6 +7498,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#displayField) */ displayField: string; + /** + * An object that allows you to create a dynamic layer with data either from map service sublayers or data from a registered workspace. See [DynamicMapLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicMapLayer) for creating dynamic layers from map service layers for on the fly rendering, labeling, and filtering (definition expressions). To create dynamic layers from other sources in registered workspaces such as tables and table joins, see [DynamicDataLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicDataLayer). If you already have a [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) instance, you can call the [createFeatureLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#createFeatureLayer) method on the Sublayer to construct the layer for you. This only applies to map services with [dynamic layers](https://enterprise.arcgis.com/en/server/latest/publish-services/linux/about-dynamic-layers.htm) enabled. Therefore, the [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) of the FeatureLayer instance must point to a map service url ending with `/dynamicLayer`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#dynamicDataSource) + */ + dynamicDataSource: DynamicMapLayer | DynamicDataLayer; /** * Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. * @@ -5987,7 +7529,7 @@ declare namespace __esri { */ readonly gdbVersion: string; /** - * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). However, when creating a FeatureLayer from client-side graphics, this property must be specified in the layer's constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), and [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) properties. **Possible Values:** point | mulitpoint | polyline | polygon | extent + * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). However, when creating a FeatureLayer from client-side graphics, this property must be specified in the layer's constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), and [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) properties. **Possible Values:** point | mulitpoint | polyline | polygon | extent | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ @@ -6016,6 +7558,12 @@ declare namespace __esri { * @default false */ readonly hasZ: boolean; + /** + * The historic moment to query. If historicMoment is not specified, the query will apply to the current features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#historicMoment) + */ + historicMoment: Date; /** * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible) property of this layer must be set to `true`. * > **Known Limitations** There is no support for labeling in 2D. Labeling is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Each graphic can have only one label. Multiple [Label classes](esri-layers-support-LabelClass.html) with different [where](esri-layers-support-LabelClass.html#where) clauses can be used to have different label styles on different features that belong to the same layer (for example blue labels for lakes and green labels for parks). @@ -6137,7 +7685,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#typeIdField) */ - typeIdField: string; + readonly typeIdField: string; /** * An array of subtypes defined in the feature service exposed by ArcGIS REST API. Each item includes information about the type, such as the type ID, name, and definition expression. * @@ -6145,7 +7693,7 @@ declare namespace __esri { */ types: FeatureType[]; /** - * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. + * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) */ @@ -6158,7 +7706,7 @@ declare namespace __esri { readonly version: number; /** - * Applies edits to features in a feature layer. New features can be created and existing features can be updated or deleted. Feature geometries and/or attributes may be modified. Only applicable to layers in a [feature service](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Feature_Service/02r3000000z2000000/). + * Applies edits to features in a feature layer. New features can be created and existing features can be updated or deleted. Feature geometries and/or attributes may be modified. Only applicable to layers in a [feature service](https://developers.arcgis.com/rest/services-reference/feature-service.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) * @@ -6177,6 +7725,15 @@ declare namespace __esri { * */ createQuery(): Query; + /** + * Returns a [FeatureType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureType.html) describing the feature's type. This is applicable if the layer containing the feature has a [typeIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#typeIdField). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#getFeatureType) + * + * @param feature A feature from this layer. + * + */ + getFeatureType(feature: Graphic): FeatureType; /** * Returns the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) associated with the given field name. The domain can be either a [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html) or [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html). * @@ -6198,6 +7755,15 @@ declare namespace __esri { * */ queryExtent(params?: Query | QueryProperties): IPromise; + /** + * Query information about attachments associated with a specified feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureAttachments) + * + * @param feature The feature to query. + * + */ + queryFeatureAttachments(feature: Graphic): IPromise; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the feature service and returns the number of features that satisfy the query. If no parameters are specified, then the total number of features satisfying the layer's configuration/filters is returned. * > To query for the count of features/graphics available to or visible in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) on the client rather than making a server-side query, you must use the [FeatureLayerView.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatureCount) method. @@ -6232,16 +7798,12 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: FeatureLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: FeatureLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: FeatureLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: FeatureLayerLayerviewDestroyEventHandler): IHandle; } interface FeatureLayerConstructor { /** - * A FeatureLayer is a single layer that can be created from a [Map Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-map-service.htm) or [Feature Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); ArcGIS Online or ArcGIS for Portal items; or from an array of client-side graphics. It is composed of discrete features, each of which has a [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) that allows it to be rendered in either a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) as a [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with spatial context. Features also contain data [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) that provide additional information about the real-world feature it represents; attributes may be viewed in [popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) windows and used for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) the layer. FeatureLayers may be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures), [analyzed](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html), and [rendered](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer) to visualize data in a spatial context. + * A FeatureLayer is a single layer that can be created from a [Map Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-map-service.htm) or [Feature Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); ArcGIS Online or ArcGIS Enterprise portal items; or from an array of client-side graphics. It is composed of discrete features, each of which has a [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) that allows it to be rendered in either a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) as a [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with spatial context. Features also contain data [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) that provide additional information about the real-world feature it represents; attributes may be viewed in [popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) windows and used for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) the layer. FeatureLayers may be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures), [analyzed](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html), and [rendered](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer) to visualize data in a spatial context. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) */ @@ -6273,6 +7835,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#displayField) */ displayField?: string; + /** + * An object that allows you to create a dynamic layer with data either from map service sublayers or data from a registered workspace. See [DynamicMapLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicMapLayer) for creating dynamic layers from map service layers for on the fly rendering, labeling, and filtering (definition expressions). To create dynamic layers from other sources in registered workspaces such as tables and table joins, see [DynamicDataLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicDataLayer). If you already have a [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) instance, you can call the [createFeatureLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#createFeatureLayer) method on the Sublayer to construct the layer for you. This only applies to map services with [dynamic layers](https://enterprise.arcgis.com/en/server/latest/publish-services/linux/about-dynamic-layers.htm) enabled. Therefore, the [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) of the FeatureLayer instance must point to a map service url ending with `/dynamicLayer`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#dynamicDataSource) + */ + dynamicDataSource?: DynamicMapLayer | DynamicDataLayer; /** * Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. * @@ -6292,11 +7860,17 @@ declare namespace __esri { */ fields?: FieldProperties[]; /** - * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). However, when creating a FeatureLayer from client-side graphics, this property must be specified in the layer's constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), and [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) properties. **Possible Values:** point | mulitpoint | polyline | polygon | extent + * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). However, when creating a FeatureLayer from client-side graphics, this property must be specified in the layer's constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), and [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) properties. **Possible Values:** point | mulitpoint | polyline | polygon | extent | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ geometryType?: string; + /** + * The historic moment to query. If historicMoment is not specified, the query will apply to the current features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#historicMoment) + */ + historicMoment?: DateProperties; /** * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible) property of this layer must be set to `true`. * > **Known Limitations** There is no support for labeling in 2D. Labeling is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Each graphic can have only one label. Multiple [Label classes](esri-layers-support-LabelClass.html) with different [where](esri-layers-support-LabelClass.html#where) clauses can be used to have different label styles on different features that belong to the same layer (for example blue labels for lakes and green labels for parks). @@ -6407,12 +7981,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#templates) */ templates?: FeatureTemplateProperties[]; - /** - * The name of the field holding the type ID or subtypes for the features. See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#typeIdField) - */ - typeIdField?: string; /** * An array of subtypes defined in the feature service exposed by ArcGIS REST API. Each item includes information about the type, such as the type ID, name, and definition expression. * @@ -6420,13 +7988,59 @@ declare namespace __esri { */ types?: FeatureTypeProperties[]; /** - * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. + * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) */ url?: string; } + + export interface AttachmentInfo extends Object { + /** + * The content type of the attachment. For example, `image/jpeg`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + contentType: string; + /** + * The identifier for the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + id: number; + /** + * Keywords for the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + keywords: string; + /** + * The name of the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + name: string; + /** + * The parent object id of the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + parentObjectId: number; + /** + * The size of the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + size: number; + /** + * The URL of the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentInfo) + */ + url: string; + } + /** * FeatureEditResult represents the result of adding, updating or deleting a feature. * @@ -6576,7 +8190,7 @@ declare namespace __esri { */ supportsUpdateWithoutM: boolean; /** - * Indicates if the layer supports uploading attachments by [UploadId](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Item/02r3000000vq000000/). + * Indicates if the layer supports uploading attachments by [UploadId](https://developers.arcgis.com/rest/services-reference/item.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ @@ -6610,7 +8224,7 @@ declare namespace __esri { */ supportsEditing: boolean; /** - * Indicates if values of one or more field values in the layer can be updated. See the [Calculate REST operation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Calculate_Feature_Service_Layer/02r30000029n000000/) document for more information. + * Indicates if values of one or more field values in the layer can be updated. See the [Calculate REST operation](https://developers.arcgis.com/rest/services-reference/calculate-feature-service-layer-.htm) document for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ @@ -6627,6 +8241,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsValidateSql: boolean; + /** + * Indicates if resized attachments are supported in the feature layer. This is useful for showing thumbnails in [Popups](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsResizeAttachments: boolean; } @@ -6703,6 +8323,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsStatistics: boolean; + /** + * Indicates if the layer supports historic moment query. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsHistoricMoment: boolean; } @@ -6852,11 +8478,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: GeoRSSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: GeoRSSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: GeoRSSLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: GeoRSSLayerLayerviewDestroyEventHandler): IHandle; } interface GeoRSSLayerConstructor { @@ -6983,11 +8605,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: GraphicsLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: GraphicsLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: GraphicsLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: GraphicsLayerLayerviewDestroyEventHandler): IHandle; } interface GraphicsLayerConstructor { @@ -7103,11 +8721,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: GroupLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: GroupLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: GroupLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: GroupLayerLayerviewDestroyEventHandler): IHandle; } interface GroupLayerConstructor { @@ -7194,11 +8808,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: ImageryLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: ImageryLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: ImageryLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: ImageryLayerLayerviewDestroyEventHandler): IHandle; } interface ImageryLayerConstructor { @@ -7263,11 +8873,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: IntegratedMeshLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: IntegratedMeshLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: IntegratedMeshLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: IntegratedMeshLayerLayerviewDestroyEventHandler): IHandle; } interface IntegratedMeshLayerConstructor { @@ -7355,11 +8961,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: KMLLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: KMLLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: KMLLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: KMLLayerLayerviewDestroyEventHandler): IHandle; } interface KMLLayerConstructor { @@ -7502,12 +9104,12 @@ declare namespace __esri { */ fromArcGISServerUrl(params: LayerFromArcGISServerUrlParams): IPromise; /** - * Creates a new layer instance of the appropriate layer class from an ArcGIS Online or ArcGIS for Portal [portal item](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html). If the item points to a feature service with multiple layers, then a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html) is created. If the item points to a service with a single layer, then it resolves to a layer of the same type of class as the service. See also: [isLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#isLayer) + * Creates a new layer instance of the appropriate layer class from an ArcGIS Online or ArcGIS Enterprise [portal item](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html). If the item points to a feature service with multiple layers, then a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html) is created. If the item points to a service with a single layer, then it resolves to a layer of the same type of class as the service. See also: [isLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#isLayer) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#fromPortalItem) * * @param params The parameters for loading the portal item. - * @param params.portalItem The object representing an ArcGIS Online or ArcGIS for Portal item from which to load the layer. + * @param params.portalItem The object representing an ArcGIS Online or ArcGIS Enterprise portal item from which to load the layer. * */ fromPortalItem(params: LayerFromPortalItemParams): IPromise; @@ -7586,7 +9188,7 @@ declare namespace __esri { export interface LayerFromPortalItemParams extends Object { /** - * The object representing an ArcGIS Online or ArcGIS for Portal item from which to load the layer. + * The object representing an ArcGIS Online or ArcGIS Enterprise portal item from which to load the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#fromPortalItem) */ @@ -7597,11 +9199,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: MapImageLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: MapImageLayerLayerviewDestroyEventHandler): IHandle; } interface MapImageLayerConstructor { @@ -7640,11 +9238,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: MapNotesLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: MapNotesLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: MapNotesLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: MapNotesLayerLayerviewDestroyEventHandler): IHandle; } interface MapNotesLayerConstructor { @@ -7692,12 +9286,12 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISCachedService.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Classification_objects/02r30000019z000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): any; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISCachedService.html#toJSON) * @@ -7803,7 +9397,7 @@ declare namespace __esri { */ findSublayerById(id: number): Sublayer; /** - * Gets the parameters of the exported image to use when calling the [export REST operation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/). + * Gets the parameters of the exported image to use when calling the [export REST operation](https://developers.arcgis.com/rest/services-reference/export-map.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISDynamicMapService.html#getExportImageParameters) * @@ -7811,7 +9405,7 @@ declare namespace __esri { * @param width The width of the exported image * @param height The height of the exported image * @param options The parameter options is an object with the following properties. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * */ getExportImageParameters(extent: Extent, width: number, height: number, options?: ArcGISDynamicMapServiceGetExportImageParametersOptions): any; @@ -7883,7 +9477,7 @@ declare namespace __esri { export interface ArcGISDynamicMapServiceGetExportImageParametersOptions extends Object { /** - * The rotation in degrees of the exported image. Available since ArcGIS for Server 10.3. + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISDynamicMapService.html#getExportImageParameters) */ @@ -8028,7 +9622,7 @@ declare namespace __esri { */ readonly spatialReference: SpatialReference; /** - * The URL to the REST endpoint of the layer. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. + * The URL to the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#url) */ @@ -8041,7 +9635,7 @@ declare namespace __esri { readonly version: number; /** - * Returns an image using the [export REST operation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Image/02r3000000wm000000/) that displays data from an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). + * Returns an image using the [export REST operation](https://developers.arcgis.com/rest/services-reference/export-image.htm) that displays data from an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#fetchImage) * @@ -8051,23 +9645,6 @@ declare namespace __esri { * */ fetchImage(extent: Extent, width: number, height: number): IPromise; - /** - * Creates a new instance of [this class]() and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input `json` parameter often comes from a response to a query operation in the REST API or a [toJSON()](http://pro.arcgis.com/en/pro-app/tool-reference/conversion/features-to-json.htm) method from another ArcGIS product. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for details and examples of when and how to use this function. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#fromJSON) - * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Classification_objects/02r30000019z000000/) for examples of the structure of various input JSON objects. - * - */ - fromJSON(json: any): any; - /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#toJSON) - * - * - */ - toJSON(): any; } interface ArcGISImageServiceConstructor { @@ -8212,7 +9789,7 @@ declare namespace __esri { */ renderingRule?: RasterFunctionProperties; /** - * The URL to the REST endpoint of the layer. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. + * The URL to the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#url) */ @@ -8301,8 +9878,7 @@ declare namespace __esri { interface RefreshableLayer { /** - * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. - * > **Known Limitations** Refreshing is only supported in 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval) * @@ -8311,8 +9887,7 @@ declare namespace __esri { refreshInterval: number; /** - * Fetches all the data for the layer. - * > **Known Limitations** Refreshing is only supported in 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Fetches all the data for the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refresh) * @@ -8331,8 +9906,7 @@ declare namespace __esri { interface RefreshableLayerProperties { /** - * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. - * > **Known Limitations** Refreshing is only supported in 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval) * @@ -8418,7 +9992,7 @@ declare namespace __esri { */ readonly token: string; /** - * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Server, Portal for ArcGIS, or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. + * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#url) */ @@ -8466,7 +10040,7 @@ declare namespace __esri { */ spatialReference?: SpatialReferenceProperties; /** - * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Server, Portal for ArcGIS, or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. + * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#url) */ @@ -8499,19 +10073,11 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: OpenStreetMapLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: OpenStreetMapLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: OpenStreetMapLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: OpenStreetMapLayerLayerviewDestroyEventHandler): IHandle; } interface OpenStreetMapLayerConstructor { - /** - * Allows you to use [basemaps](http://wiki.openstreetmap.org/wiki/List_of_OSM-based_services) from [OpenStreetMap](http://www.openstreetmap.org/). Set the [tileservers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html#tileServers) property to change which OpenStreetMap tiles you want to use. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html) - */ + new(properties?: OpenStreetMapLayerProperties): OpenStreetMapLayer; @@ -8569,11 +10135,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: PointCloudLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: PointCloudLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: PointCloudLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: PointCloudLayerLayerviewDestroyEventHandler): IHandle; } interface PointCloudLayerConstructor { @@ -8819,11 +10381,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: SceneLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: SceneLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: SceneLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: SceneLayerLayerviewDestroyEventHandler): IHandle; } interface SceneLayerConstructor { @@ -9030,11 +10588,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: StreamLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: StreamLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: StreamLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: StreamLayerLayerviewDestroyEventHandler): IHandle; } interface StreamLayerConstructor { @@ -9285,6 +10839,46 @@ declare namespace __esri { type?: string; } + interface ElevationSampler { + /** + * Registers an event handler on the instance. Call this method to hook an event with a listener. See the [Events summary table](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#events-summary) for a list of listened events. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#on) + * + * @param type The name of the event or the events to listen for. + * @param handler? The function to call when the event is fired, if modifiers were specified. + * + */ + on(type: string | string[], handler?: Function): any; + /** + * Query elevation for a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) or [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry. A query will return a new geometry for which the z-values for each coordinate in the geometry are obtained from the elevation sampler. If the geometry used for the query is outside of the elevation sampler extent, then the returned geometry has `0` as z-values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#queryElevation) + * + * @param geometry The geometry to use for sampling elevation data. + * + */ + queryElevation(geometry: Point | Multipoint | Polyline): Point | Multipoint | Polyline; + + + on(name: "changed", eventHandler: ElevationSamplerChangedEventHandler): IHandle; + } + + interface ElevationSamplerConstructor { + /** + * A cache of elevation values created from an elevation service or the [GroundView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html) used for synchronously querying elevation information for geometries. This class does not have a constructor. You can create an instance of this class by using [ElevationLayer.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) or [Ground.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler) methods. The elevation sampler created from the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) will sample data from the first elevation layer that has data available. To control the layer used for elevation sampling and the sampling resolution, use [ElevationLayer.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html) + */ + + new(): ElevationSampler; + } + + export const ElevationSampler: ElevationSamplerConstructor; + + export interface ElevationSamplerChangedEvent { + } + interface FeatureTemplate extends Accessor, JSONSupport { /** * Description of the feature template. @@ -9622,7 +11216,7 @@ declare namespace __esri { width: number; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageParameters.html#toJSON) * @@ -9840,7 +11434,11 @@ declare namespace __esri { labelExpressionInfo: LabelClassLabelExpressionInfo; /** * The position of the label. Known values are based on the feature type. This property requires a value for labels to be visible. **Known Values (Points):** above-center | above-left | above-right | below-center | below-left | below-right | center-center | center-left | center-right **Known Values (Polylines):** above-after | above-along | above-before | above-start | above-end | below-after | below-along | below-before | below-start | below-end | center-after | center-along | center-before | center-start | center-end **Known Values (Polygons):** always-horizontal - * > **Known Limitations** Currently, if the label has a [line callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html) then only "above-center" is supported. + * > **Known Limitations** + * * Currently, if the label has a [line callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html) then only "above-center" is supported. + * * 3D layers only support label placement for [Points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). + * + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement) */ @@ -9919,7 +11517,11 @@ declare namespace __esri { labelExpressionInfo?: LabelClassLabelExpressionInfo; /** * The position of the label. Known values are based on the feature type. This property requires a value for labels to be visible. **Known Values (Points):** above-center | above-left | above-right | below-center | below-left | below-right | center-center | center-left | center-right **Known Values (Polylines):** above-after | above-along | above-before | above-start | above-end | below-after | below-along | below-before | below-start | below-end | center-after | center-along | center-before | center-start | center-end **Known Values (Polygons):** always-horizontal - * > **Known Limitations** Currently, if the label has a [line callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html) then only "above-center" is supported. + * > **Known Limitations** + * * Currently, if the label has a [line callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html) then only "above-center" is supported. + * * 3D layers only support label placement for [Points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). + * + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement) */ @@ -10494,13 +12096,13 @@ declare namespace __esri { interface RasterFunction extends Accessor, JSONSupport { /** - * The arguments for the raster function. The structure depends on the function specified. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their arguments. + * The arguments for the raster function. The structure depends on the function specified. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their arguments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionArguments) */ functionArguments: any; /** - * The raster function name. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their arguments. + * The raster function name. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their arguments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionName) */ @@ -10523,7 +12125,7 @@ declare namespace __esri { interface RasterFunctionConstructor { /** - * Specifies processing to be done to the image service. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their [arguments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionArguments). The following image shows a landcover ImageryLayer rendered with two chained client-side raster functions used to reclass pixel values (Remap) and assign each pixel a new color (Colormap). + * Specifies processing to be done to the image service. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their [arguments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionArguments). The following image shows a landcover ImageryLayer rendered with two chained client-side raster functions used to reclass pixel values (Remap) and assign each pixel a new color (Colormap). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html) */ @@ -10537,13 +12139,13 @@ declare namespace __esri { interface RasterFunctionProperties { /** - * The arguments for the raster function. The structure depends on the function specified. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their arguments. + * The arguments for the raster function. The structure depends on the function specified. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their arguments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionArguments) */ functionArguments?: any; /** - * The raster function name. See [raster functions](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Raster_Function_Objects/02r3000000rv000000/) for a list of functions and their arguments. + * The raster function name. See [raster functions](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm) for a list of functions and their arguments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#functionName) */ @@ -10564,6 +12166,112 @@ declare namespace __esri { variableName?: any; } + interface Relationship extends Accessor { + /** + * The cardinality which specifies the number of objects in the origin [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) related to the number of objects in the destination [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A relationship can have one of three cardinalities: + * * "one-to-one" + * * "one-to-many" + * * "many-to-many" + * + * + * Please see the [Desktop help](http://desktop.arcgis.com/en/arcmap/10.3/manage-data/relationships/relationship-class-properties.htm#GUID-989CB1D1-AC51-4A4C-8D9D-0AB9E647FFFD) for additional information on cardinality. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#cardinality) + * + * @default null + */ + cardinality: string; + /** + * The unique ID for the relationship. These ids for the relationships the [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) participates in are listed in the ArcGIS Services directory. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#id) + * + * @default null + */ + id: number; + /** + * The field used to establish the relate within the [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#keyField) + * + * @default null + */ + keyField: string; + /** + * The name of the relationship. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#name) + * + * @default null + */ + name: string; + /** + * The unique ID of the related [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#relatedTableId) + * + * @default null + */ + relatedTableId: number; + } + + interface RelationshipConstructor { + + + new(properties?: RelationshipProperties): Relationship; + } + + export const Relationship: RelationshipConstructor; + + interface RelationshipProperties { + /** + * The cardinality which specifies the number of objects in the origin [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) related to the number of objects in the destination [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A relationship can have one of three cardinalities: + * * "one-to-one" + * * "one-to-many" + * * "many-to-many" + * + * + * Please see the [Desktop help](http://desktop.arcgis.com/en/arcmap/10.3/manage-data/relationships/relationship-class-properties.htm#GUID-989CB1D1-AC51-4A4C-8D9D-0AB9E647FFFD) for additional information on cardinality. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#cardinality) + * + * @default null + */ + cardinality?: string; + /** + * The unique ID for the relationship. These ids for the relationships the [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) participates in are listed in the ArcGIS Services directory. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#id) + * + * @default null + */ + id?: number; + /** + * The field used to establish the relate within the [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#keyField) + * + * @default null + */ + keyField?: string; + /** + * The name of the relationship. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#name) + * + * @default null + */ + name?: string; + /** + * The unique ID of the related [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html#relatedTableId) + * + * @default null + */ + relatedTableId?: number; + } + interface Sublayer extends Accessor { /** * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. @@ -10648,7 +12356,17 @@ declare namespace __esri { */ opacity: number; /** - * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * Indicates whether to display popups when features in the layer are clicked. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupEnabled) + * + * @default true + */ + popupEnabled: boolean; + /** + * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * > **Known Limitations** + * * [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in PopupTemplates set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6.1 map services (or later) created from ArcGIS Pro. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupTemplate) */ @@ -10657,7 +12375,7 @@ declare namespace __esri { * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. * > **Known Limitations** * * [3D symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) are not supported in renderers set on MapImageLayer sublayers. - * * [visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) are not supported in renderers set on MapImageLayer sublayers. + * * [Visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) and [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in renderers set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6.1 map services (or later) created from ArcGIS Pro. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#renderer) */ @@ -10701,6 +12419,14 @@ declare namespace __esri { * */ clone(): Sublayer; + /** + * A convenient method for creating a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) instance based on the Sublayer's configuration, including [dynamic sources](https://enterprise.arcgis.com/en/server/latest/publish-services/linux/about-dynamic-layers.htm). This allows you to take advantage of FeatureLayer capabilities not supported in Sublayer, such as the [Smart Mapping creator functions](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#createFeatureLayer) + * + * + */ + createFeatureLayer(): FeatureLayer; /** * Creates a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) object with default values representing the layer's state, including filters (definition expression) on the layer's features. * @@ -10816,7 +12542,17 @@ declare namespace __esri { */ opacity?: number; /** - * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * Indicates whether to display popups when features in the layer are clicked. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupEnabled) + * + * @default true + */ + popupEnabled?: boolean; + /** + * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * > **Known Limitations** + * * [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in PopupTemplates set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6.1 map services (or later) created from ArcGIS Pro. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupTemplate) */ @@ -10825,7 +12561,7 @@ declare namespace __esri { * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. * > **Known Limitations** * * [3D symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) are not supported in renderers set on MapImageLayer sublayers. - * * [visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) are not supported in renderers set on MapImageLayer sublayers. + * * [Visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) and [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in renderers set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6.1 map services (or later) created from ArcGIS Pro. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#renderer) */ @@ -11801,7 +13537,7 @@ declare namespace __esri { */ tileServers: string[]; /** - * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. + * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#url) */ @@ -11835,11 +13571,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: TileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: TileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: TileLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: TileLayerLayerviewDestroyEventHandler): IHandle; } interface TileLayerConstructor { @@ -11872,7 +13604,7 @@ declare namespace __esri { */ tileServers?: string[]; /** - * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS for Server, Portal for ArcGIS, or ArcGIS Online. + * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#url) */ @@ -11907,11 +13639,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: UnknownLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: UnknownLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: UnknownLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: UnknownLayerLayerviewDestroyEventHandler): IHandle; } interface UnknownLayerConstructor { @@ -11948,11 +13676,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: UnsupportedLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: UnsupportedLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: UnsupportedLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: UnsupportedLayerLayerviewDestroyEventHandler): IHandle; } interface UnsupportedLayerConstructor { @@ -12032,11 +13756,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: VectorTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: VectorTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: VectorTileLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: VectorTileLayerLayerviewDestroyEventHandler): IHandle; } interface VectorTileLayerConstructor { @@ -12165,11 +13885,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: WebTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: WebTileLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: WebTileLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: WebTileLayerLayerviewDestroyEventHandler): IHandle; } interface WebTileLayerConstructor { @@ -12367,11 +14083,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: WMSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: WMSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: WMSLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: WMSLayerLayerviewDestroyEventHandler): IHandle; } interface WMSLayerConstructor { @@ -12598,11 +14310,7 @@ declare namespace __esri { on(name: "layerview-create", eventHandler: WMTSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-create", modifiers: string[], eventHandler: WMTSLayerLayerviewCreateEventHandler): IHandle; - on(name: "layerview-destroy", eventHandler: WMTSLayerLayerviewDestroyEventHandler): IHandle; - - on(name: "layerview-destroy", modifiers: string[], eventHandler: WMTSLayerLayerviewDestroyEventHandler): IHandle; } interface WMTSLayerConstructor { @@ -12959,7 +14667,7 @@ declare namespace __esri { } /** - * It is possible to set media elements such as charts and/or images within the PopupTemplate's content. This content is set within the mediaInfos. You will need to reference a dijit stylesheet and reference its class within the `` HTML div. You can see this in the [Multiple popup elements sample](https://developers.arcgis.com/javascript/latest/sample-code/popup-multipleelements/index.html). ![popuptemplate-media-element](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popuptemplate-media-element.png) The object specification for the media popup element is provided below. + * It is possible to set media elements such as charts and/or images within the PopupTemplate's content. This content is set within the mediaInfos. ![popuptemplate-media-element](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popuptemplate-media-element.png) The object specification for the media popup element is provided below. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#media) */ @@ -13330,6 +15038,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#description) */ description: string; + /** + * Boolean value indicating whether to opt-in to the [Esri User Experience Improvement (EUEI) program](https://doc.arcgis.com/en/arcgis-online/reference/faq.htm#ESRI_QUESTIONANSWER_AED97F28DCD84F7682623C2FA9E5CE49). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#eueiEnabled) + * + * @default false + */ + eueiEnabled: boolean; /** * The featured groups for the portal. Returns an array of objects that provide access to the owner and title for each featured group. Each item in this array has the following specification: * @@ -13595,7 +15311,7 @@ declare namespace __esri { interface PortalConstructor { /** - * The Portal class is part of the [ArcGIS Portal API](http://server.arcgis.com/en/portal/) which provides a way to build applications that work with content from [ArcGIS Online](http://www.arcgis.com/home/) or an [ArcGIS Portal API](http://server.arcgis.com/en/portal/). [ArcGIS Portal API](http://server.arcgis.com/en/portal/) is software from Esri that customers can deploy either on-premises or in the cloud. [ArcGIS Online](http://www.arcgis.com/home/) is Esri's Software as a Service offering that represents GIS as a Service and is implemented using the same technology as ArcGIS Portal. + * The Portal class is part of the [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/) that provides a way to build applications that work with content from [ArcGIS Online](http://www.arcgis.com/home/) or an [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/). [ArcGIS Enterprise](https://enterprise.arcgis.com/en/portal/) is software from Esri that customers can deploy either on-premises or in the cloud. [ArcGIS Online](http://www.arcgis.com/home/) is Esri's Software as a Service offering that represents GIS as a Service and is implemented using the same technology as ArcGIS Enterprise. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) */ @@ -13779,6 +15495,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#description) */ description?: string; + /** + * Boolean value indicating whether to opt-in to the [Esri User Experience Improvement (EUEI) program](https://doc.arcgis.com/en/arcgis-online/reference/faq.htm#ESRI_QUESTIONANSWER_AED97F28DCD84F7682623C2FA9E5CE49). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#eueiEnabled) + * + * @default false + */ + eueiEnabled?: boolean; /** * The featured groups for the portal. Returns an array of objects that provide access to the owner and title for each featured group. Each item in this array has the following specification: * @@ -14138,7 +15862,7 @@ declare namespace __esri { readonly url: string; /** - * Fetches the current members of the group. This method is only available to members or administrators of the group. View the ArcGIS Portal API REST documentation for the [Group Users](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Group_Users/02r30000006p000000/) for more details. + * Fetches the current members of the group. This method is only available to members or administrators of the group. View the ArcGIS REST API documentation for the [Group Users](https://developers.arcgis.com/rest/users-groups-and-items/group-users.htm) for more details. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalGroup.html#fetchMembers) * @@ -14405,7 +16129,7 @@ declare namespace __esri { */ title: string; /** - * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and Web Mapping Application. See the [ArcGIS REST API Items and Items Types Reference](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Items_and_item_types/02r3000000ms000000/) to get an understanding of the item type hierarchy. + * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and Web Mapping Application. See the [ArcGIS REST API Items and Items Types Reference](https://developers.arcgis.com/rest/users-groups-and-items/items-and-item-types.htm) to get an understanding of the item type hierarchy. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#type) */ @@ -14463,7 +16187,7 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#fetchRelatedItems) * * @param params See the object specifications table below for the parameters that may be passed as properties in this object. - * @param params.relationshipType The type of relationship between the two items. See [Relationship types](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mm000000) for a complete listing of types. + * @param params.relationshipType The type of relationship between the two items. See [Relationship types](https://developers.arcgis.com/rest/users-groups-and-items/relationship-types.htm) for a complete listing of types. * @param params.direction The direction of the relationship. Can either be `forward` (from origin to destination) or `reverse` (from destination to origin). **Possible Values:** forward | reverse * */ @@ -14631,7 +16355,7 @@ declare namespace __esri { */ title?: string; /** - * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and Web Mapping Application. See the [ArcGIS REST API Items and Items Types Reference](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Items_and_item_types/02r3000000ms000000/) to get an understanding of the item type hierarchy. + * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and Web Mapping Application. See the [ArcGIS REST API Items and Items Types Reference](https://developers.arcgis.com/rest/users-groups-and-items/items-and-item-types.htm) to get an understanding of the item type hierarchy. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#type) */ @@ -14653,7 +16377,7 @@ declare namespace __esri { export interface PortalItemFetchRelatedItemsParams extends Object { /** - * The type of relationship between the two items. See [Relationship types](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mm000000) for a complete listing of types. + * The type of relationship between the two items. See [Relationship types](https://developers.arcgis.com/rest/users-groups-and-items/relationship-types.htm) for a complete listing of types. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#fetchRelatedItems) */ @@ -14702,7 +16426,7 @@ declare namespace __esri { */ num: number; /** - * The query string used for the search. View the [ArcGIS REST API Search Reference](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mn000000) for details on constructing a valid query. + * The query string used for the search. View the [ArcGIS REST API Search Reference](https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm) for details on constructing a valid query. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalQueryParams.html#query) */ @@ -14785,7 +16509,7 @@ declare namespace __esri { */ num?: number; /** - * The query string used for the search. View the [ArcGIS REST API Search Reference](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mn000000) for details on constructing a valid query. + * The query string used for the search. View the [ArcGIS REST API Search Reference](https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm) for details on constructing a valid query. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalQueryParams.html#query) */ @@ -15263,24 +16987,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#backgroundFillSymbol) */ - backgroundFillSymbol: FillSymbol; + backgroundFillSymbol: FillSymbol | PolygonSymbol3D; /** * Each element in the array is an object that provides information about a class break associated with the renderer. Each object has the following specification: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classBreakInfos) */ classBreakInfos: ClassBreaksRendererClassBreakInfos[]; - /** - * The classification method used to generate class breaks if the renderer was generated with either of the two following methods: - * * [colorRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) - * * [sizeRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) - * - * - * **Known Values:** equal-interval | natural-breaks | quantile | standard-deviation - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classificationMethod) - */ - classificationMethod: string; /** * The default symbol assigned to features with a value not matched to a given break. If `null`, unmatched features will not be assigned a symbol. * > **Known Limitations** SceneLayers with a `mesh` [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) will display unmatching features with a generic symbol even if the `defaultSymbol` is `null`. @@ -15413,24 +17126,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#backgroundFillSymbol) */ - backgroundFillSymbol?: FillSymbolProperties; + backgroundFillSymbol?: FillSymbolProperties | PolygonSymbol3DProperties; /** * Each element in the array is an object that provides information about a class break associated with the renderer. Each object has the following specification: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classBreakInfos) */ classBreakInfos?: ClassBreaksRendererClassBreakInfos[]; - /** - * The classification method used to generate class breaks if the renderer was generated with either of the two following methods: - * * [colorRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) - * * [sizeRendererCreator.createClassBreaksRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) - * - * - * **Known Values:** equal-interval | natural-breaks | quantile | standard-deviation - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html#classificationMethod) - */ - classificationMethod?: string; /** * The default symbol assigned to features with a value not matched to a given break. If `null`, unmatched features will not be assigned a symbol. * > **Known Limitations** SceneLayers with a `mesh` [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) will display unmatching features with a generic symbol even if the `defaultSymbol` is `null`. @@ -16915,13 +18617,13 @@ declare namespace __esri { */ interface color { /** - * Generates a [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) that may be applied directly to the layer used to call this method. The resulting renderer defines the symbol color of each feature based on the value of the given `field` value. A default color scheme is determined based on the given `basemap`. Depending on the `classificationMethod`, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a color based on the class break in which the value of the `field` falls. In most cases you will provide a `layer`, `basemap`, `field`, and `classificationMethod` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. + * Generates a [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) that may be applied directly to the layer used to call this method. The resulting renderer defines the symbol color of each feature based on the value of the given `field` value. A default color scheme is determined based on the given `basemap`. Depending on the `classificationMethod`, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a color based on the class break in which the value of the `field` falls. In most cases you will provide a `layer`, `basemap`, `field`, and `classificationMethod` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) * * @param params Input parameters for generating a classed color visualization based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. - * @param params.field The name of the field whose data will be queried for statistics and classified. + * @param params.field The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @param params.normalizationType With the exception of `log` normalization, data normalization creates a ratio by dividing two values. When comparing attribute values between features, normalization minimizes the effect of varying map areas and the number of observations. For example, dividing the 18 to 30 year old population by the area of a polygon feature yields a density value that can be compared evenly with other features, regardless of their size. * Indicates how the data is normalized. The data value obtained from the `field` is normalized in one of the following ways before it is compared with the class breaks. See the table below for a list of possible values. @@ -16933,7 +18635,7 @@ declare namespace __esri { * percent-of-total | Divides the data value by the sum of all data values then multiplies by 100. Use `normalizationTotal` to define the total value by which to normalize. This value is set by default if the `normalizationTotal` is provided. * * @param params.normalizationTotal When `normalizationType` is `percent-of-total`, this property contains the total of all data values. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.classificationMethod * The classification method used for generating breaks. See the table below for a list of possible values. * @@ -16946,11 +18648,15 @@ declare namespace __esri { * @param params.standardDeviationInterval If a `standard-deviation` classification method is used, then this indicates the interval by which to generate class breaks. **Possible Values:** 1 | 0.5 | 0.33 | 0.25 * @param params.numClasses The number of class breaks to generate. This is ignored if a `standard-deviation` classification method is specified. * @param params.colorScheme In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This option only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to describe a field instead of using the field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.minValue A minimum value set by the user. Use this in conjunction with `maxValue` to generate class breaks between lower and upper bounds. This will be the lower bound of the lowest class break. * @param params.maxValue A maximum value set by the user. Use this in conjunction with `minValue` to generate class breaks between lower and upper bounds. This will be the upper bound of the highest class break. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, but isn't required for layers with a `mesh` geometry type. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter does not need to be specified for layers with a `mesh` geometry type. Known values are described below. * @@ -16971,15 +18677,15 @@ declare namespace __esri { */ createClassBreaksRenderer(params: colorCreateClassBreaksRendererParams): IPromise; /** - * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to the layer used to call this method. The renderer contains a continuous color visual variable that maps optimal colors based on the indicated basemap to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, `field`, and `theme` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. + * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to the layer used to call this method. The renderer contains a continuous color visual variable that maps optimal colors based on the indicated basemap to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, `field`, and `theme` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) * * @param params Input parameters for generating a continuous color visualization based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.theme * Determines which values will be emphasized in the continuous ramp and the map. Valid values are listed below. * @@ -16990,12 +18696,16 @@ declare namespace __esri { * | centered-on | Values centered around a given point (e.g. the average) are emphasized with strong colors while other values are visualized with weak colors. | ![centered-on](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/sm-centered-on.png) | * | extremes | High and low values are emphasized with strong colors. All others are visualized with weak colors. | ![extremes](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/sm-extremes.png) | * @param params.colorScheme In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on a `theme` and the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned color visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned color visual variable. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, but isn't required for layers with a `mesh` geometry type. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter does not need to be specified for layers with a `mesh` geometry type. Known values are described below. * @@ -17023,7 +18733,7 @@ declare namespace __esri { * @param params Input parameters for generating a renderer based on the given field of the input layer. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. The only field names used for this renderer type are `elevation` and `intensity`. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.size The size of each point expressed as a percentage. This value will determine point sizes scaled based on the given `density` of points. When the value is `100%`, the size of each point is set so that it minimizes the number of gaps between neighboring points. Any value above `100%` will allow for points to overlap neighboring points scaled to the given value. Values below `100%` scale point sizes smaller so there appear to be more gaps between points. * @param params.density The number of points per inch in the view. * @param params.colorScheme In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. @@ -17044,15 +18754,15 @@ declare namespace __esri { */ createPCTrueColorRenderer(params: colorCreatePCTrueColorRendererParams): IPromise; /** - * This method generates a color visual variable with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and colors based on the input basemap. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, `field`, and `theme`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. + * This method generates a color visual variable with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and colors based on the input basemap. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, `field`, and `theme`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. You can optionally use a `valueExpression` instead of a field to visualize features based on a numeric value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) * * @param params Input parameters for generating a color visual variable based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visual variable is generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.theme * Determines which values will be emphasized in the continuous ramp and the map. Valid values are listed below. * @@ -17063,11 +18773,15 @@ declare namespace __esri { * | centered-on | Values centered around a given point (e.g. the average) are emphasized with strong colors while other values are visualized with weak colors. | ![centered-on](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/sm-centered-on.png) | * | extremes | High and low values are emphasized with strong colors. All others are visualized with weak colors. | ![extremes](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/sm-extremes.png) | * @param params.colorScheme In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on a `theme` and the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned color visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned color visual variable. - * @param params.view The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols, except for layers with a `mesh` geometry type. + * @param params.view When generating 3D symbols (except for layers with a `mesh` geometry type), a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology, except for layers with a `mesh` geometry type. A `view` must be provided if this property is set to `true`. * */ @@ -17121,13 +18835,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and classified. + * The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @@ -17155,7 +18869,7 @@ declare namespace __esri { */ normalizationTotal?: number; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) * @@ -17200,6 +18914,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ colorScheme?: ColorScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This option only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + sqlWhere?: string; /** * Provides options for setting a title to describe a field instead of using the field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -17227,11 +18965,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, but isn't required for layers with a `mesh` geometry type. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter does not need to be specified for layers with a `mesh` geometry type. Known values are described below. * @@ -17281,13 +19019,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @@ -17295,7 +19033,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) * @@ -17322,6 +19060,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ colorScheme?: ColorScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -17355,11 +19117,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, but isn't required for layers with a `mesh` geometry type. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter does not need to be specified for layers with a `mesh` geometry type. Known values are described below. * @@ -17423,7 +19185,7 @@ declare namespace __esri { */ field: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createPCContinuousRenderer) * @@ -17493,13 +19255,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @@ -17507,7 +19269,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) * @@ -17534,6 +19296,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ colorScheme?: ColorScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -17559,11 +19345,11 @@ declare namespace __esri { */ maxValue?: number; /** - * The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols, except for layers with a `mesh` geometry type. + * When generating 3D symbols (except for layers with a `mesh` geometry type), a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ - view?: SceneView; + view?: View; /** * Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology, except for layers with a `mesh` geometry type. A `view` must be provided if this property is set to `true`. * @@ -17741,7 +19527,7 @@ declare namespace __esri { * * @param params Input parameters for generating a location-based visualization. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.locationScheme In authoring apps, the user may select a pre-defined location scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric"`, except for layers with a `mesh` geometryType. * @param params.symbolType @@ -17774,9 +19560,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-location.html#createRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-location.html#createRenderer) * @@ -17860,18 +19646,23 @@ declare namespace __esri { */ interface opacity { /** - * This method generates an opacity visual variable with default alpha values optimally mapped to data values based on the statistics queried for the indicated field or expression. There are several ways this method may be called. The most common case is by providing a `layer` and a `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know the which alpha values to map to data values. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the stats in the `statistics` parameter to avoid making an extra call to the server. + * This method generates an opacity visual variable with default alpha values optimally mapped to data values based on the statistics queried for the indicated field or expression. There are several ways this method may be called. The most common case is by providing a `layer` and a `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know the which alpha values to map to data values. You can optionally use a `valueExpression` instead of a field to visualize features based on a numeric value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the stats in the `statistics` parameter to avoid making an extra call to the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) * * @param params Input parameters for generating an opacity visual variable based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visual variable is generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned visual variable. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. * */ createVisualVariable(params: opacityCreateVisualVariableParams): IPromise; @@ -17886,19 +19677,43 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ normalizationField?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -17923,6 +19738,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) */ maxValue?: number; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + view?: View; } @@ -17974,14 +19795,14 @@ declare namespace __esri { */ interface size { /** - * Generates a [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) that may be applied directly to the layer used to call this method. The resulting renderer defines the symbol size of each feature based on the value of the given `field` value. A default size scheme is determined based on the given `basemap`. Depending on the `classificationMethod`, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a color based on the class break in which the value of the `field` falls. In most cases you will provide a `layer`, `basemap`, `field`, and `classificationMethod` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what sizes to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. + * Generates a [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) that may be applied directly to the layer used to call this method. The resulting renderer defines the symbol size of each feature based on the value of the given `field` value. A default size scheme is determined based on the given `basemap`. Depending on the `classificationMethod`, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a color based on the class break in which the value of the `field` falls. In most cases you will provide a `layer`, `basemap`, `field`, and `classificationMethod` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what sizes to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) * * @param params Input parameters for generating a classed size visualization based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visualization is generated. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. - * @param params.field The name of the field whose data will be queried for statistics and classified. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. + * @param params.field The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @param params.normalizationType With the exception of `log` normalization, data normalization creates a ratio by dividing two values. When comparing attribute values between features, normalization minimizes the effect of varying map areas and the number of observations. For example, dividing the 18 to 30 year old population by the area of a polygon feature yields a density value that can be compared evenly with other features, regardless of their size. * Indicates how the data is normalized. The data value obtained from the `field` is normalized in one of the following ways before it is compared with the class breaks. See the table below for a list of possible values. @@ -18005,11 +19826,15 @@ declare namespace __esri { * @param params.standardDeviationInterval If a `standard-deviation` classification method is used, then this indicates the interval by which to generate class breaks. **Possible Values:** 1 | 0.5 | 0.33 | 0.25 * @param params.numClasses The number of class breaks to generate. This is ignored if a `standard-deviation` classification method is specified. * @param params.sizeScheme In authoring apps, the user may select a pre-defined size scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to describe a field instead of using the field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.minValue A minimum value set by the user. Use this in conjunction with `maxValue` to generate class breaks between lower and upper bounds. This will be the lower bound of the lowest class break. * @param params.maxValue A maximum value set by the user. Use this in conjunction with `minValue` to generate class breaks between lower and upper bounds. This will be the upper bound of the highest class break. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18023,22 +19848,26 @@ declare namespace __esri { */ createClassBreaksRenderer(params: sizeCreateClassBreaksRendererParams): IPromise; /** - * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to the layer used to call this method. The renderer contains a continuous size visual variable that maps marker sizes to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, and `field` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. + * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to the layer used to call this method. The renderer contains a continuous size visual variable that maps marker sizes to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, and `field` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) * * @param params Input parameters for generating size visual variables based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the renderer is generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.sizeScheme In authoring apps, the user may select a pre-defined size scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned size visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned size visual variable. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18052,21 +19881,25 @@ declare namespace __esri { */ createContinuousRenderer(params: sizeCreateContinuousRendererParams): IPromise; /** - * This method generates an array of size visual variables with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and mapped to appropriate sizes. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, and `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. The resulting array of visual variables will contain exactly one size visual variable unless the `axis` parameter is set to "height". + * This method generates an array of size visual variables with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and mapped to appropriate sizes. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, and `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. You can optionally use a `valueExpression` instead of a field to visualize features based on a numeric value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. The resulting array of visual variables will contain exactly one size visual variable unless the `axis` parameter is set to "height". * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) * * @param params Input parameters for generating size visual variables based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visual variables are generated. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.sizeScheme In authoring apps, the user may select a pre-defined size scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.legendOptions Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned size visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned size visual variable. - * @param params.view The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols. + * @param params.view When generating 3D symbols, a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. * @param params.axis When set to `all`, a single size variable that scales uniformly in all dimensions is generated. When set to `height`, the result contains two size visual variables: the first one sizes the height according to the field statistics, while the second defines a constant size for width and depth. **Possible Values:** all | height * @@ -18165,9 +19998,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) * @@ -18175,7 +20008,7 @@ declare namespace __esri { */ basemap?: string | Basemap; /** - * The name of the field whose data will be queried for statistics and classified. + * The name of the field whose data will be queried for statistics and classified. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ @@ -18244,6 +20077,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ sizeScheme?: PointSizeScheme | PolylineSizeScheme | PolygonSizeScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + sqlWhere?: string; /** * Provides options for setting a title to describe a field instead of using the field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -18271,11 +20128,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18311,13 +20168,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * @@ -18325,7 +20182,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) * @@ -18338,6 +20195,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ sizeScheme?: PointSizeScheme | PolylineSizeScheme | PolygonSizeScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -18371,11 +20252,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18417,9 +20298,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ @@ -18431,7 +20312,7 @@ declare namespace __esri { */ normalizationField?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) * @@ -18444,6 +20325,30 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ sizeScheme?: PointSizeScheme | PolylineSizeScheme | PolygonSizeScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + sqlWhere?: string; /** * Provides options for setting a title to a field when an expression is provided instead of a field name. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -18469,11 +20374,11 @@ declare namespace __esri { */ maxValue?: number; /** - * The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols. + * When generating 3D symbols, a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) */ - view?: SceneView; + view?: View; /** * Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. * @@ -18572,14 +20477,14 @@ declare namespace __esri { */ createPCClassRenderer(params: typeCreatePCClassRendererParams): IPromise; /** - * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) that supports renderers. The renderer contains unique symbols representing a string or a numeric value returned from the indicated field. In most cases you will provide a `layer`, `basemap`, and `field` to generate this renderer. This is a scenario in which the values of the field aren't well known and the user doesn't know which colors to use in the visualization. + * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) that supports renderers. The renderer contains unique symbols representing a string or a numeric value returned from the indicated field. In most cases you will provide a `layer`, `basemap`, and `field` to generate this renderer. This is a scenario in which the values of the field aren't well known and the user doesn't know which colors to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) * * @param params Input parameters for generating symbols to represent unique types based on data returned from a given field. See the table below for details of each parameter. * @param params.layer The layer for which the renderer is generated. - * @param params.field The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * @param params.field The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * @param params.numTypes The number of types (or categories) displayed by the renderer. Use `-1` to display all returned types. * @param params.sortBy * Indicates how values should be sorted in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). See the table below for information about values that may be passed to this parameter. @@ -18591,9 +20496,11 @@ declare namespace __esri { * * **Known Values:** count | value * @param params.typeScheme In authoring apps, the user may select a pre-defined type scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number or a string. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. * @param params.legendOptions Provides options for setting a title to a field that will override the field alias defined in the service. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`, except for layers with a `mesh` geometry type. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter can be ignored for layers with a `mesh` geometry type. Known values are described below. * @@ -18722,15 +20629,15 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. + * The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ - field: string; + field?: string; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) * @@ -18767,6 +20674,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ typeScheme?: PointTypeScheme | PolylineTypeScheme | PolygonTypeScheme | MeshTypeScheme; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number or a string. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) + */ + valueExpressionTitle?: string; /** * Provides options for setting a title to a field that will override the field alias defined in the service. This title will represent the field in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html). * @@ -18780,11 +20699,11 @@ declare namespace __esri { */ defaultSymbolEnabled?: boolean; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`, except for layers with a `mesh` geometry type. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. This parameter can be ignored for layers with a `mesh` geometry type. Known values are described below. * @@ -18869,22 +20788,26 @@ declare namespace __esri { */ interface univariateColorSize { /** - * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). The renderer contains continuous color and size visual variables that map symbols with optimal colors and sizes based on the indicated basemap to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, `field`, and `theme` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors and sizes to use in the visualization. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. + * Generates a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that may be applied directly to a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). The renderer contains continuous color and size visual variables that map symbols with optimal colors and sizes based on the indicated basemap to specific stop values based on queried statistics from the indicated field or expression. In most cases you will provide a `layer`, `basemap`, `field`, and `theme` to generate this renderer. This is a scenario in which the statistics of the data aren't well known and the user doesn't know what colors and sizes to use in the visualization. You can also use a `valueExpression` instead of a `field` to visualize features based on a value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the statistics object to the `statistics` parameter to avoid making an extra call to the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) * * @param params See the table below for details of each parameter that may be passed to this method. * @param params.layer The layer for which the visual variable is generated. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variables. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned visual variables. * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value and features that do not fall within the configured data range. * @param params.colorOptions Options for configuring the color portion of the visualization. * @param params.sizeOptions Options for configuring the size portion of the visualization. - * @param params.view The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * @param params.view The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.symbolType * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -18898,21 +20821,25 @@ declare namespace __esri { */ createContinuousRenderer(params: univariateColorSizeCreateContinuousRendererParams): IPromise; /** - * This method generates color and size visual variables, both based on the same given field or expression. These visual variables are generated with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and colors based on the input basemap. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, and `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` and/or a `sizeScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. The resulting array of visual variables will contain one color visual variable, and one or two size visual variables depending on the value of the `sizeOptions.axis` parameter. + * This method generates color and size visual variables, both based on the same given field or expression. These visual variables are generated with default stops that are optimally chosen based on the statistics queried for the indicated field or expression and colors based on the input basemap. There are two different ways this method may be called. The most common case is by providing a `layer`, `basemap`, and `field`. This is the scenario where the statistics of the data aren't well known and the user doesn't know what colors to use. You can optionally use a `valueExpression` instead of a field to visualize features based on a numeric value returned from a script executed at runtime. The other options are provided for convenience for more involved custom visualization authoring applications. For example, if you already generated statistics in another operation, you can pass the object in the `statistics` parameter to avoid making an extra call to the server. You can also provide a `colorScheme` and/or a `sizeScheme` if you don't want one picked for you. In this case the `basemap` and `theme` options would be ignored. The resulting array of visual variables will contain one color visual variable, and one or two size visual variables depending on the value of the `sizeOptions.axis` parameter. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) * * @param params Input parameters for generating color and size visual variables based on data returned from a given field or expression. See the table below for details of each parameter. * @param params.layer The layer for which the visual variable is generated. - * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. - * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * @param params.basemap The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. + * @param params.field The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.valueExpressionTitle Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter is only supported for service based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variables. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned visual variables. * @param params.colorOptions Options for configuring the color portion of the visualization. * @param params.sizeOptions Options for configuring the size portion of the visualization. - * @param params.view The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols. + * @param params.view When generating 3D symbols, a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. * */ @@ -18972,9 +20899,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) * @@ -18982,17 +20909,41 @@ declare namespace __esri { */ basemap?: string | Basemap; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ normalizationField?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + sqlWhere?: string; /** * A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @@ -19030,11 +20981,11 @@ declare namespace __esri { */ sizeOptions?: univariateColorSizeCreateContinuousRendererParamsSizeOptions; /** - * The SceneView instance in which the visualization will be rendered. This parameter is required if `symbolType = "3d-volumetric" or "3d-volumetric-uniform"`. + * The view instance in which the visualization will be rendered. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is required if `symbolType = "3d-volumetric"` or `3d-volumetric-uniform`. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) */ - view?: SceneView; + view?: View; /** * The type of symbol to generate. This depends on the view in which you are working and the desired visualization. Known values are described below. * @@ -19126,9 +21077,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer; /** - * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) of the Esri basemap or basemap object that will be paired with the output visualization. + * The [named string](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) or basemap object of the Esri basemap that will be paired with the output visualization. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) * @@ -19136,17 +21087,41 @@ declare namespace __esri { */ basemap?: string | Basemap; /** - * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. + * The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ - field: string; + field?: string; /** * The name of the field to normalize the values of the given `field`. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ normalizationField?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + valueExpression?: string; + /** + * Text describing the value returned from the `valueExpression`. This is used by the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + valueExpressionTitle?: string; + /** + * A SQL expression evaluating to a number. This parameter is only supported for service based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + sqlWhere?: string; /** * A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server. * @@ -19178,11 +21153,11 @@ declare namespace __esri { */ sizeOptions?: univariateColorSizeCreateVisualVariablesParamsSizeOptions; /** - * The SceneView instance in which the visualization will be rendered. This property is only applicable to generating visualizations with 3D symbols. + * When generating 3D symbols, a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) instance is required. The relevant SceneView or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is required when a `valueExpression` is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ - view?: SceneView; + view?: View; /** * Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. * @@ -19380,7 +21355,7 @@ declare namespace __esri { */ interface classBreaks { /** - * Generates class breaks for an input field of a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) based on a given classification method and normalization type. + * Generates class breaks for an input field (or expression) of a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) based on a given classification method and normalization type. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) * @@ -19401,6 +21376,11 @@ declare namespace __esri { * @param params.minValue The minimum bounding value for the class breaks definition. Use this in conjunction with `maxValue` to generate class breaks between lower and upper bounds. * @param params.maxValue The maximum bounding value for the class breaks definition. Use this in conjunction with `minValue` to generate class breaks between lower and upper bounds. * @param params.numClasses Indicates the number of classes to generate for the class breaks definition. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.features A subset of features for which to generate the class breaks. * */ classBreaks(params: classBreaksClassBreaksParams): IPromise; @@ -19417,7 +21397,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) */ - layer: FeatureLayer | SceneLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; /** * The class breaks will be generated based on values of this field. If a field is provided, the values from the given field from all features will be queried in the service. * @@ -19468,6 +21448,36 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) */ numClasses?: number; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + valueExpression?: string; + /** + * A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + sqlWhere?: string; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + view?: View; + /** + * A subset of features for which to generate the class breaks. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + features?: Graphic[]; } /** @@ -19537,7 +21547,7 @@ declare namespace __esri { * * @param params See the table below for details on parameters that may be passed to this function. * @param params.layer The layer for which to generate a histogram. - * @param params.field The name of the numeric field for which the histogram will be generated. + * @param params.field The name of the numeric field for which the histogram will be generated. This property is ignored if a `valueExpression` is used. * @param params.normalizationField The field by which to normalize the values returned from the given `field`. * @param params.classificationMethod * The method for classifying the data. See the table below for a list of possible values. @@ -19552,6 +21562,11 @@ declare namespace __esri { * @param params.minValue The minimum bounding value for the histogram. Use this in conjunction with `maxValue` to generate a histogram between custom lower and upper bounds. * @param params.maxValue The maximum bounding value for the histogram. Use this in conjunction with `minValue` to generate a histogram between custom lower and upper bounds. * @param params.numBins Indicates the number of classes to generate for the histogram. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.features A subset of features for which to generate the histogram. * */ histogram(params: histogramHistogramParams): IPromise; @@ -19568,9 +21583,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) */ - layer: FeatureLayer | SceneLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; /** - * The name of the numeric field for which the histogram will be generated. + * The name of the numeric field for which the histogram will be generated. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) */ @@ -19621,6 +21636,36 @@ declare namespace __esri { * @default 10 */ numBins?: number; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + valueExpression?: string; + /** + * A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + sqlWhere?: string; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + view?: View; + /** + * A subset of features for which to generate the histogram. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + features?: Graphic[]; } /** @@ -19678,17 +21723,21 @@ declare namespace __esri { */ interface summaryStatistics { /** - * Returns an object containing various statistics describing a set of values returned from a field in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). + * Returns an object containing various statistics describing a set of values returned from a field (or expression) in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) * * @param params See the table below for details of each parameter. * @param params.layer The layer from which to generate statistics for the given `field`. - * @param params.field The name of the numeric field for which the summary statistics will be generated. + * @param params.field The name of the numeric field for which the summary statistics will be generated. This property is ignored if a `valueExpression` is used. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.sqlExpression A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.normalizationField The field by which to normalize the values returned from the given `field`. - * @param params.features If the FeatureLayer is constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter. * @param params.minValue The minimum bounding value for the statistics calculation. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. * @param params.maxValue The maximum bounding value for the statistics calculation. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.features A subset of features for which to calculate the statistics. * */ summaryStatistics(params: summaryStatisticsSummaryStatisticsParams): IPromise; @@ -19705,7 +21754,7 @@ declare namespace __esri { */ export interface SummaryStatisticsResult extends Object { /** - * The average of all values returned from the field. + * The average of all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ @@ -19717,31 +21766,31 @@ declare namespace __esri { */ count: number; /** - * The maximum of all values returned from the field. + * The maximum of all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ max: number; /** - * The minimum of all values returned from the field. + * The minimum of all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ min: number; /** - * The standard deviation calculated from values returned from the field. + * The standard deviation calculated from values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ stddev: number; /** - * The sum of all values returned from the field. + * The sum of all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ sum: number; /** - * The calculated variance from all values returned from the field. + * The calculated variance from all values returned from the field or expression. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#SummaryStatisticsResult) */ @@ -19755,25 +21804,37 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ - layer: FeatureLayer | SceneLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; /** - * The name of the numeric field for which the summary statistics will be generated. + * The name of the numeric field for which the summary statistics will be generated. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ field?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + valueExpression?: string; + /** + * A SQL expression evaluating to a number. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + sqlWhere?: string; /** * The field by which to normalize the values returned from the given `field`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ normalizationField?: string; - /** - * If the FeatureLayer is constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) - */ - features?: Graphic[]; /** * The minimum bounding value for the statistics calculation. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. * @@ -19786,6 +21847,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ maxValue?: number; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + view?: View; + /** + * A subset of features for which to calculate the statistics. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + features?: Graphic[]; } /** @@ -19795,15 +21868,19 @@ declare namespace __esri { */ interface uniqueValues { /** - * Returns an object containing an array of unique values queried from a given field in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) along with the total count of features that belong to the given category. + * Returns an object containing an array of unique values queried from a given field (or values returned from an expression) in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) along with the total count of features that belong to the given category. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) * * @param params See the table below for details of each parameter. * @param params.layer The layer from which to query for unique values. - * @param params.field The name of the numeric or string field from which the unique values will be obtained. - * @param params.features If the `layer` is a FeatureLayer constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter. + * @param params.field The name of the numeric or string field from which the unique values will be obtained. This property is ignored if a `valueExpression` is used. + * @param params.valueExpression An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number or string. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. + * @param params.sqlExpression A SQL expression evaluating to a number or string. This parameter only applies to service-based FeatureLayers. + * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.returnAllCodedValues Indicates that all domain codes should be returned if the given field has domain values. + * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.features A subset of features for which to generate the unique values. * */ uniqueValues(params: uniqueValuesUniqueValuesParams): IPromise; @@ -19834,25 +21911,49 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ - layer: FeatureLayer | SceneLayer | PointCloudLayer; + layer: FeatureLayer | SceneLayer | CSVLayer | PointCloudLayer; /** - * The name of the numeric or string field from which the unique values will be obtained. + * The name of the numeric or string field from which the unique values will be obtained. This property is ignored if a `valueExpression` is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ - field: string; + field?: string; /** - * If the `layer` is a FeatureLayer constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter. + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that returns a number or string. This expression can reference field values using the `$feature` global variable. This property overrides the `field` property and therefore is used instead of an input `field` value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ - features?: Graphic[]; + valueExpression?: string; + /** + * A SQL expression evaluating to a number or string. This parameter only applies to service-based FeatureLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + sqlExpression?: string; + /** + * A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + sqlWhere?: string; /** * Indicates that all domain codes should be returned if the given field has domain values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ returnAllCodedValues?: boolean; + /** + * A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + view?: View; + /** + * A subset of features for which to generate the unique values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + features?: Graphic[]; } @@ -20940,7 +23041,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-jsonUtils.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Renderer_objects/02r30000019t000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/renderer-objects.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): Renderer; @@ -20949,6 +23050,12 @@ declare namespace __esri { export const supportJsonUtils: supportJsonUtils; interface UniqueValueRenderer extends Renderer, VisualVariablesMixin { + /** + * This property is only relevant When symbolizing polygon features with marker symbols (or [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html)) in the [uniqueValueInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#uniqueValueInfos) of this renderer. This is usually done when adding a [SizeVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html#SizeVisualVariable) to the [visualVariables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#visualVariables)) in a bivariate visualization (color indicates a type-based value and size indicates the value of a separate numeric field). Use this property to set a background [FillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol.html) (or [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PolygonSymbol3D.html) if visualizing data in 3D) to visualize the boundaries of each polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#backgroundFillSymbol) + */ + backgroundFillSymbol: FillSymbol | PolygonSymbol3D; /** * Label used in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) to describe features assigned the [default symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#defaultSymbol). The [default symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#defaultSymbol) is used to draw all features with unspecified, unmatched values. * @@ -21113,6 +23220,12 @@ declare namespace __esri { export const UniqueValueRenderer: UniqueValueRendererConstructor; interface UniqueValueRendererProperties extends RendererProperties, VisualVariablesMixinProperties { + /** + * This property is only relevant When symbolizing polygon features with marker symbols (or [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html)) in the [uniqueValueInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#uniqueValueInfos) of this renderer. This is usually done when adding a [SizeVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html#SizeVisualVariable) to the [visualVariables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#visualVariables)) in a bivariate visualization (color indicates a type-based value and size indicates the value of a separate numeric field). Use this property to set a background [FillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol.html) (or [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PolygonSymbol3D.html) if visualizing data in 3D) to visualize the boundaries of each polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#backgroundFillSymbol) + */ + backgroundFillSymbol?: FillSymbolProperties | PolygonSymbol3DProperties; /** * Label used in the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) to describe features assigned the [default symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#defaultSymbol). The [default symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#defaultSymbol) is used to draw all features with unspecified, unmatched values. * @@ -21816,7 +23929,172 @@ declare namespace __esri { color?: Color; } + interface Edges3D extends Accessor, JSONSupport { + /** + * The color of the edges. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#color) + * + * @default black + */ + color: Color; + /** + * A size in points by which to extend edges beyond their original end points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#extensionLength) + * + * @default "0" + */ + extensionLength: number; + /** + * The size of the edges in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#size) + * + * @default 1px + */ + size: number; + + /** + * Creates a deep clone of the edges. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#clone) + * + * + */ + clone(): Edges3D; + } + + interface Edges3DConstructor { + /** + * Edges3D is the base class for symbol classes that add edge rendering visualization to existing symbols. Edge rendering visualization is specific for 3D visualizations and can only be applied to [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html) on [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) or [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html) on [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PolygonSymbol3D.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html) + */ + + new(properties?: Edges3DProperties): Edges3D; + + fromJSON(json: any): Edges3D; + } + + export const Edges3D: Edges3DConstructor; + + interface Edges3DProperties { + /** + * The color of the edges. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#color) + * + * @default black + */ + color?: Color | number[] | string; + /** + * A size in points by which to extend edges beyond their original end points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#extensionLength) + * + * @default "0" + */ + extensionLength?: number | string; + /** + * The size of the edges in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#size) + * + * @default 1px + */ + size?: number | string; + } + + interface SketchEdges3D extends Edges3D { + /** + * For SketchEdges3D the type is always `sketch`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SketchEdges3D.html#type) + */ + type: "sketch"; + + /** + * Creates a deep clone of the object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SketchEdges3D.html#clone) + * + * + */ + clone(): SketchEdges3D; + } + + interface SketchEdges3DConstructor { + /** + * SketchEdges3D is a symbol type that visualizes edges of [3D Object SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), extruded polygons or mesh geometries with a sketched line. It can be used to emphasize the form of 3D objects and to improve the three-dimensional spatial understanding. A sketched line aims to look like a hand-drawn line. In architecture this is useful for visualizing planned urban projects. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SketchEdges3D.html) + */ + + new(properties?: SketchEdges3DProperties): SketchEdges3D; + + fromJSON(json: any): SketchEdges3D; + } + + export const SketchEdges3D: SketchEdges3DConstructor; + + interface SketchEdges3DProperties extends Edges3DProperties { + /** + * For SketchEdges3D the type is always `sketch`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SketchEdges3D.html#type) + */ + type?: "sketch"; + } + + interface SolidEdges3D extends Edges3D { + /** + * For SolidEdges3D the type is always `solid`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SolidEdges3D.html#type) + */ + type: "solid"; + + /** + * Creates a deep clone of the object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SolidEdges3D.html#clone) + * + * + */ + clone(): SolidEdges3D; + } + + interface SolidEdges3DConstructor { + /** + * SolidEdges3D is a symbol type that visualizes edges of [3D Object SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), extruded polygons or mesh geometries with a solid line. It can be used to emphasize the form of 3D objects and to improve the three-dimensional spatial understanding. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SolidEdges3D.html) + */ + + new(properties?: SolidEdges3DProperties): SolidEdges3D; + + fromJSON(json: any): SolidEdges3D; + } + + export const SolidEdges3D: SolidEdges3DConstructor; + + interface SolidEdges3DProperties extends Edges3DProperties { + /** + * For SolidEdges3D the type is always `solid`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-SolidEdges3D.html#type) + */ + type?: "solid"; + } + interface ExtrudeSymbol3DLayer extends Symbol3DLayer { + /** + * Sets the contour edges on polygons symbolized with ExtrudeSymbol3DLayer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#edges) + */ + edges: Edges3D; /** * The height of the extrusion in meters. Negative values will extrude the polygon surface downward towards or below the ground. * @@ -21857,6 +24135,12 @@ declare namespace __esri { export const ExtrudeSymbol3DLayer: ExtrudeSymbol3DLayerConstructor; interface ExtrudeSymbol3DLayerProperties extends Symbol3DLayerProperties { + /** + * Sets the contour edges on polygons symbolized with ExtrudeSymbol3DLayer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#edges) + */ + edges?: Edges3DProperties; /** * The height of the extrusion in meters. Negative values will extrude the polygon surface downward towards or below the ground. * @@ -21901,7 +24185,13 @@ declare namespace __esri { interface FillSymbol3DLayer extends Symbol3DLayer { /** - * The outline used to draw a line around the filled geometry. + * Sets the contour edges on 3D Objects. This is only applicable for [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html). ![symbol3D-edges-solid](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbol3d-edges-solid-2.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#edges) + */ + edges: Edges3D; + /** + * The outline used to draw a line around the filled geometry. This property is not supported in [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) symbol layers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#outline) */ @@ -21939,7 +24229,13 @@ declare namespace __esri { interface FillSymbol3DLayerProperties extends Symbol3DLayerProperties { /** - * The outline used to draw a line around the filled geometry. + * Sets the contour edges on 3D Objects. This is only applicable for [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html). ![symbol3D-edges-solid](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbol3d-edges-solid-2.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#edges) + */ + edges?: Edges3DProperties; + /** + * The outline used to draw a line around the filled geometry. This property is not supported in [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) symbol layers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#outline) */ @@ -22361,7 +24657,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html#size) * - * @default 0.75 + * @default "1px" */ size: number; /** @@ -22401,7 +24697,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html#size) * - * @default 0.75 + * @default "1px" */ size?: number | string; } @@ -23483,7 +25779,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-jsonUtils.html#fromJSON) * - * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Symbol_Objects/02r3000000n5000000/) for examples of the structure of various input JSON objects. + * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm) for examples of the structure of various input JSON objects. * */ fromJSON(json: any): Symbol; @@ -23593,7 +25889,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html#styleOrigin) */ - readonly styleOrigin: Symbol3DStyleOrigin; + styleOrigin: Symbol3DStyleOrigin; /** * A Collection of [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) objects used to visualize the graphic or feature. Individual symbol layers may be autocast as objects and specified using the `type` property. * @@ -23617,6 +25913,12 @@ declare namespace __esri { export const Symbol3D: Symbol3DConstructor; interface Symbol3DProperties extends SymbolProperties { + /** + * The origin of the style from which the symbol was originally referenced. A reference to the style origin can be either by styleName or by styleUrl (but not both). This information is part of the WebScene persistence model and may be used to understand where a symbol was originally sourced from. It does not affect actual appearance or rendering of the symbol. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html#styleOrigin) + */ + styleOrigin?: Symbol3DStyleOrigin; /** * A Collection of [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) objects used to visualize the graphic or feature. Individual symbol layers may be autocast as objects and specified using the `type` property. * @@ -24376,8 +26678,8 @@ declare namespace __esri { * @param params See the object specifications table below for the structure of the `params` object. * @param params.strings An array of formatted strings as specified by `conversionType`. Example: `["01N AA 66021 00000" , "11S NT 00000 62155" , "31U BT 94071 65288"]` * @param params.sr The spatial reference or well-known ID to convert the input string coordinates to. - * @param params.conversionType The converstion type of the input strings. **Possible Values:** mrgs | usng | utm | geo-ref | gars | dms | ddm | dd - * @param params.conversionMode Conversion options for mrgs, utm and gars conversion types. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026z000000) for valid values and their descriptions. + * @param params.conversionType The conversion type of the input strings. **Possible Values:** mrgs | usng | utm | geo-ref | gars | dms | ddm | dd + * @param params.conversionMode Conversion options for mrgs, utm and gars conversion types. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for valid values and their descriptions. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ @@ -24483,8 +26785,8 @@ declare namespace __esri { * @param params.sr The spatial reference (or WKID of the spatial reference) of the XY-coordinates to be converted. * @param params.coordinates An array of XY-coordinates (in JSON format) to be converted. * @param params.conversionType The conversion type of the input strings. **Possible values:** mgrs | usng | utm | geo-ref | gars | dms | ddm | dd - * @param params.conversionMode Conversion options for mgrs and utm conversion types. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026w000000) for valid conversion modes and their descriptions. - * @param params.numOfDigits The number of digits to output for each of the numerical portions in the string. The default value depends of `conversionType`. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026z000000) for default values. + * @param params.conversionMode Conversion options for mgrs and utm conversion types. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/to-geocoordinatestring.htm) for valid conversion modes and their descriptions. + * @param params.numOfDigits The number of digits to output for each of the numerical portions in the string. The default value depends of `conversionType`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for default values. * @param params.rounding If `true`, then numeric portions of the string are rounded to the nearest whole magnitude as specified by `numOfDigits`. Otherwise, numeric portions of the string are truncated. The rounding parameter applies only to conversion types `mgrs`, `usng` and `geo-ref`. * @param params.addSpaces If `true`, then spaces are added between components of the string. The `addSpaces` parameter applies only to conversion types `mgrs`, `usng` and `utm`. The default value for `mgrs` is `false` , while the default value for both `usng` and `utm` is `true`. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). @@ -24544,7 +26846,7 @@ declare namespace __esri { */ sr: SpatialReference | string; /** - * The converstion type of the input strings. **Possible Values:** mrgs | usng | utm | geo-ref | gars | dms | ddm | dd + * The conversion type of the input strings. **Possible Values:** mrgs | usng | utm | geo-ref | gars | dms | ddm | dd * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#fromGeoCoordinateString) * @@ -24552,7 +26854,7 @@ declare namespace __esri { */ conversionType?: string; /** - * Conversion options for mrgs, utm and gars conversion types. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026z000000) for valid values and their descriptions. + * Conversion options for mrgs, utm and gars conversion types. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for valid values and their descriptions. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#fromGeoCoordinateString) */ @@ -24580,13 +26882,13 @@ declare namespace __esri { */ conversionType: string; /** - * Conversion options for mgrs and utm conversion types. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026w000000) for valid conversion modes and their descriptions. + * Conversion options for mgrs and utm conversion types. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/to-geocoordinatestring.htm) for valid conversion modes and their descriptions. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#toGeoCoordinateString) */ conversionMode?: string; /** - * The number of digits to output for each of the numerical portions in the string. The default value depends of `conversionType`. See the [ArcGIS REST API documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000026z000000) for default values. + * The number of digits to output for each of the numerical portions in the string. The default value depends of `conversionType`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for default values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#toGeoCoordinateString) */ @@ -24847,7 +27149,7 @@ declare namespace __esri { */ countryCode: string; /** - * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address. If `processSpatialReference` is specified and `outSpatialReference` is not specified, the output geometries are in the spatial reference of the process spatial reference. + * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html#outSpatialReference) */ @@ -24879,7 +27181,7 @@ declare namespace __esri { * * @param params Specify at least the address and optionally other properties. See the object specifications table below. * @param params.address visit the ArcGIS Online Geocoding Service help for more details on the World Geocoder. - * The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the *addressFields* of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form: + * The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the *addressFields* of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form: * ```js * { * Street: "1234 W Main St", @@ -24887,14 +27189,16 @@ declare namespace __esri { * State: "WA", * Zone: "99027" * } + * * ``` * * Locators published using ArcGIS 10 or later support a single line address field, which * can be specified using the following syntax where field_name is the name of the single * line address field. You can find this name by viewing the help or services directory for * your locator services. Common values are *SingleLine* and *SingleLineFieldName*: + * * ```js - * var address = { "field_name": "380 New York St, Redlands, CA 92373" }; + * var address = { "field_name": "380 New York St, Redlands, CA 92373" }; * ``` * The Services Directory can be used to find out the required and optional address fields * and the correct names for the input name fields. If you are using the World Geocoding Service @@ -24907,7 +27211,7 @@ declare namespace __esri { * @param params.maxLocations Maximum results to return from the query. * @param params.outFields The list of fields included in the returned result set. This list is a comma delimited list of field names. If you specify the shape field in the list of return fields, it is ignored. For non-intersection addresses you can specify the candidate fields as defined in the geocode service. For intersection addresses you can specify the intersection candidate fields. * @param params.searchExtent Defines the extent within which the geocode server will search. Requires ArcGIS Server version 10.1 or greater. - * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). + * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override `requestOptions` defined during construction). * */ addressToLocations(params: LocatorAddressToLocationsParams, requestOptions?: any): IPromise; @@ -24964,7 +27268,7 @@ declare namespace __esri { */ countryCode?: string; /** - * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address. If `processSpatialReference` is specified and `outSpatialReference` is not specified, the output geometries are in the spatial reference of the process spatial reference. + * The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the default spatial reference returned by the service if finding locations by address. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html#outSpatialReference) */ @@ -25002,7 +27306,7 @@ declare namespace __esri { export interface LocatorAddressToLocationsParams extends Object { /** - * The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the *addressFields* of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form: + * The address argument is data object that contains properties representing the various address fields accepted by the corresponding geocode service. These fields are listed in the addressFields property of the associated geocode service resource. For example, if the *addressFields* of a geocode service resource includes fields with the following names: Street, City, State and Zone, then the address argument is of the form: * ```js * { * Street: "1234 W Main St", @@ -25010,14 +27314,16 @@ declare namespace __esri { * State: "WA", * Zone: "99027" * } + * * ``` * * Locators published using ArcGIS 10 or later support a single line address field, which * can be specified using the following syntax where field_name is the name of the single * line address field. You can find this name by viewing the help or services directory for * your locator services. Common values are *SingleLine* and *SingleLineFieldName*: + * * ```js - * var address = { "field_name": "380 New York St, Redlands, CA 92373" }; + * var address = { "field_name": "380 New York St, Redlands, CA 92373" }; * ``` * The Services Directory can be used to find out the required and optional address fields * and the correct names for the input name fields. If you are using the World Geocoding Service @@ -25168,7 +27474,7 @@ declare namespace __esri { interface PrintTaskConstructor { /** - * The PrintTask generates a printer-ready version of the map using an [Export Web Map Task](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Web_Map_Task/02r3000001m3000000/) available with ArGIS Server 10.1 and later. This class is used when you want to have more granular control over the user interface, for example, if you want to provide users the ability to define what appears on the printed page. + * The PrintTask generates a printer-ready version of the map using an [Export Web Map Task](https://developers.arcgis.com/rest/services-reference/export-web-map-task.htm) available with ArGIS Server 10.1 and later. This class is used when you want to have more granular control over the user interface, for example, if you want to provide users the ability to define what appears on the printed page. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-PrintTask.html) */ @@ -25202,21 +27508,21 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#execute) * - * @param params Specifies the attributes and spatial filter of the query. + * @param query Specifies the attributes and spatial filter of the query. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - execute(params: Query | QueryProperties, requestOptions?: any): IPromise; + execute(query: Query | QueryProperties, requestOptions?: any): IPromise; /** * Gets a count of the number of features that satisfy the input query. Valid only for layers published using ArcGIS Server 10 SP1 or greater. Layers published with earlier versions of ArcGIS Server return an error to the `errback` param of `.then()`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeForCount) * - * @param params Specifies the attributes and spatial filter of the query. + * @param query Specifies the attributes and spatial filter of the query. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - executeForCount(params: Query | QueryProperties, requestOptions?: any): IPromise; + executeForCount(query: Query | QueryProperties, requestOptions?: any): IPromise; /** * Gets the extent of the features that satisfy the input query. The count of features that satisfy the input query is returned upon resolution as well. Valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) on [arcgis.com](http://arcgis.com) and for ArcGIS Server 10.3.1 and later. * @@ -25226,27 +27532,27 @@ declare namespace __esri { * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - executeForExtent(params: Query | QueryProperties, requestOptions?: any): IPromise; + executeForExtent(params: Query, requestOptions?: any): IPromise; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against an ArcGIS Server map layer. The result is an array of the object IDs of features that satisfy the input query. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeForIds) * - * @param params Specifies the attributes and spatial filter of the query. + * @param query Specifies the attributes and spatial filter of the query. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - executeForIds(params: Query | QueryProperties, requestOptions?: any): IPromise; + executeForIds(query: Query | QueryProperties, requestOptions?: any): IPromise; /** * Executes a [RelationshipQuery](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html) against an ArcGIS Server map layer (or table). If the query is successful, the result is returned as a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html), which can be accessed using the `.then()` method. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeRelationshipQuery) * - * @param params Specifies the attributes and spatial filter of the query. + * @param relationshipQuery Specifies the attributes and spatial filter of the query. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - executeRelationshipQuery(params: RelationshipQuery, requestOptions?: any): IPromise; + executeRelationshipQuery(relationshipQuery: RelationshipQuery | RelationshipQueryProperties, requestOptions?: any): IPromise; } interface QueryTaskConstructor { @@ -25438,7 +27744,7 @@ declare namespace __esri { polygons: Polygon[]; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AreasAndLengthsParameters.html#toJSON) * @@ -25534,7 +27840,7 @@ declare namespace __esri { unit: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-BufferParameters.html#toJSON) * @@ -25800,7 +28106,7 @@ declare namespace __esri { */ timeOfDayUsage: string; /** - * Options for traveling to or from the facility. Default values are defined by the newtork layer. See NATravelDirection for a list of valid values. + * Options for traveling to or from the facility. Default values are defined by the network layer. See NATravelDirection for a list of valid values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelDirection) */ @@ -25815,7 +28121,7 @@ declare namespace __esri { useHierarchy: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#toJSON) * @@ -26040,7 +28346,7 @@ declare namespace __esri { */ timeOfDayUsage?: string; /** - * Options for traveling to or from the facility. Default values are defined by the newtork layer. See NATravelDirection for a list of valid values. + * Options for traveling to or from the facility. Default values are defined by the network layer. See NATravelDirection for a list of valid values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelDirection) */ @@ -26273,7 +28579,7 @@ declare namespace __esri { where: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#toJSON) * @@ -26405,7 +28711,7 @@ declare namespace __esri { maxSegmentLength: number; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DensifyParameters.html#toJSON) * @@ -26592,7 +28898,7 @@ declare namespace __esri { geometry2: Geometry[]; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DistanceParameters.html#toJSON) * @@ -26779,7 +29085,7 @@ declare namespace __esri { searchText: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FindParameters.html#toJSON) * @@ -26960,7 +29266,7 @@ declare namespace __esri { maxDeviation: number; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-GeneralizeParameters.html#toJSON) * @@ -27100,6 +29406,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#maxAllowableOffset) */ maxAllowableOffset: number; + /** + * If `true`, field names will be returned instead of field aliases. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnFieldName) + * + * @default false + */ + returnFieldName: boolean; /** * If `true`, the result set includes the geometry associated with each result. * @@ -27108,6 +29422,30 @@ declare namespace __esri { * @default false */ returnGeometry: boolean; + /** + * When `true`, indicates that M values will be returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnM) + * + * @default false + */ + returnM: boolean; + /** + * If `true`, the values in the result will not be formatted i.e. numbers will returned as is and dates will be returned as epoch values. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnUnformattedValues) + * + * @default false + */ + returnUnformattedValues: boolean; + /** + * When `true`, indicates that M values will be returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnZ) + * + * @default false + */ + returnZ: boolean; /** * The spatial reference of the input and output geometries as well as of the [mapExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#mapExtent). If the spatial reference is not specified, the geometry and the extent are assumed to be in the spatial reference of the view, and the output geometries will also be in the spatial reference of the view. * @@ -27130,7 +29468,7 @@ declare namespace __esri { width: number; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#toJSON) * @@ -27209,6 +29547,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#maxAllowableOffset) */ maxAllowableOffset?: number; + /** + * If `true`, field names will be returned instead of field aliases. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnFieldName) + * + * @default false + */ + returnFieldName?: boolean; /** * If `true`, the result set includes the geometry associated with each result. * @@ -27217,6 +29563,30 @@ declare namespace __esri { * @default false */ returnGeometry?: boolean; + /** + * When `true`, indicates that M values will be returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnM) + * + * @default false + */ + returnM?: boolean; + /** + * If `true`, the values in the result will not be formatted i.e. numbers will returned as is and dates will be returned as epoch values. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnUnformattedValues) + * + * @default false + */ + returnUnformattedValues?: boolean; + /** + * When `true`, indicates that M values will be returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnZ) + * + * @default false + */ + returnZ?: boolean; /** * The spatial reference of the input and output geometries as well as of the [mapExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#mapExtent). If the spatial reference is not specified, the geometry and the extent are assumed to be in the spatial reference of the view, and the output geometries will also be in the spatial reference of the view. * @@ -27364,7 +29734,7 @@ declare namespace __esri { returnGeometry: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ImageServiceIdentifyParameters.html#toJSON) * @@ -27678,7 +30048,7 @@ declare namespace __esri { polylines: Polyline[]; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-LengthsParameters.html#toJSON) * @@ -27853,7 +30223,7 @@ declare namespace __esri { offsetUnit: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-OffsetParameters.html#toJSON) * @@ -28073,14 +30443,14 @@ declare namespace __esri { * Value | Description * | --- | --- * map-only | Map does not contain any layout elements. Only map image is printed. - * a3-landscape | 16.54 x 11.69 in - * a3-portrait | 11.69 x 16.54 in - * a4-landscape | 11.69 x 8.27 in - * a4-portrait | 8.27 × 11.69 in - * letter-ansi-a-landscape | 11.0 x 8.5 in - * letter-ansi-a-portrait | 8.5 x 11.0 in - * tabloid-ansi-b-landscape| 17.0 x 11.0 in - * tabloid-ansi-b-portrait | 11.0 x 17.0 in + * a3-landscape | A3 Landscape + * a3-portrait | A3 Portrait + * a4-landscape | A4 Landscape + * a4-portrait | A4 Portrait + * letter-ansi-a-landscape | Letter ANSI A Landscape + * letter-ansi-a-portrait | Letter ANSI A Portrait + * tabloid-ansi-b-landscape| Tabloid ANSI B Landscape + * tabloid-ansi-b-portrait | Tabloid ANSI B Portrait * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintTemplate.html#layout) @@ -28157,14 +30527,14 @@ declare namespace __esri { * Value | Description * | --- | --- * map-only | Map does not contain any layout elements. Only map image is printed. - * a3-landscape | 16.54 x 11.69 in - * a3-portrait | 11.69 x 16.54 in - * a4-landscape | 11.69 x 8.27 in - * a4-portrait | 8.27 × 11.69 in - * letter-ansi-a-landscape | 11.0 x 8.5 in - * letter-ansi-a-portrait | 8.5 x 11.0 in - * tabloid-ansi-b-landscape| 17.0 x 11.0 in - * tabloid-ansi-b-portrait | 11.0 x 17.0 in + * a3-landscape | A3 Landscape + * a3-portrait | A3 Portrait + * a4-landscape | A4 Landscape + * a4-portrait | A4 Portrait + * letter-ansi-a-landscape | Letter ANSI A Landscape + * letter-ansi-a-portrait | Letter ANSI A Portrait + * tabloid-ansi-b-landscape| Tabloid ANSI B Landscape + * tabloid-ansi-b-portrait | Tabloid ANSI B Portrait * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintTemplate.html#layout) @@ -28219,7 +30589,7 @@ declare namespace __esri { */ height?: number; /** - * Resolution in dots per inch. Default value is 96. + * Resolution in dots per inch. If modified when `layout = 'map-only'`, the `width` and `height` will also need to be modified proportional to the `dpi` change. Default value is 96. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintTemplate.html#exportOptions) */ @@ -28288,7 +30658,7 @@ declare namespace __esri { */ outSR: SpatialReference; /** - * The well-known id {wkid:number} or well-known text {wkt:string} of the datum transformation to be applied to the projected geometries. See [Datum transformations](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000r8000000) for a list of valid datum transformations that may be used here. If a transformation is specified, a value must also be specified in the [transformForward](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformForward) property. + * The well-known id {wkid:number} or well-known text {wkt:string} of the datum transformation to be applied to the projected geometries. See [Datum transformations](https://developers.arcgis.com/rest/services-reference/datum-transformations.htm) for a list of valid datum transformations that may be used here. If a transformation is specified, a value must also be specified in the [transformForward](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformForward) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformation) */ @@ -28301,7 +30671,7 @@ declare namespace __esri { transformForward: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#toJSON) * @@ -28338,7 +30708,7 @@ declare namespace __esri { */ outSR?: SpatialReferenceProperties; /** - * The well-known id {wkid:number} or well-known text {wkt:string} of the datum transformation to be applied to the projected geometries. See [Datum transformations](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000r8000000) for a list of valid datum transformations that may be used here. If a transformation is specified, a value must also be specified in the [transformForward](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformForward) property. + * The well-known id {wkid:number} or well-known text {wkt:string} of the datum transformation to be applied to the projected geometries. See [Datum transformations](https://developers.arcgis.com/rest/services-reference/datum-transformations.htm) for a list of valid datum transformations that may be used here. If a transformation is specified, a value must also be specified in the [transformForward](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformForward) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformation) */ @@ -28354,7 +30724,7 @@ declare namespace __esri { export interface ProjectParametersTransformation extends Object { /** - * The well-known ID of the datum transformation to apply to the projection. [List of valid IDs for Datum transformations](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000r8000000). + * The well-known ID of the datum transformation to apply to the projection. [List of valid IDs for Datum transformations](https://developers.arcgis.com/rest/services-reference/datum-transformations.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ProjectParameters.html#transformation) */ @@ -28369,11 +30739,23 @@ declare namespace __esri { interface Query extends Accessor, JSONSupport { /** - * Buffer distance for input geometries. The distance unit is specified by [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units). Query results will include features within the distance specified of the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) of the query. This parameter only applies if [supportsQueryWithDistance](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/) is `true`. + * Datum transformation used for projecting geometries in the query results when [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) is different than the layer's spatial reference. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#datumTransformation) + */ + datumTransformation: number; + /** + * Buffer distance for input geometries. The distance unit is specified by [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units). Query results will include features within the distance specified of the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) of the query. This parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) */ distance: number; + /** + * Specify the geodatabase version to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#gdbVersion) + */ + gdbVersion: string; /** * The geometry to apply to the spatial filter. The spatial relationship as specified by `spatialRelationship` is applied to this geometry while performing the query. The valid geometry types are [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html), [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). * @@ -28392,6 +30774,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#groupByFieldsForStatistics) */ groupByFieldsForStatistics: string[]; + /** + * The historic moment to query. This parameter applies only if the `supportsQueryWithHistoricMoment` property of the layers being queried is set to `true`. This setting is provided in the layer resource. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#historicMoment) + */ + historicMoment: Date; /** * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. * @@ -28405,7 +30793,7 @@ declare namespace __esri { */ multipatchOption: string; /** - * Number of features to retrieve. Should be used in conjunction with [start property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start). Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a start property. + * Number of features to retrieve. Should be used in conjunction with [start property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start). Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a `start` property, then the default value of `num` is 10. If neither `num` nor `start` properties are provided, then the default value of `num` is equal to the **Max Record Count** of the service, which can be found at the REST endpoint of the FeatureLayer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) */ @@ -28440,6 +30828,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) */ outStatistics: StatisticDefinition[]; + /** + * Filters features from the layer based on pre-authored parameterized filters. When value is not specified for any parameter in a request, the default value, that is assigned during authoring time, gets used. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#parameterValues) + */ + parameterValues: QueryParameterValues[]; /** * Specify the pixel level to be identified on the X and Y axis. Defaults to the base resolution of the dataset if not specified. Applicable only to Image Service layers. * @@ -28452,6 +30846,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#quantizationParameters) */ quantizationParameters: QueryQuantizationParameters; + /** + * Filters features from the layer that are within the specified range values. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#rangeValues) + */ + rangeValues: QueryRangeValues[]; /** * The string describes the spatial relationship to be tested when the spatial relationship is `relation`. The [Relational functions for ST_Geometry](https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/relational-functions-for-st-geometry.htm) topic has additional details. * @@ -28527,6 +30927,14 @@ declare namespace __esri { * @default intersects */ spatialRelationship: string; + /** + * This parameter can be either standard SQL92 `standard` or it can use the native SQL of the underlying datastore `native`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-.htm) for more information. **Known Values:** none | standard | native + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#sqlFormat) + * + * @default none + */ + sqlFormat: string; /** * Zero-based index indicating where to begin retrieving features. Should be used in conjunction with [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num). Use this to implement paging and retrieve "pages" of results when querying. Features are sorted ascending by object ID by default. * @@ -28542,7 +30950,7 @@ declare namespace __esri { */ text: string; /** - * The unit for calculating the buffer distance. if unit is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service spatial reference. This parameter only applies if [supportsQueryWithDistance](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/) is `true`. **Known Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * The unit for calculating the buffer distance. if unit is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service spatial reference. This parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. **Known Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units) */ @@ -28580,11 +30988,23 @@ declare namespace __esri { interface QueryProperties { /** - * Buffer distance for input geometries. The distance unit is specified by [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units). Query results will include features within the distance specified of the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) of the query. This parameter only applies if [supportsQueryWithDistance](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/) is `true`. + * Datum transformation used for projecting geometries in the query results when [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) is different than the layer's spatial reference. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#datumTransformation) + */ + datumTransformation?: number; + /** + * Buffer distance for input geometries. The distance unit is specified by [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units). Query results will include features within the distance specified of the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) of the query. This parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) */ distance?: number; + /** + * Specify the geodatabase version to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#gdbVersion) + */ + gdbVersion?: string; /** * The geometry to apply to the spatial filter. The spatial relationship as specified by `spatialRelationship` is applied to this geometry while performing the query. The valid geometry types are [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html), [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). * @@ -28603,6 +31023,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#groupByFieldsForStatistics) */ groupByFieldsForStatistics?: string[]; + /** + * The historic moment to query. This parameter applies only if the `supportsQueryWithHistoricMoment` property of the layers being queried is set to `true`. This setting is provided in the layer resource. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#historicMoment) + */ + historicMoment?: DateProperties; /** * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. * @@ -28616,7 +31042,7 @@ declare namespace __esri { */ multipatchOption?: string; /** - * Number of features to retrieve. Should be used in conjunction with [start property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start). Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a start property. + * Number of features to retrieve. Should be used in conjunction with [start property](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start). Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a `start` property, then the default value of `num` is 10. If neither `num` nor `start` properties are provided, then the default value of `num` is equal to the **Max Record Count** of the service, which can be found at the REST endpoint of the FeatureLayer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) */ @@ -28651,6 +31077,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) */ outStatistics?: StatisticDefinitionProperties[]; + /** + * Filters features from the layer based on pre-authored parameterized filters. When value is not specified for any parameter in a request, the default value, that is assigned during authoring time, gets used. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#parameterValues) + */ + parameterValues?: QueryParameterValues[]; /** * Specify the pixel level to be identified on the X and Y axis. Defaults to the base resolution of the dataset if not specified. Applicable only to Image Service layers. * @@ -28663,6 +31095,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#quantizationParameters) */ quantizationParameters?: QueryQuantizationParameters; + /** + * Filters features from the layer that are within the specified range values. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#rangeValues) + */ + rangeValues?: QueryRangeValues[]; /** * The string describes the spatial relationship to be tested when the spatial relationship is `relation`. The [Relational functions for ST_Geometry](https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/relational-functions-for-st-geometry.htm) topic has additional details. * @@ -28738,6 +31176,14 @@ declare namespace __esri { * @default intersects */ spatialRelationship?: string; + /** + * This parameter can be either standard SQL92 `standard` or it can use the native SQL of the underlying datastore `native`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-.htm) for more information. **Known Values:** none | standard | native + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#sqlFormat) + * + * @default none + */ + sqlFormat?: string; /** * Zero-based index indicating where to begin retrieving features. Should be used in conjunction with [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num). Use this to implement paging and retrieve "pages" of results when querying. Features are sorted ascending by object ID by default. * @@ -28753,7 +31199,7 @@ declare namespace __esri { */ text?: string; /** - * The unit for calculating the buffer distance. if unit is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service spatial reference. This parameter only applies if [supportsQueryWithDistance](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/) is `true`. **Known Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * The unit for calculating the buffer distance. if unit is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service spatial reference. This parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. **Known Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units) */ @@ -28767,6 +31213,22 @@ declare namespace __esri { } + export interface QueryParameterValues extends Object { + /** + * The parameter name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#parameterValues) + */ + name: string; + /** + * Single value or array of values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#parameterValues) + */ + value: string | string[] | number | number[] | Date | Date[]; + } + + export interface QueryQuantizationParameters extends Object { /** * An extent defining the quantization grid bounds. Its [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) matches the input geometry spatial reference if one is specified for the query. Otherwise, the extent will be in the layer's spatial reference. @@ -28796,6 +31258,22 @@ declare namespace __esri { tolerance?: number; } + + export interface QueryRangeValues extends Object { + /** + * The range id. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#rangeValues) + */ + name: string; + /** + * Single value or value range. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#rangeValues) + */ + values: number | number[]; + } + interface RasterData extends Accessor, JSONSupport { /** * Specifies the format of the raster data, such as "jpg", "tif", etc. @@ -28891,7 +31369,7 @@ declare namespace __esri { relationParameter: string; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationParameters.html#toJSON) * @@ -28951,13 +31429,19 @@ declare namespace __esri { relationParameter?: string; } - interface RelationshipQuery extends Accessor { + interface RelationshipQuery extends Accessor, JSONSupport { /** * The definition expression to be applied to the related table or layer. Only records that fit the definition expression and are in the list of `objectIds` will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#definitionExpression) */ definitionExpression: string; + /** + * Specify the geodatabase version to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#gdbVersion) + */ + gdbVersion: string; /** * Specify the number of decimal places for the geometries returned by the query operation. * @@ -28965,19 +31449,25 @@ declare namespace __esri { */ geometryPrecision: number; /** - * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of the `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. + * The historic moment to query. This parameter applies only if the `supportsHistoricMoment` property of the layers being queried is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#historicMoment) + */ + historicMoment: Date; + /** + * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#maxAllowableOffset) */ maxAllowableOffset: number; /** - * A comma delimited list of `ObjectIds` for the features in the layer/table that you want to query. + * A comma delimited list of ObjectIds for the features in the layer/table being queried. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) */ objectIds: number[]; /** - * Attribute fields to include in the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). Fields must exist in the map layer. You must list the actual field names rather than the alias names. Returned fields are also the actual field names. However, you are able to use the alias names when you display the results. You can set field alias names in the map document. When you specify the output fields, you should limit the fields to only those you expect to use in the query or the results. The fewer fields you include, the faster the response will be. Each query must have access to the Shape and ObjectId fields for a layer, but your list of fields does not need to include these two fields. + * Attribute fields to include in the FeatureSet. Fields must exist in the map layer. You must list actual field names rather than the alias names. You are, however, able to use the alias names when you display the results. You can set field alias names in the map document. When specifying the output fields, you should limit the fields to only those you expect to use in the query or the results. The fewer fields you include, the faster the response will be. Each query must have access to the Shape and ObjectId fields for a layer. However, your list of fields does not need to include these two fields. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#outFields) */ @@ -28998,23 +31488,27 @@ declare namespace __esri { * If `true`, each feature in the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) includes the geometry. Set to `false` (default) if you do not plan to include highlighted features on a map since the geometry makes up a significant portion of the response. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#returnGeometry) + * + * @default false */ returnGeometry: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Creates a deep clone of RelationshipQuery object. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#toJSON) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#clone) * * */ - toJSON(): any; + clone(): RelationshipQuery; } interface RelationshipQueryConstructor { new(properties?: RelationshipQueryProperties): RelationshipQuery; + + fromJSON(json: any): RelationshipQuery; } export const RelationshipQuery: RelationshipQueryConstructor; @@ -29026,6 +31520,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#definitionExpression) */ definitionExpression?: string; + /** + * Specify the geodatabase version to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#gdbVersion) + */ + gdbVersion?: string; /** * Specify the number of decimal places for the geometries returned by the query operation. * @@ -29033,19 +31533,25 @@ declare namespace __esri { */ geometryPrecision?: number; /** - * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of the `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. + * The historic moment to query. This parameter applies only if the `supportsHistoricMoment` property of the layers being queried is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#historicMoment) + */ + historicMoment?: DateProperties; + /** + * The maximum allowable offset used for generalizing geometries returned by the query operation. The offset is in the units of `outSpatialReference`. If `outSpatialReference` is not defined, the spatial reference of the map is used. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#maxAllowableOffset) */ maxAllowableOffset?: number; /** - * A comma delimited list of `ObjectIds` for the features in the layer/table that you want to query. + * A comma delimited list of ObjectIds for the features in the layer/table being queried. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) */ objectIds?: number[]; /** - * Attribute fields to include in the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). Fields must exist in the map layer. You must list the actual field names rather than the alias names. Returned fields are also the actual field names. However, you are able to use the alias names when you display the results. You can set field alias names in the map document. When you specify the output fields, you should limit the fields to only those you expect to use in the query or the results. The fewer fields you include, the faster the response will be. Each query must have access to the Shape and ObjectId fields for a layer, but your list of fields does not need to include these two fields. + * Attribute fields to include in the FeatureSet. Fields must exist in the map layer. You must list actual field names rather than the alias names. You are, however, able to use the alias names when you display the results. You can set field alias names in the map document. When specifying the output fields, you should limit the fields to only those you expect to use in the query or the results. The fewer fields you include, the faster the response will be. Each query must have access to the Shape and ObjectId fields for a layer. However, your list of fields does not need to include these two fields. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#outFields) */ @@ -29066,6 +31572,8 @@ declare namespace __esri { * If `true`, each feature in the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) includes the geometry. Set to `false` (default) if you do not plan to include highlighted features on a map since the geometry makes up a significant portion of the response. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#returnGeometry) + * + * @default false */ returnGeometry?: boolean; } @@ -29305,7 +31813,7 @@ declare namespace __esri { useTimeWindows: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#toJSON) * @@ -29720,7 +32228,7 @@ declare namespace __esri { * none | No lines are returned * straight | Only returns straight lines * true-shape | Return the true shape of the lines - * true-shape-with-measure | Return the true shape of the lines with their measurments + * true-shape-with-measure | Return the true shape of the lines with their measurements * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines) @@ -29886,7 +32394,7 @@ declare namespace __esri { useHierarchy: boolean; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#toJSON) * @@ -29980,7 +32488,7 @@ declare namespace __esri { * none | No lines are returned * straight | Only returns straight lines * true-shape | Return the true shape of the lines - * true-shape-with-measure | Return the true shape of the lines with their measurments + * true-shape-with-measure | Return the true shape of the lines with their measurements * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines) @@ -30335,7 +32843,7 @@ declare namespace __esri { trimExtendTo: Polyline; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-TrimExtendParameters.html#toJSON) * @@ -31525,7 +34033,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#createJobs) * - * @param params The parameters to be used for job creation, parameters defined in the job type can be overritten. The jobTypeId and user are required parameters when creating a job. + * @param params The parameters to be used for job creation, parameters defined in the job type can be overwritten. The jobTypeId and user are required parameters when creating a job. * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ @@ -31894,7 +34402,7 @@ declare namespace __esri { */ message: string; /** - * The name of the activity that occured. + * The name of the activity that occurred. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#ActivityType) */ @@ -32220,7 +34728,7 @@ declare namespace __esri { */ parentJobId: number; /** - * The name of the geodatabase version that will be the parent version of the new job's version. By default it'll be the parent version of the data workspace. + * The name of the geodatabase version that will be the parent version of the new job's version. By default it will be the parent version of the data workspace. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#JobCreationParameters) */ @@ -32392,7 +34900,7 @@ declare namespace __esri { */ parentJobId: number; /** - * The name of the geodatabase version that is the parent version of the job's version. By default it'll be the parent version of the data workspace. + * The name of the geodatabase version that is the parent version of the job's version. By default it will be the parent version of the data workspace. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#JobInfo) */ @@ -33110,7 +35618,7 @@ declare namespace __esri { */ parentJobId: number; /** - * The name of the geodatabase version that will be the parent version of the new job's version. By default it'll be the parent version of the data workspace. + * The name of the geodatabase version that will be the parent version of the new job's version. By default it will be the parent version of the data workspace. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-JobTask.html#JobUpdateParameters) */ @@ -33524,7 +36032,7 @@ declare namespace __esri { */ export interface ChangeRuleMatch extends Object { /** - * The time the change occured to the data. + * The time the change occurred to the data. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-NotificationTask.html#ChangeRuleMatch) */ @@ -34520,7 +37028,7 @@ declare namespace __esri { } /** - * Step retpresents the properties of a step that is used in a job's workflow. + * Step represents the properties of a step that is used in a job's workflow. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-WorkflowTask.html#Step) */ @@ -34838,7 +37346,7 @@ declare namespace __esri { } /** - * WorkflowPathDisplayDetails represents properties of a workflow's path properties like location, destination steps, postion on the workflow canvas. + * WorkflowPathDisplayDetails represents properties of a workflow's path properties like location, destination steps, position on the workflow canvas. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-workflow-WorkflowTask.html#WorkflowPathDisplayDetails) */ @@ -34890,7 +37398,7 @@ declare namespace __esri { * * Name | Type | Description * ---------|--------|------------- - * isDefault | Boolean | Indicates whehter this is the default path(only path) from the source step. + * isDefault | Boolean | Indicates whether this is the default path(only path) from the source step. * numReturnValues | Number[] | The number of possible return values for the path. * returnValueX | Number[] | The return values associated with the path. * @@ -35297,11 +37805,11 @@ declare namespace __esri { interface Draw extends Accessor { /** - * A reference to the active draw action. An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. + * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#activeAction) */ - activeAction: PointDrawAction | MultipointDrawAction | PolygonDrawAction | PolylineDrawAction; + activeAction: DrawAction; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. * @@ -35309,15 +37817,41 @@ declare namespace __esri { */ view: MapView; + /** + * Complete the current active drawing. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#complete) + * + * + */ + complete(): void; /** * Creates an instance of the requested draw action. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) * - * @param drawAction Name of the draw action to create. See the table below for a list of known values and type of draw action it creates. **Known Values:** point | multipoint | polyline | polygon + * @param drawAction + * Name of the [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html) to create. See the table below for a list of known values and type of draw action it creates. **Known Values:** point | multipoint | polyline | polygon | rectangle | circle | ellipse + * + * Geometry type | Draw action instance + * ------------- | -------------------- + * point | [PointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html) + * multipoint | [MultipointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html) + * polyline | [PolylineDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html) + * polygon | [PolygonDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html) + * rectangle, circle, ellipse | [SegmentDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html) + * @param drawOptions Object of the drawing options for the geometry to be created. + * @param drawOptions.mode + * The drawing mode. The drawing mode only applies when creating `polygon` and `polyline` geometries. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. * */ - create(drawAction: string): PointDrawAction | MultipointDrawAction | PolylineDrawAction | PolygonDrawAction; + create(drawAction: string, drawOptions: DrawCreateDrawOptions): DrawAction; /** * Resets the drawing by clearing the active action. * @@ -35342,11 +37876,11 @@ declare namespace __esri { interface DrawProperties { /** - * A reference to the active draw action. An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. + * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#activeAction) */ - activeAction?: PointDrawActionProperties | MultipointDrawActionProperties | PolygonDrawActionProperties | PolylineDrawActionProperties; + activeAction?: DrawActionProperties; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. * @@ -35355,36 +37889,96 @@ declare namespace __esri { view?: MapViewProperties; } - interface MultipointDrawAction extends Accessor, Evented { + + export interface DrawCreateDrawOptions extends Object { + /** + * The drawing mode. The drawing mode only applies when creating `polygon` and `polyline` geometries. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) + * + * @default hybrid + */ + mode?: string; + } + + interface DrawAction extends Accessor, Evented { + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#view) + */ + view: MapView; + + /** + * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#redo) method can be called on the action instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canRedo) + * + * + */ + canRedo(): boolean; + /** + * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#undo) method can be called on the action instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canUndo) + * + * + */ + canUndo(): boolean; + /** + * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-remove) events depending on the last action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#redo) + * + * + */ + redo(): void; + /** + * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-remove) events depending on the last action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#undo) + * + * + */ + undo(): void; + } + + interface DrawActionConstructor { + /** + * DrawAction is the base class for all draw actions. DrawActions use the view events to generate a set of coordinates to create new geometries. Each serves a different purpose, allowing you to create a different type geometry such as [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), and [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html) + */ + + new(properties?: DrawActionProperties): DrawAction; + } + + export const DrawAction: DrawActionConstructor; + + interface DrawActionProperties { + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#view) + */ + view?: MapViewProperties; + } + + interface MultipointDrawAction extends DrawAction { /** * Two-dimensional array of numbers representing the coordinates of each vertex that comprises the drawn geometry. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#vertices) */ readonly vertices: number[][]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#view) - */ - view: MapView; - /** - * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#redo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#canRedo) - * - * - */ - canRedo(): boolean; - /** - * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#undo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#canUndo) - * - * - */ - canUndo(): boolean; /** * Completes drawing the [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. * @@ -35393,39 +37987,19 @@ declare namespace __esri { * */ complete(): void; - /** - * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:vertex-remove) event depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#redo) - * - * - */ - redo(): void; - /** - * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:vertex-remove) event depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#undo) - * - * - */ - undo(): void; on(name: "cursor-update", eventHandler: MultipointDrawActionCursorUpdateEventHandler): IHandle; - on(name: "cursor-update", modifiers: string[], eventHandler: MultipointDrawActionCursorUpdateEventHandler): IHandle; - on(name: "vertex-add", eventHandler: MultipointDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-add", modifiers: string[], eventHandler: MultipointDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-remove", eventHandler: MultipointDrawActionVertexRemoveEventHandler): IHandle; - on(name: "vertex-remove", modifiers: string[], eventHandler: MultipointDrawActionVertexRemoveEventHandler): IHandle; - on(name: "draw-complete", eventHandler: MultipointDrawActionDrawCompleteEventHandler): IHandle; - on(name: "draw-complete", modifiers: string[], eventHandler: MultipointDrawActionDrawCompleteEventHandler): IHandle; + on(name: "undo", eventHandler: MultipointDrawActionUndoEventHandler): IHandle; + + on(name: "redo", eventHandler: MultipointDrawActionRedoEventHandler): IHandle; } interface MultipointDrawActionConstructor { @@ -35436,13 +38010,8 @@ declare namespace __esri { export const MultipointDrawAction: MultipointDrawActionConstructor; - interface MultipointDrawActionProperties { - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#view) - */ - view?: MapViewProperties; + interface MultipointDrawActionProperties extends DrawActionProperties { + } export interface MultipointDrawActionCursorUpdateEvent { @@ -35469,6 +38038,32 @@ declare namespace __esri { vertices: number[][]; } + export interface MultipointDrawActionRedoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + + export interface MultipointDrawActionUndoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + export interface MultipointDrawActionVertexAddEvent { defaultPrevented: boolean; @@ -35495,19 +38090,13 @@ declare namespace __esri { vertices: number[][]; } - interface PointDrawAction extends Accessor, Evented { + interface PointDrawAction extends DrawAction { /** * An array of x,y coordinates for the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#coordinates) */ - coordinates: number[]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#view) - */ - view: MapView; + readonly coordinates: number[]; /** * Completes drawing the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. @@ -35521,11 +38110,7 @@ declare namespace __esri { on(name: "cursor-update", eventHandler: PointDrawActionCursorUpdateEventHandler): IHandle; - on(name: "cursor-update", modifiers: string[], eventHandler: PointDrawActionCursorUpdateEventHandler): IHandle; - on(name: "draw-complete", eventHandler: PointDrawActionDrawCompleteEventHandler): IHandle; - - on(name: "draw-complete", modifiers: string[], eventHandler: PointDrawActionDrawCompleteEventHandler): IHandle; } interface PointDrawActionConstructor { @@ -35536,19 +38121,8 @@ declare namespace __esri { export const PointDrawAction: PointDrawActionConstructor; - interface PointDrawActionProperties { - /** - * An array of x,y coordinates for the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#coordinates) - */ - coordinates?: number[]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#view) - */ - view?: MapViewProperties; + interface PointDrawActionProperties extends DrawActionProperties { + } export interface PointDrawActionCursorUpdateEvent { @@ -35573,36 +38147,29 @@ declare namespace __esri { type: string; } - interface PolygonDrawAction extends Accessor, Evented { + interface PolygonDrawAction extends DrawAction { + /** + * The drawing mode. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#mode) + * + * @default hybrid + */ + mode: string; /** * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#vertices) */ readonly vertices: number[][]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#view) - */ - view: MapView; - /** - * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#redo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#canRedo) - * - * - */ - canRedo(): boolean; - /** - * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#undo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#canUndo) - * - * - */ - canUndo(): boolean; /** * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. * @@ -35611,39 +38178,19 @@ declare namespace __esri { * */ complete(): void; - /** - * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:vertex-remove) events depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#redo) - * - * - */ - redo(): void; - /** - * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:vertex-remove) events depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#undo) - * - * - */ - undo(): void; on(name: "cursor-update", eventHandler: PolygonDrawActionCursorUpdateEventHandler): IHandle; - on(name: "cursor-update", modifiers: string[], eventHandler: PolygonDrawActionCursorUpdateEventHandler): IHandle; - on(name: "vertex-add", eventHandler: PolygonDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-add", modifiers: string[], eventHandler: PolygonDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-remove", eventHandler: PolygonDrawActionVertexRemoveEventHandler): IHandle; - on(name: "vertex-remove", modifiers: string[], eventHandler: PolygonDrawActionVertexRemoveEventHandler): IHandle; - on(name: "draw-complete", eventHandler: PolygonDrawActionDrawCompleteEventHandler): IHandle; - on(name: "draw-complete", modifiers: string[], eventHandler: PolygonDrawActionDrawCompleteEventHandler): IHandle; + on(name: "undo", eventHandler: PolygonDrawActionUndoEventHandler): IHandle; + + on(name: "redo", eventHandler: PolygonDrawActionRedoEventHandler): IHandle; } interface PolygonDrawActionConstructor { @@ -35654,13 +38201,22 @@ declare namespace __esri { export const PolygonDrawAction: PolygonDrawActionConstructor; - interface PolygonDrawActionProperties { + interface PolygonDrawActionProperties extends DrawActionProperties { /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * The drawing mode. **Known Values:** * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#view) + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#mode) + * + * @default hybrid */ - view?: MapViewProperties; + mode?: string; } export interface PolygonDrawActionCursorUpdateEvent { @@ -35687,6 +38243,32 @@ declare namespace __esri { vertices: number[][]; } + export interface PolygonDrawActionRedoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + + export interface PolygonDrawActionUndoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + export interface PolygonDrawActionVertexAddEvent { defaultPrevented: boolean; @@ -35713,36 +38295,29 @@ declare namespace __esri { vertices: number[][]; } - interface PolylineDrawAction extends Accessor, Evented { + interface PolylineDrawAction extends DrawAction { + /** + * The drawing mode. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#mode) + * + * @default hybrid + */ + mode: string; /** * Two-dimensional array of numbers representing the coordinates of each vertex that comprising the drawn geometry. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#vertices) */ readonly vertices: number[][]; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#view) - */ - view: MapView; - /** - * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#redo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#canRedo) - * - * - */ - canRedo(): boolean; - /** - * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#undo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#canUndo) - * - * - */ - canUndo(): boolean; /** * Completes drawing the polyline geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. * @@ -35751,39 +38326,19 @@ declare namespace __esri { * */ complete(): void; - /** - * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:vertex-remove) event depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#redo) - * - * - */ - redo(): void; - /** - * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:vertex-remove) event depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#undo) - * - * - */ - undo(): void; on(name: "cursor-update", eventHandler: PolylineDrawActionCursorUpdateEventHandler): IHandle; - on(name: "cursor-update", modifiers: string[], eventHandler: PolylineDrawActionCursorUpdateEventHandler): IHandle; - on(name: "vertex-add", eventHandler: PolylineDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-add", modifiers: string[], eventHandler: PolylineDrawActionVertexAddEventHandler): IHandle; - on(name: "vertex-remove", eventHandler: PolylineDrawActionVertexRemoveEventHandler): IHandle; - on(name: "vertex-remove", modifiers: string[], eventHandler: PolylineDrawActionVertexRemoveEventHandler): IHandle; - on(name: "draw-complete", eventHandler: PolylineDrawActionDrawCompleteEventHandler): IHandle; - on(name: "draw-complete", modifiers: string[], eventHandler: PolylineDrawActionDrawCompleteEventHandler): IHandle; + on(name: "undo", eventHandler: PolylineDrawActionUndoEventHandler): IHandle; + + on(name: "redo", eventHandler: PolylineDrawActionRedoEventHandler): IHandle; } interface PolylineDrawActionConstructor { @@ -35794,13 +38349,22 @@ declare namespace __esri { export const PolylineDrawAction: PolylineDrawActionConstructor; - interface PolylineDrawActionProperties { + interface PolylineDrawActionProperties extends DrawActionProperties { /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * The drawing mode. **Known Values:** * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#view) + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#mode) + * + * @default hybrid */ - view?: MapViewProperties; + mode?: string; } export interface PolylineDrawActionCursorUpdateEvent { @@ -35827,6 +38391,32 @@ declare namespace __esri { vertices: number[][]; } + export interface PolylineDrawActionRedoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + + export interface PolylineDrawActionUndoEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + export interface PolylineDrawActionVertexAddEvent { defaultPrevented: boolean; @@ -35853,6 +38443,80 @@ declare namespace __esri { vertices: number[][]; } + interface SegmentDrawAction extends DrawAction { + /** + * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#complete) + * + * + */ + complete(): void; + + + on(name: "cursor-update", eventHandler: SegmentDrawActionCursorUpdateEventHandler): IHandle; + + on(name: "draw-complete", eventHandler: SegmentDrawActionDrawCompleteEventHandler): IHandle; + + on(name: "vertex-add", eventHandler: SegmentDrawActionVertexAddEventHandler): IHandle; + } + + interface SegmentDrawActionConstructor { + + + new(properties?: SegmentDrawActionProperties): SegmentDrawAction; + } + + export const SegmentDrawAction: SegmentDrawActionConstructor; + + interface SegmentDrawActionProperties extends DrawActionProperties { + + } + + export interface SegmentDrawActionCursorUpdateEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + + export interface SegmentDrawActionDrawCompleteEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertices: number[][]; + } + + export interface SegmentDrawActionVertexAddEvent { + + defaultPrevented: boolean; + + preventDefault: Function; + + type: string; + + vertexIndex: number; + + vertices: number[][]; + } + /** * map/scene on screen. The ArcGIS API for JavaScript offers a low-level interface to access the SceneView's WebGL context, and thus enables creating custom visualizations that interact with the scene the same way as built-in layers. Developers can either write WebGL code directly, or integrate with third-party WebGL libraries. * @@ -35966,7 +38630,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#ColorAndIntensity) */ - color: any; + color: ArrayLike; /** * Scalar intensity value by which the color should be scaled for compositing. * @@ -35985,26 +38649,20 @@ declare namespace __esri { * Typically called once after adding the external renderer to a view, or whenever the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) becomes [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ready). It may be called again if the ready state cycles, for example when a different [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) is assigned to the view. Receives a single parameter of type [RenderContext](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderContext). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#ExternalRenderer) - * - * */ - setup(): void; + setup?: RenderContextCallback; /** * Called in every frame to execute the state update and draw calls. Receives a single parameter of type [RenderContext](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderContext). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#ExternalRenderer) - * - * */ - render(): void; + render?: RenderContextCallback; /** * Called when the external renderer is removed from a view, or when the [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ready) state of the view turns false. Receives a single parameter of type [RenderContext](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderContext). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#ExternalRenderer) - * - * */ - dispose(): void; + dispose?: RenderContextCallback; } /** @@ -36018,37 +38676,37 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - viewMatrix: any; + viewMatrix: ArrayLike; /** * The inverse transpose of `viewMatrix`, used to transform normals from world space to camera space. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - viewInverseTransposeMatrix: any; + viewInverseTransposeMatrix: ArrayLike; /** * A 4x4 matrix that defines the perspective projection transformation. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - projectionMatrix: any; + projectionMatrix: ArrayLike; /** * The position of the camera in the internal Cartesian rendering coordinate system. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - eye: any; + eye: ArrayLike; /** * The camera target ("look at") position in the internal Cartesian rendering coordinate system. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - center: any; + center: ArrayLike; /** * The camera up vector. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderCamera) */ - up: any; + up: ArrayLike; /** * The distance to the near plane. * @@ -36086,7 +38744,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#RenderContext) */ - gl: any; + gl: WebGLRenderingContext; /** * The camera used to render the current frame. * @@ -36118,6 +38776,8 @@ declare namespace __esri { bindRenderTarget(): void; } + export type RenderContextCallback = (context: RenderContext) => void; + /** * Describes the lighting used by [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), derived from its sun lighting model. It consists of a directional Lambertian (`diffuse`) and a constant (`ambient`) term, which should be treated in the sense of the [Phong Reflection Model](https://en.wikipedia.org/wiki/Phong_reflection_model). * @@ -36129,7 +38789,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-externalRenderers.html#SunLight) */ - direction: any; + direction: ArrayLike; /** * The diffuse light color and intensity. * @@ -36146,22 +38806,23 @@ declare namespace __esri { interface BreakpointsOwner { /** - * A convenience property used for defining the breakpoints on the [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) and [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view. The sizes specified here determine the values of the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties depending on the view's size. Setting up breakpoints can aid in responsive app design. It does this by watching width and height breakpoints. This is helpful as it removes the need for multiple [`@media` calls](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). Instead of listening for the view's size and/or resizes property, you can set up a watch handler for either the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties of the view. + * A convenience property used for defining the breakpoints on the [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) and [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view. The sizes specified here determine the values of the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties depending on the view's size. Setting up breakpoints can aid in responsive app design. It does this by watching width and height breakpoints. This is helpful as it removes the need for multiple [`@media` calls](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). Instead of listening for the view's size and/or resizes property, you can set up a watch handler for either the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties of the view. + * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) */ breakpoints: BreakpointsOwnerBreakpoints; /** - * A convenience property indicating the general size of the view's height. This value is determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. + * A convenience property indicating the general size of the view's height. This value is determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property to override the default thresholds. * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * - * Possible Value | Description - * ---------------|------------ - * xsmall | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * small | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * medium | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * large | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * xlarge | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). + * Possible Value | Description | Default thresholds (pixels) + * ---------------|-------------|---------------------------- + * xsmall | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | < 545 + * small | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 545 - 768 + * medium | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 769 - 992 + * large | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 993 - 1200 + * xlarge | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | > 1200 * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) @@ -36181,16 +38842,16 @@ declare namespace __esri { */ readonly orientation: string; /** - * A convenience property indicating the general size of the view's width. This value is determined based on where the view's [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. + * A convenience property indicating the general size of the view's width. This value is determined based on where the view's [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property to override the default thresholds. * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * - * Possible Value | Description - * ---------------|------------ - * xsmall | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * small | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * medium | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * large | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * xlarge | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). + * Possible Value | Description | Default thresholds (pixels) + * ---------------|-------------|------------------- + * xsmall | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | < 545 + * small | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 545 - 768 + * medium | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 769 - 992 + * large | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 993 - 1200 + * xlarge | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | > 1200 * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) @@ -36208,38 +38869,39 @@ declare namespace __esri { interface BreakpointsOwnerProperties { /** - * A convenience property used for defining the breakpoints on the [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) and [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view. The sizes specified here determine the values of the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties depending on the view's size. Setting up breakpoints can aid in responsive app design. It does this by watching width and height breakpoints. This is helpful as it removes the need for multiple [`@media` calls](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). Instead of listening for the view's size and/or resizes property, you can set up a watch handler for either the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties of the view. + * A convenience property used for defining the breakpoints on the [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) and [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view. The sizes specified here determine the values of the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties depending on the view's size. Setting up breakpoints can aid in responsive app design. It does this by watching width and height breakpoints. This is helpful as it removes the need for multiple [`@media` calls](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). Instead of listening for the view's size and/or resizes property, you can set up a watch handler for either the [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) properties of the view. + * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) */ breakpoints?: BreakpointsOwnerBreakpoints; /** - * A convenience property indicating the general size of the view's height. This value is determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. + * A convenience property indicating the general size of the view's height. This value is determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property to override the default thresholds. * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * - * Possible Value | Description - * ---------------|------------ - * xsmall | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * small | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * medium | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * large | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * xlarge | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). + * Possible Value | Description | Default thresholds (pixels) + * ---------------|-------------|---------------------------- + * xsmall | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | < 545 + * small | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 545 - 768 + * medium | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 769 - 992 + * large | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 993 - 1200 + * xlarge | The [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | > 1200 * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) */ heightBreakpoint?: string; /** - * A convenience property indicating the general size of the view's width. This value is determined based on where the view's [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. + * A convenience property indicating the general size of the view's width. This value is determined based on where the view's [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) falls in the ranges defined in the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property. See the table below for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) property to override the default thresholds. * > Please refer to the [styling guide](https://developers.arcgis.com/javascript/latest/guide/styling/index.html#view-size-css-classes) for additional information on working with this. * - * Possible Value | Description - * ---------------|------------ - * xsmall | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * small | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * medium | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * large | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). - * xlarge | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). + * Possible Value | Description | Default thresholds (pixels) + * ---------------|-------------|------------------- + * xsmall | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is smaller than the value set in the `xsmall` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | < 545 + * small | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `xsmall` and `small` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 545 - 768 + * medium | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `small` and `medium` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 769 - 992 + * large | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is between the values set in the `medium` and `large` [breakpoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | 993 - 1200 + * xlarge | The [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) of the view is larger than the value set in the `large` [breakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints). | > 1200 * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) @@ -36281,6 +38943,12 @@ declare namespace __esri { * @default 1200 */ large?: number; + /** + * Sets the `xlarge` breakpoint in pixels used by [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) and [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint). If the view's [height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#height) or [width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#width) is greater than the value of the `large` property, then the value of [widthBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#widthBreakpoint) or [heightBreakpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#heightBreakpoint) will be `xlarge`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-BreakpointsOwner.html#breakpoints) + */ + xlarge?: number; } interface DOMContainer { @@ -36289,7 +38957,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-DOMContainer.html#container) */ - container: HTMLDivElement | string; + container: HTMLDivElement; + /** + * Indicates if the browser focus is on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-DOMContainer.html#focused) + */ + readonly focused: boolean; /** * The height of the view in pixels read from the view container element. The view container needs to have a height greater than 0 to be displayed. * @@ -36371,53 +39045,112 @@ declare namespace __esri { ui?: DefaultUIProperties; } + interface GroundView extends Accessor { + /** + * An elevation sampler that may be used to sample and query elevation values from the ground surface that is currently being displayed. The elevation sampler is not supported for [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and may be `null` while the ground surface display is being initialized. The resolution of the sampled values depends on the ground elevation display resolution (high resolution close to the camera, low resolution far away from the camera). Because of the dynamic nature of the display resolution, the [demResolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#demResolution) property of the returned sampler will always return `{ min: -1, max: -1 }. If higher or more consistent sample resolution is required, then consider creating a sampler at the desired resolution using ElevationLayer.createSampler or Ground.createSampler. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html#elevationSampler) + */ + readonly elevationSampler: ElevationSampler; + /** + * A collection containing a hierarchical list of all the created [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of the [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#layers) in the ground. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html#layerViews) + */ + readonly layerViews: Collection; + /** + * Value is `true` when any of the ground layer views are updating. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html#updating) + * + * @default false + */ + readonly updating: boolean; + } + + interface GroundViewConstructor { + + + new(properties?: GroundViewProperties): GroundView; + } + + export const GroundView: GroundViewConstructor; + + interface GroundViewProperties { + + } + interface CSVLayerView extends LayerView { /** * Highlights the given feature(s). - * > **Known Limitations** Currently the highlight method is only supported in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** In 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) this method is only supported for [CSVLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) that have opted in to [WebGL rendering](esri-layers-FeatureLayer.html#webgl-rendering). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#highlight) * - * @param target The feature(s) to highlight. + * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): any; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * Polyline, and Point geometries are not supported in the `geometry` query parameter. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryExtent) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the extent and count of all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryExtent(params?: Query): IPromise; + queryExtent(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * Polyline, and Point geometries are not supported in the `geometry` query parameter. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryFeatureCount) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the count of all features available for drawing is returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryFeatureCount(params?: Query): IPromise; + queryFeatureCount(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns an array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). If query parameters are not provided, all features available for drawing are returned. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns an array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). If query parameters are not provided, all features available for drawing are returned. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * Polyline, and Point geometries are not supported in the `geometry` query parameter. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryFeatures) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If specifying a [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) parameter, note that [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) is the only supported geometry. If query parameters are not provided, all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryFeatures(params?: Query): IPromise; + queryFeatures(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * Polyline, and Point geometries are not supported in the `geometry` query parameter. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryObjectIds) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryObjectIds(params?: Query): IPromise; + queryObjectIds(params?: Query | QueryProperties): IPromise; } interface CSVLayerViewConstructor { @@ -36444,45 +39177,77 @@ declare namespace __esri { */ highlight(target?: Graphic | Graphic[] | number | number[]): any; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. Valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) on [arcgis.com](http://arcgis.com) and for ArcGIS Server 10.3.1 and later. If query parameters are not provided, the extent and count of all features available for drawing are returned. - * > To query for the extent of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryExtent) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. Valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) on [arcgis.com](http://arcgis.com) and for ArcGIS Server 10.3.1 and later. If query parameters are not provided, the extent and count of all features available for drawing are returned. To query for the extent of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryExtent) method. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * For spatial queries: + * * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'` can be used to query against layers of any geometry type. + * * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries with `spatialRelationship = 'intersects'` can only be used to query against point layers. + * * Polyline, and Point geometries are not supported. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param) + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryExtent) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the extent and count of all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryExtent(params?: Query): IPromise; + queryExtent(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. - * > To query for the count of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureCount) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. To query for the count of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureCount) method. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * For spatial queries: + * * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'` can be used to query against layers of any geometry type. + * * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries with `spatialRelationship = 'intersects'` can only be used to query against point layers. + * * Polyline, and Point geometries are not supported. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param) + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatureCount) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the count of all features available for drawing is returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryFeatureCount(params?: Query): IPromise; + queryFeatureCount(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns an array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). If query parameters are not provided, all features available for drawing are returned. - * > To execute a query against all the features in a Feature Service rather than only those visible in the view, you must use the [FeatureLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns an array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). If query parameters are not provided, all features available for drawing are returned. To execute a query against all the features in a Feature Service rather than only those in the client, you must use the [FeatureLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) method. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * For spatial queries: + * * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'` can be used to query against layers of any geometry type. + * * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries with `spatialRelationship = 'intersects'` can only be used to query against point layers. + * * Polyline, and Point geometries are not supported. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If specifying a [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) parameter, note that [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) is the only supported geometry. If query parameters are not provided, all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryFeatures(params?: Query): IPromise; + queryFeatures(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. - * > To query for ObjectIDs of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryObjectIds()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryObjectIds) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. To query for ObjectIDs of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryObjectIds()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryObjectIds) method. + * > **Known Limitations** **3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) limitations** Queries with `outStatistics` and any other parameter involving statistics are not supported. **SVG limitations (default)** Only the `geometry` , `objectIds`, and `spatialRelationship` properties are supported in the query object. Spatial queries only support [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'`. **WebGL limitations** + * * For spatial queries: + * * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) geometries with `spatialRelationship = 'intersects'` can be used to query against layers of any geometry type. + * * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries with `spatialRelationship = 'intersects'` can only be used to query against point layers. + * * Polyline, and Point geometries are not supported. + * * SQL expressions cannot be used in `outFields` nor `onStatisticField` (in the `outStatistics` param). + * * The following Query parameters are currently not supported: + * * `orderByField` + * * `distance` and `units` * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryObjectIds) * - * @param params Specifies the attributes and spatial filter of the query. Only the [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) properties should be specified. Adding any other properties will return an error. If specifying a spatialRelationship, note that `intersects` is the only supported operation. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ - queryObjectIds(params?: Query): IPromise; + queryObjectIds(params?: Query | QueryProperties): IPromise; } interface FeatureLayerViewConstructor { @@ -36721,7 +39486,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryExtent) * - * @param params Specifies the attributes of the query. Only the [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) property should be specified. Adding any other properties will return an error. If query parameters are not provided, the extent and count of all loaded features are returned. + * @param params Specifies the attributes of the query. Only the[objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) and [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. * */ queryExtent(params?: Query): IPromise; @@ -36731,17 +39496,17 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatureCount) * - * @param params Specifies the attributes of the query. Only the [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) property should be specified. Adding any other properties will return an error. If query parameters are not provided, the count of all loaded features is returned. + * @param params Specifies the attributes of the query. Only the[objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) and [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. * */ queryFeatureCount(params?: Query): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. Querying more than 10.000 features returns an error, unless num is specified in the Query. * > To execute a query against all the features in a Scene Service rather than only those loaded for the current view, you must use the [SceneLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryFeatures) method. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatures) * - * @param params Specifies the attributes of the query. Only the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields) and [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. + * @param params Specifies the attributes of the query. Only the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields), [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) and [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. * */ queryFeatures(params?: Query): IPromise; @@ -36751,7 +39516,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryObjectIds) * - * @param params Specifies the attributes of the query. Only the [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) property should be specified. Adding any other properties will return an error. If query parameters are not provided, the ObjectIDs of all loaded features are returned. + * @param params Specifies the attributes of the query. Only the[objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds), [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num) and [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) properties should be specified. Adding any other properties will return an error. If query parameters are not provided, all loaded features are returned. * */ queryObjectIds(params?: Query): IPromise; @@ -36829,8 +39594,6 @@ declare namespace __esri { on(name: "data-received", eventHandler: StreamLayerViewDataReceivedEventHandler): IHandle; - - on(name: "data-received", modifiers: string[], eventHandler: StreamLayerViewDataReceivedEventHandler): IHandle; } interface StreamLayerViewConstructor { @@ -36912,7 +39675,7 @@ declare namespace __esri { extent: Extent; /** * Options for configuring the highlight. Use the highlight method on the appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature. - * > **Known Limitations** Only [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) renderered with [WebGL](esri-layers-FeatureLayer.html#webgl-rendering) support highlight. See [FeatureLayerView.highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) for details of how to highlight features. + * > **Known Limitations** Only [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) rendered with [WebGL](esri-layers-FeatureLayer.html#webgl-rendering) support highlight. See [FeatureLayerView.highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) for details of how to highlight features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#highlightOptions) */ @@ -36990,10 +39753,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hasEventListener) * - * @param type The name of the event. * */ - hasEventListener(type: string): boolean; + hasEventListener(): void; /** * Returns the topmost feature from each layer that intersects the specified screen coordinates. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), and [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html). At 4.6 and later, a hit test will always return a result from [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html). However, the result will only indicate the ID and the name of the layer within the [vector tile style](https://doc.arcgis.com/en/arcgis-online/reference/tile-layers.htm#ESRI_SECTION1_8F68399EB47B48FF9EF46719FCC96978) that intersects the screen point. Detailed attribute and spatial information about the actual feature represented in the layer is not returned. HitTest results returned from VectorTileLayers are primarily used for [Vector tile style editor applications](https://maps.esri.com/jg/VectorBasemapStyleEditor/index.html). * @@ -37059,6 +39821,10 @@ declare namespace __esri { on(name: "double-click", modifiers: string[], eventHandler: MapViewDoubleClickEventHandler): IHandle; + on(name: "immediate-click", eventHandler: MapViewImmediateClickEventHandler): IHandle; + + on(name: "immediate-click", modifiers: string[], eventHandler: MapViewImmediateClickEventHandler): IHandle; + on(name: "hold", eventHandler: MapViewHoldEventHandler): IHandle; on(name: "hold", modifiers: string[], eventHandler: MapViewHoldEventHandler): IHandle; @@ -37098,6 +39864,14 @@ declare namespace __esri { on(name: "pointer-leave", eventHandler: MapViewPointerLeaveEventHandler): IHandle; on(name: "pointer-leave", modifiers: string[], eventHandler: MapViewPointerLeaveEventHandler): IHandle; + + on(name: "focus", eventHandler: MapViewFocusEventHandler): IHandle; + + on(name: "focus", modifiers: string[], eventHandler: MapViewFocusEventHandler): IHandle; + + on(name: "blur", eventHandler: MapViewBlurEventHandler): IHandle; + + on(name: "blur", modifiers: string[], eventHandler: MapViewBlurEventHandler): IHandle; } interface MapViewConstructor { @@ -37135,7 +39909,7 @@ declare namespace __esri { extent?: ExtentProperties; /** * Options for configuring the highlight. Use the highlight method on the appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature. - * > **Known Limitations** Only [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) renderered with [WebGL](esri-layers-FeatureLayer.html#webgl-rendering) support highlight. See [FeatureLayerView.highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) for details of how to highlight features. + * > **Known Limitations** Only [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) rendered with [WebGL](esri-layers-FeatureLayer.html#webgl-rendering) support highlight. See [FeatureLayerView.highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) for details of how to highlight features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#highlightOptions) */ @@ -37176,10 +39950,19 @@ declare namespace __esri { zoom?: number; } + export interface MapViewBlurEvent { + + native: any; + + target: View; + } + export interface MapViewClickEvent { button: number; + buttons: number; + mapPoint: Point; native: any; @@ -37199,6 +39982,8 @@ declare namespace __esri { button: number; + buttons: number; + mapPoint: Point; native: any; @@ -37218,10 +40003,18 @@ declare namespace __esri { action: string; + angle: number; + + button: number; + + buttons: number; + native: any; origin: MapViewDragEventOrigin; + radius: number; + stopPropagation: Function; timestamp: number; @@ -37233,6 +40026,13 @@ declare namespace __esri { y: number; } + export interface MapViewFocusEvent { + + native: any; + + target: View; + } + /** * Object specification for the result of the [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) method. * @@ -37251,6 +40051,29 @@ declare namespace __esri { button: number; + buttons: number; + + mapPoint: Point; + + native: any; + + stopPropagation: Function; + + timestamp: number; + + type: string; + + x: number; + + y: number; + } + + export interface MapViewImmediateClickEvent { + + button: number; + + buttons: number; + mapPoint: Point; native: any; @@ -37546,6 +40369,10 @@ declare namespace __esri { export interface MapViewPointerDownEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37565,6 +40392,10 @@ declare namespace __esri { export interface MapViewPointerEnterEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37584,6 +40415,10 @@ declare namespace __esri { export interface MapViewPointerLeaveEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37603,6 +40438,10 @@ declare namespace __esri { export interface MapViewPointerMoveEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37622,6 +40461,10 @@ declare namespace __esri { export interface MapViewPointerUpEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -37661,7 +40504,7 @@ declare namespace __esri { export interface HitTestResultResults extends Object { /** - * A graphic representing a feature in the view that intersects the input screen coordinates. If the graphic comes from a layer with an applied [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html), then the [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) property will be empty. Other properties may be empty based on the context in which the graphic is fetched. If the result comes from a [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) then a static graphic is returned with two `attributes`: `layerId` and `layerName`. These correspond to the name and id of the style-layer in the [vector tile style](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Vector_Tile_Style/02r3000002nv000000/). + * A graphic representing a feature in the view that intersects the input screen coordinates. If the graphic comes from a layer with an applied [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html), then the [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) property will be empty. Other properties may be empty based on the context in which the graphic is fetched. If the result comes from a [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) then a static graphic is returned with two `attributes`: `layerId` and `layerName`. These correspond to the name and id of the style-layer in the [vector tile style](https://developers.arcgis.com/rest/services-reference/vector-tile-style.htm). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#HitTestResult) */ @@ -37704,7 +40547,7 @@ declare namespace __esri { /** * Specifies various properties of the environment's visualization in the view. The SceneView will redraw automatically when any property of environment changes. * ```js - * var view = new SceneView({ + * const view = new SceneView({ * map: map, * container: "viewDiv" * }); @@ -37735,15 +40578,15 @@ declare namespace __esri { */ highlightOptions: SceneViewHighlightOptions; /** - * SceneView can draw scenes in two different quality modes: `high` and `low`. Using the `low` quality profile significantly increases performance on slower browsers and devices by reducing the visual quality in the following aspects: + * SceneView can draw scenes in three different quality modes: `high`, `medium` and `low`. The `low` quality profile significantly increases performance on slower browsers and devices by reducing the memory limit and the visual quality in the following aspects: * * Map resolution * * Scene layer detail level * * Anti-aliasing (edge smoothing) * * - * The default value is based on the detected browser: - * * `low` for Internet Explorer 11 and Safari - * * `high` for any other browser + * The high and medium quality profiles only differ in the maximum amount of memory which the view is allowed to use. A higher memory limit improves quality in complex web scenes with many layers, but can have a negative impact on drawing performance and stability. The default value is based on the detected browser: + * * `low` for Internet Explorer 11 and certain mobile devices + * * `medium` for any other browser * * * Overriding the default value is best done in the constructor (see example below). If the value is modified after construction, only a subset of the quality aspects are affected. @@ -37829,10 +40672,9 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hasEventListener) * - * @param type The name of the event. * */ - hasEventListener(type: string): boolean; + hasEventListener(): void; /** * Returns the topmost feature from each layer that intersects the specified screen coordinates. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), and [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html). Draped graphics (i.e. graphics in layers where the [elevation mode](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) is `on-the-ground`) are currently **not** returned from this method, even when they intersect the input screen point. When the ground surface is hit, but no graphic is found, then the result of hitTest will be a single object with its mapPoint set to the point on the surface that was hit, but its graphic will be set to `null`. * @@ -37899,6 +40741,10 @@ declare namespace __esri { on(name: "double-click", modifiers: string[], eventHandler: SceneViewDoubleClickEventHandler): IHandle; + on(name: "immediate-click", eventHandler: SceneViewImmediateClickEventHandler): IHandle; + + on(name: "immediate-click", modifiers: string[], eventHandler: SceneViewImmediateClickEventHandler): IHandle; + on(name: "hold", eventHandler: SceneViewHoldEventHandler): IHandle; on(name: "hold", modifiers: string[], eventHandler: SceneViewHoldEventHandler): IHandle; @@ -37938,6 +40784,14 @@ declare namespace __esri { on(name: "pointer-leave", eventHandler: SceneViewPointerLeaveEventHandler): IHandle; on(name: "pointer-leave", modifiers: string[], eventHandler: SceneViewPointerLeaveEventHandler): IHandle; + + on(name: "focus", eventHandler: SceneViewFocusEventHandler): IHandle; + + on(name: "focus", modifiers: string[], eventHandler: SceneViewFocusEventHandler): IHandle; + + on(name: "blur", eventHandler: SceneViewBlurEventHandler): IHandle; + + on(name: "blur", modifiers: string[], eventHandler: SceneViewBlurEventHandler): IHandle; } interface SceneViewConstructor { @@ -37982,7 +40836,7 @@ declare namespace __esri { /** * Specifies various properties of the environment's visualization in the view. The SceneView will redraw automatically when any property of environment changes. * ```js - * var view = new SceneView({ + * const view = new SceneView({ * map: map, * container: "viewDiv" * }); @@ -38013,15 +40867,15 @@ declare namespace __esri { */ highlightOptions?: SceneViewHighlightOptionsProperties; /** - * SceneView can draw scenes in two different quality modes: `high` and `low`. Using the `low` quality profile significantly increases performance on slower browsers and devices by reducing the visual quality in the following aspects: + * SceneView can draw scenes in three different quality modes: `high`, `medium` and `low`. The `low` quality profile significantly increases performance on slower browsers and devices by reducing the memory limit and the visual quality in the following aspects: * * Map resolution * * Scene layer detail level * * Anti-aliasing (edge smoothing) * * - * The default value is based on the detected browser: - * * `low` for Internet Explorer 11 and Safari - * * `high` for any other browser + * The high and medium quality profiles only differ in the maximum amount of memory which the view is allowed to use. A higher memory limit improves quality in complex web scenes with many layers, but can have a negative impact on drawing performance and stability. The default value is based on the detected browser: + * * `low` for Internet Explorer 11 and certain mobile devices + * * `medium` for any other browser * * * Overriding the default value is best done in the constructor (see example below). If the value is modified after construction, only a subset of the quality aspects are affected. @@ -38064,10 +40918,19 @@ declare namespace __esri { zoom?: number; } + export interface SceneViewBlurEvent { + + native: any; + + target: View; + } + export interface SceneViewClickEvent { button: number; + buttons: number; + mapPoint: Point; native: any; @@ -38087,6 +40950,8 @@ declare namespace __esri { button: number; + buttons: number; + mapPoint: Point; native: any; @@ -38106,10 +40971,18 @@ declare namespace __esri { action: string; + angle: number; + + button: number; + + buttons: number; + native: any; origin: SceneViewDragEventOrigin; + radius: number; + stopPropagation: Function; timestamp: number; @@ -38123,6 +40996,13 @@ declare namespace __esri { export type EasingFunction = (t: number, duration: number) => number; + export interface SceneViewFocusEvent { + + native: any; + + target: View; + } + /** * Object specification for the result of the [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) method. * @@ -38141,6 +41021,29 @@ declare namespace __esri { button: number; + buttons: number; + + mapPoint: Point; + + native: any; + + stopPropagation: Function; + + timestamp: number; + + type: string; + + x: number; + + y: number; + } + + export interface SceneViewImmediateClickEvent { + + button: number; + + buttons: number; + mapPoint: Point; native: any; @@ -38215,6 +41118,10 @@ declare namespace __esri { export interface SceneViewPointerDownEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38234,6 +41141,10 @@ declare namespace __esri { export interface SceneViewPointerEnterEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38253,6 +41164,10 @@ declare namespace __esri { export interface SceneViewPointerLeaveEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38272,6 +41187,10 @@ declare namespace __esri { export interface SceneViewPointerMoveEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38291,6 +41210,10 @@ declare namespace __esri { export interface SceneViewPointerUpEvent { + button: number; + + buttons: number; + native: any; pointerId: number; @@ -38903,7 +41826,7 @@ declare namespace __esri { interface UI extends Accessor { /** - * The HTML Element that contains the the view. + * The HTML Element that contains the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) */ @@ -38996,7 +41919,7 @@ declare namespace __esri { interface UIProperties { /** - * The HTML Element that contains the the view. + * The HTML Element that contains the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) */ @@ -39090,6 +42013,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics) */ graphics: Collection; + /** + * The view for the ground of the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#groundView) + */ + readonly groundView: GroundView; /** * Indication whether the view is being interacted with (for example when panning). * @@ -39133,7 +42062,7 @@ declare namespace __esri { */ readonly ready: boolean; /** - * The spatial reference of the view. This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. The spatial reference can either be set explicitly or automatically derived from the following: + * The spatial reference of the view. This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. The spatial reference can either be set explicitly or automatically derived from the following: * * In the case of a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), if the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#map) is a [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html) instance, the [WebScene.initialViewProperties.spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#initialViewProperties) is used. * * In all other cases, the spatial reference is derived from the first layer that loads in this order: * * [map.basemap.baseLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers) @@ -39234,7 +42163,7 @@ declare namespace __esri { */ padding?: ViewPadding; /** - * The spatial reference of the view. This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. The spatial reference can either be set explicitly or automatically derived from the following: + * The spatial reference of the view. This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. The spatial reference can either be set explicitly or automatically derived from the following: * * In the case of a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), if the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#map) is a [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html) instance, the [WebScene.initialViewProperties.spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#initialViewProperties) is used. * * In all other cases, the spatial reference is derived from the first layer that loads in this order: * * [map.basemap.baseLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers) @@ -39428,7 +42357,7 @@ declare namespace __esri { interface WebMapConstructor { /** - * Loads a [WebMap](https://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) from [ArcGIS Online](https://www.arcgis.com/home/) or [Portal for ArcGIS](http://server.arcgis.com/en/portal/) into a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Loads a [WebMap](https://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) from [ArcGIS Online](https://www.arcgis.com/home/) or [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-portal-for-arcgis-.htm) into a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html) */ @@ -39485,7 +42414,7 @@ declare namespace __esri { interface InitialViewProperties extends Accessor, corePromise { /** - * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. + * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-InitialViewProperties.html#spatialReference) */ @@ -39517,7 +42446,7 @@ declare namespace __esri { interface InitialViewPropertiesProperties { /** - * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. + * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-InitialViewProperties.html#spatialReference) */ @@ -39547,6 +42476,12 @@ declare namespace __esri { } interface WebScene extends Map, corePromise { + /** + * Configuration of application and UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#applicationProperties) + */ + applicationProperties: ApplicationProperties; /** * *This property only applies to local scenes.* Represents an optional clipping area used to define the bounds or [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of a local scene. If defined, only data (including the basemap) within the area will be displayed. Set the [clippingEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#clippingEnabled) property to `true` to apply the specified clippingArea to the view. * @@ -39655,7 +42590,7 @@ declare namespace __esri { */ saveAs(portalItem: PortalItem | PortalItemProperties, options?: WebSceneSaveAsOptions): IPromise; /** - * Converts an instance of [this class]() to its ArcGIS Portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide and the [web scene specification](https://developers.arcgis.com/web-scene-specification/) for more information. + * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide and the [web scene specification](https://developers.arcgis.com/web-scene-specification/) for more information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#toJSON) * @@ -39700,6 +42635,12 @@ declare namespace __esri { export const WebScene: WebSceneConstructor; interface WebSceneProperties extends MapProperties { + /** + * Configuration of application and UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#applicationProperties) + */ + applicationProperties?: ApplicationPropertiesProperties; /** * *This property only applies to local scenes.* Represents an optional clipping area used to define the bounds or [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of a local scene. If defined, only data (including the basemap) within the area will be displayed. Set the [clippingEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#clippingEnabled) property to `true` to apply the specified clippingArea to the view. * @@ -39740,6 +42681,253 @@ declare namespace __esri { presentation?: PresentationProperties; } + interface ApplicationProperties extends Accessor { + /** + * View-specific properties of application and UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-ApplicationProperties.html#viewing) + */ + viewing: Viewing; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-ApplicationProperties.html#clone) + * + * + */ + clone(): ApplicationProperties; + } + + interface ApplicationPropertiesConstructor { + + + new(properties?: ApplicationPropertiesProperties): ApplicationProperties; + } + + export const ApplicationProperties: ApplicationPropertiesConstructor; + + interface ApplicationPropertiesProperties { + /** + * View-specific properties of application and UI elements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-ApplicationProperties.html#viewing) + */ + viewing?: ViewingProperties; + } + + interface Search extends Accessor { + /** + * Whether search functionality is enabled in the web scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#enabled) + */ + enabled: boolean; + /** + * The hint provided with the search dialog. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#hintText) + */ + hintText: string; + /** + * A collection of layers to be included in search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#layers) + */ + layers: Collection; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#clone) + * + * + */ + clone(): Search; + } + + interface SearchConstructor { + + + new(properties?: SearchProperties): Search; + } + + export const Search: SearchConstructor; + + interface SearchProperties { + /** + * Whether search functionality is enabled in the web scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#enabled) + */ + enabled?: boolean; + /** + * The hint provided with the search dialog. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#hintText) + */ + hintText?: string; + /** + * A collection of layers to be included in search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Search.html#layers) + */ + layers?: CollectionProperties; + } + + interface SearchLayer extends Accessor { + /** + * The field to use for search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#field) + */ + field: SearchLayerField; + /** + * The id of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#id) + */ + id: string; + /** + * The sub layer index. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#subLayer) + */ + subLayer: number; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#clone) + * + * + */ + clone(): SearchLayer; + } + + interface SearchLayerConstructor { + + + new(properties?: SearchLayerProperties): SearchLayer; + } + + export const SearchLayer: SearchLayerConstructor; + + interface SearchLayerProperties { + /** + * The field to use for search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#field) + */ + field?: SearchLayerFieldProperties; + /** + * The id of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#id) + */ + id?: string; + /** + * The sub layer index. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayer.html#subLayer) + */ + subLayer?: number; + } + + interface SearchLayerField extends Accessor { + /** + * Whether or not the field is an exact match. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#exactMatch) + */ + exactMatch: boolean; + /** + * The name of the field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#name) + */ + name: string; + /** + * The data type of the field. **Possible Values:** small-integer | integer | single | double | long | string | date | oid | geometry | blob | raster | guid | global-id | xml + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#type) + */ + type: string; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#clone) + * + * + */ + clone(): SearchLayerField; + } + + interface SearchLayerFieldConstructor { + + + new(properties?: SearchLayerFieldProperties): SearchLayerField; + } + + export const SearchLayerField: SearchLayerFieldConstructor; + + interface SearchLayerFieldProperties { + /** + * Whether or not the field is an exact match. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#exactMatch) + */ + exactMatch?: boolean; + /** + * The name of the field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#name) + */ + name?: string; + /** + * The data type of the field. **Possible Values:** small-integer | integer | single | double | long | string | date | oid | geometry | blob | raster | guid | global-id | xml + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-SearchLayerField.html#type) + */ + type?: string; + } + + interface Viewing extends Accessor { + /** + * An object specifying the search parameters set within the web scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Viewing.html#search) + */ + search: Search; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Viewing.html#clone) + * + * + */ + clone(): Viewing; + } + + interface ViewingConstructor { + + + new(properties?: ViewingProperties): Viewing; + } + + export const Viewing: ViewingConstructor; + + interface ViewingProperties { + /** + * An object specifying the search parameters set within the web scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-applicationProperties-Viewing.html#search) + */ + search?: SearchProperties; + } + interface Environment extends Accessor { /** * Settings for defining the lighting of the scene. @@ -39783,7 +42971,7 @@ declare namespace __esri { */ environment: Environment; /** - * The spatial reference of the [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html). This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. + * The spatial reference of the [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-InitialViewProperties.html#spatialReference) */ @@ -39829,7 +43017,7 @@ declare namespace __esri { */ environment?: EnvironmentProperties; /** - * The spatial reference of the [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html). This indicates the [Projected Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Projected_coordinate_systems/02r3000000vt000000/) or the [Geographic Coordinate System](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Geographic_coordinate_systems/02r300000105000000/) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. + * The spatial reference of the [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) the following [supported coordinate systems](esri-views-SceneView.html#supported-coordinate-systems) are available. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-InitialViewProperties.html#spatialReference) */ @@ -39868,7 +43056,7 @@ declare namespace __esri { */ directShadowsEnabled: boolean; /** - * The UTC timezone offset in hours that should be displayed in the UI to represent the date. This value does not have an impact on the actual lighting of the scene. + * The UTC time zone offset in hours that should be displayed in the UI to represent the date. This value does not have an impact on the actual lighting of the scene. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Lighting.html#displayUTCOffset) * @@ -39912,7 +43100,7 @@ declare namespace __esri { */ directShadowsEnabled?: boolean; /** - * The UTC timezone offset in hours that should be displayed in the UI to represent the date. This value does not have an impact on the actual lighting of the scene. + * The UTC time zone offset in hours that should be displayed in the UI to represent the date. This value does not have an impact on the actual lighting of the scene. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Lighting.html#displayUTCOffset) * @@ -40112,7 +43300,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#description) */ - description?: SlideDescriptionProperties; + description?: SlideDescriptionProperties | string; /** * Represents settings that affect the environment in which the WebScene is displayed (such as lighting). * @@ -40130,13 +43318,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#thumbnail) */ - thumbnail?: SlideThumbnailProperties; + thumbnail?: SlideThumbnailProperties | string; /** * The title of the slide. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#title) */ - title?: SlideTitleProperties; + title?: SlideTitleProperties | string; /** * The viewpoint of the slide. This acts like a bookmark, saving a predefined location or point of view from which to view the scene. * @@ -40422,6 +43610,184 @@ declare namespace __esri { viewpointExcluded?: boolean; } + interface AreaMeasurement3D extends Widget { + /** + * List of unit options in the widget drop down list. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#unitOptions) + * + * @default ["metric", "imperial", "square-inches", "square-feet", "square-yards", "square-miles", "square-us-feet", "square-meters", "square-kilometers", "acres", "ares", "hectares"] + */ + unitOptions: string[]; + /** + * A reference to the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#view) + */ + view: SceneView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [AreaMeasurement3DViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#viewModel) + */ + viewModel: AreaMeasurement3DViewModel; + + /** + * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#render) + * + * + */ + render(): any; + } + + interface AreaMeasurement3DConstructor { + /** + * The AreaMeasurement3D widget calculates and displays the area and perimeter of a polygon. This widget can be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) to measure the area and perimeter of a polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html) + */ + + new(properties?: AreaMeasurement3DProperties): AreaMeasurement3D; + } + + export const AreaMeasurement3D: AreaMeasurement3DConstructor; + + interface AreaMeasurement3DProperties extends WidgetProperties { + /** + * List of unit options in the widget drop down list. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#unitOptions) + * + * @default ["metric", "imperial", "square-inches", "square-feet", "square-yards", "square-miles", "square-us-feet", "square-meters", "square-kilometers", "acres", "ares", "hectares"] + */ + unitOptions?: string[]; + /** + * A reference to the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#view) + */ + view?: SceneViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [AreaMeasurement3DViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D.html#viewModel) + */ + viewModel?: AreaMeasurement3DViewModel; + } + + interface AreaMeasurement3DViewModel { + /** + * The current measurement of the area. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#measurement) + */ + readonly measurement: AreaMeasurement3DViewModelMeasurement; + /** + * The view model's state. + * + * Value | Description + * ------------|------------- + * disabled | not ready yet + * ready | ready for measuring + * measuring | currently measuring + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * Unit system (imperial, metric) or specific unit used for displaying the distance values. **Known Values:** imperial | metric | square-inches | square-feet | square-yards | square-miles | square-meters | square-kilometers | square-us-feet | acres | ares | hectares + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#unit) + */ + unit: string; + /** + * List of unit systems (imperial, metric) and specific units for displaying the area values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#unitOptions) + * + * @default ["metric", "imperial", "square-inches", "square-feet", "square-yards", "square-miles", "square-us-feet", "square-meters", "square-kilometers", "acres", "ares", "hectares"] + */ + unitOptions: string[]; + /** + * The view from which the widget will operate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#view) + */ + view: SceneView; + + /** + * Clears the current measurement. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#clearMeasurement) + * + * + */ + clearMeasurement(): void; + } + + interface AreaMeasurement3DViewModelConstructor { + + + + new(properties?: any): AreaMeasurement3DViewModel; + } + + export const AreaMeasurement3DViewModel: AreaMeasurement3DViewModelConstructor; + + + export interface AreaMeasurement3DViewModelMeasurement extends Object { + /** + * Describes the mode in which the measurement was taken. In `euclidean` mode, the area and perimeter length are computed from a flat polygon with straight segments on the perimeter in the [ECEF](https://en.wikipedia.org/wiki/ECEF) coordinate system. In `geodesic` mode, the area and perimeter length are computed from a geodesic polygon on the WGS84 ellipsoid. **Known Values:** euclidean | geodesic + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#measurement) + */ + measurementMode: string; + /** + * The area of the polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#measurement) + */ + area: MeasurementValue; + /** + * The perimeter length of the polygon. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#measurement) + */ + perimeterLength: MeasurementValue; + } + + /** + * Measurement value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#MeasurementValue) + */ + export interface MeasurementValue extends Object { + /** + * Textual representation of the measured value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#MeasurementValue) + */ + text: string; + /** + * State of the measured value. + * + * Value | Description + * ------------|------------- + * available | measured value is available + * unavailable | measured value is not available due an incomplete measurement + * invalid | measured value is not available due to an invalid measurement configuration (e.g. self-intersecting polygon) + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#MeasurementValue) + */ + state: string; + } + interface Attribution extends Widget { /** * Full attribution text. @@ -40429,6 +43795,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#attributionText) */ readonly attributionText: string; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#iconClass) + */ + readonly iconClass: string; /** * Text used to split attribution by [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) * @@ -40437,6 +43809,12 @@ declare namespace __esri { * @default | */ itemDelimiter: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#label) + */ + readonly label: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -40497,11 +43875,11 @@ declare namespace __esri { interface AttributionViewModel { /** - * Array of attribution items. + * A collection of [AttributionItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#AttributionItem)s. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#items) */ - readonly items: AttributionItem[]; + readonly items: Collection; /** * The view model's state. **Known Values:** ready | disabled * @@ -40532,23 +43910,23 @@ declare namespace __esri { export const AttributionViewModel: AttributionViewModelConstructor; /** - * The following properties define an attribution item that contains the attribution text for a set of layers. + * The following properties define an attribution item that contains the attribution text for a layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#AttributionItem) */ export interface AttributionItem extends Object { /** - * The attribution text for one or more layers. + * The attribution text. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#AttributionItem) */ - text: boolean; + text: string; /** - * The associated layers that share the attribution text. + * The layer that has the attribution text. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html#AttributionItem) */ - layers: Layer[]; + layer: Layer; } interface BasemapGallery extends Widget { @@ -40558,6 +43936,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#activeBasemap) */ activeBasemap: Basemap; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#iconClass) + */ + iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#label) + */ + readonly label: string; /** * The source for basemaps that the widget will display. This property can be autocast with an array or [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s, a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance, or a URL to a portal instance. The default source is a [PortalBasemapsSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html) that points to the default portal instance set in [esriConfig.portalUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl). * @@ -40606,6 +43996,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#activeBasemap) */ activeBasemap?: BasemapProperties; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#iconClass) + */ + iconClass?: string; /** * The source for basemaps that the widget will display. This property can be autocast with an array or [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s, a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance, or a URL to a portal instance. The default source is a [PortalBasemapsSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html) that points to the default portal instance set in [esriConfig.portalUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl). * @@ -40692,7 +44088,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html#items) */ - items?: CollectionProperties; + items?: CollectionProperties; /** * The source for basemaps that the widget will display. This property can be autocast with an array or [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s, a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance or a URL to a portal instance. The default source is a [PortalBasemapsSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html) that points to the default portal instance set in [esriConfig.portalUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl). * @@ -40707,8 +44103,7 @@ declare namespace __esri { view?: MapViewProperties | SceneViewProperties; } - - interface BasemapGalleryItem { + interface BasemapGalleryItem extends Accessor { /** * The item's associated basemap. * @@ -40737,7 +44132,28 @@ declare namespace __esri { view: MapView | SceneView; } - export const BasemapGalleryItem: BasemapGalleryItem; + interface BasemapGalleryItemConstructor { + + + new(properties?: BasemapGalleryItemProperties): BasemapGalleryItem; + } + + export const BasemapGalleryItem: BasemapGalleryItemConstructor; + + interface BasemapGalleryItemProperties { + /** + * The item's associated basemap. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-BasemapGalleryItem.html#basemap) + */ + basemap?: BasemapProperties; + /** + * The view associated with this item. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-BasemapGalleryItem.html#view) + */ + view?: MapViewProperties | SceneViewProperties; + } interface LocalBasemapsSource extends Accessor { /** @@ -41266,6 +44682,18 @@ declare namespace __esri { } interface Compass extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#label) + */ + readonly label: string; /** * The view in which the Compass obtains and indicates camera [heading](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading), using a (SceneView) or rotation (MapView). * @@ -41387,7 +44815,529 @@ declare namespace __esri { view?: MapViewProperties | SceneViewProperties; } + interface CoordinateConversion extends Widget { + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) that the widget is currently displaying. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions) + */ + conversions: Collection; + /** + * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#currentLocation) + */ + currentLocation: Point; + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) that the widget is capable of displaying. The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#formats) + */ + formats: Collection; + /** + * Describes the current mode of the widget. **Known Values:** live | capture + * * While in `live` mode, the widget will update as the cursor moves. + * * While in `capture` mode, the widget will update on mouse click and display a graphic marking the current location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#mode) + * + * @default live + */ + mode: string; + /** + * If this property is set to `true`, multiple conversions can be displayed. For a simpler experience with only one conversion at a time, this property can be set to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#multipleConversions) + * + * @default true + */ + multipleConversions: boolean; + /** + * Determines whether the widget should expand up or down. If set to `auto` the widget will be oriented based on its position in the view. **Known Values:** auto | expand-up | expand-down + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#orientation) + * + * @default auto + */ + orientation: string; + /** + * The number of milliseconds of delay before conversion requests will be sent to the [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html). This only affects conversions that cannot be performed in the browser. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#requestDelay) + * + * @default 300 + */ + requestDelay: number; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#view) + */ + view: MapView | SceneView; + /** + * The view model for this widget. The view model contains the logic that controls the Coordinate Widget's behavior. See the [CoordinateConversionViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#viewModel) + */ + viewModel: CoordinateConversionViewModel; + + /** + * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#render) + * + * + */ + render(): any; + /** + * Attempt to convert a string into a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The format of the string must be specified. A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of available formats can be obtained from the [formats](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#formats) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#reverseConvert) + * + * @param coordinate The coordinate string. + * @param format Specifies the format of the input coordinate. + * + */ + reverseConvert(coordinate: string, format: Format): IPromise; + } + + interface CoordinateConversionConstructor { + /** + * The CoordinateConversion widget provides a way to display user cursor position either as map coordinates or as any of several popular coordinate notations. Additionally, the widget provides a way to convert user input coordinates into a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html) + */ + + new(properties?: CoordinateConversionProperties): CoordinateConversion; + } + + export const CoordinateConversion: CoordinateConversionConstructor; + + interface CoordinateConversionProperties extends WidgetProperties { + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) that the widget is currently displaying. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions) + */ + conversions?: CollectionProperties; + /** + * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#currentLocation) + */ + currentLocation?: PointProperties; + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) that the widget is capable of displaying. The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#formats) + */ + formats?: CollectionProperties; + /** + * Describes the current mode of the widget. **Known Values:** live | capture + * * While in `live` mode, the widget will update as the cursor moves. + * * While in `capture` mode, the widget will update on mouse click and display a graphic marking the current location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#mode) + * + * @default live + */ + mode?: string; + /** + * If this property is set to `true`, multiple conversions can be displayed. For a simpler experience with only one conversion at a time, this property can be set to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#multipleConversions) + * + * @default true + */ + multipleConversions?: boolean; + /** + * Determines whether the widget should expand up or down. If set to `auto` the widget will be oriented based on its position in the view. **Known Values:** auto | expand-up | expand-down + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#orientation) + * + * @default auto + */ + orientation?: string; + /** + * The number of milliseconds of delay before conversion requests will be sent to the [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html). This only affects conversions that cannot be performed in the browser. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#requestDelay) + * + * @default 300 + */ + requestDelay?: number; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#view) + */ + view?: MapViewProperties | SceneViewProperties; + /** + * The view model for this widget. The view model contains the logic that controls the Coordinate Widget's behavior. See the [CoordinateConversionViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#viewModel) + */ + viewModel?: CoordinateConversionViewModelProperties; + } + + interface CoordinateConversionViewModel extends Accessor { + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) that the widget is currently displaying. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions) + */ + conversions: Collection; + /** + * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#currentLocation) + */ + currentLocation: Point; + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) that the widget is capable of displaying. The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats) + */ + formats: Collection; + /** + * This symbol is used to visualize the location currently described by the widget when `capture` mode is active. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#locationSymbol) + */ + locationSymbol: SimpleMarkerSymbol | PictureMarkerSymbol; + /** + * Describes the current mode of the widget. **Known Values:** live | capture + * * While in `live` mode, the widget will update as the cursor moves. + * * While in `capture` mode, the widget will update on mouse click and display a graphic marking the current location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#mode) + * + * @default live + */ + mode: string; + /** + * The number of milliseconds of delay before conversion requests will be sent to the [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html). This only affects conversions that cannot be performed in the browser. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#requestDelay) + * + * @default 300 + */ + requestDelay: number; + /** + * The view model's state. **Known Values:** ready | loading | disabled + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#view) + */ + view: MapView | SceneView; + + /** + * Attempt to convert a point into a [Position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#Position). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#convert) + * + * @param point The point to convert. + * @param format The format that describes how the point should be converted. + * + */ + convert(point: Point, format: Format): IPromise; + /** + * Attempt to convert a string into a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The format of the string must be specified. A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of available formats can be obtained from the [formats](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#reverseConvert) + * + * @param coordinate The coordinate string. + * @param format Specifies the format of the input coordinate. + * + */ + reverseConvert(coordinate: string, format: Format): IPromise; + /** + * Update the input conversions based on the input point. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#updateConversions) + * + * @param location A point that will be used to update each input conversion. + * @param conversions An array of [Conversions](esri-widgets-CoordinateConversion-support-Conversion.html) to be updated. + * + */ + updateConversions(location: Point, conversions: Conversion[]): IPromise; + } + + interface CoordinateConversionViewModelConstructor { + + + new(properties?: CoordinateConversionViewModelProperties): CoordinateConversionViewModel; + } + + export const CoordinateConversionViewModel: CoordinateConversionViewModelConstructor; + + interface CoordinateConversionViewModelProperties { + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) that the widget is currently displaying. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions) + */ + conversions?: CollectionProperties; + /** + * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). Setting this property will update all [conversions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#currentLocation) + */ + currentLocation?: PointProperties; + /** + * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) that the widget is capable of displaying. The default formats are `basemap`, `dd`, `ddm`, `dms`, `mgrs`, `usng`, `utm`, and `xy`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats) + */ + formats?: CollectionProperties; + /** + * This symbol is used to visualize the location currently described by the widget when `capture` mode is active. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#locationSymbol) + */ + locationSymbol?: SimpleMarkerSymbolProperties | PictureMarkerSymbolProperties; + /** + * Describes the current mode of the widget. **Known Values:** live | capture + * * While in `live` mode, the widget will update as the cursor moves. + * * While in `capture` mode, the widget will update on mouse click and display a graphic marking the current location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#mode) + * + * @default live + */ + mode?: string; + /** + * The number of milliseconds of delay before conversion requests will be sent to the [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html). This only affects conversions that cannot be performed in the browser. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#requestDelay) + * + * @default 300 + */ + requestDelay?: number; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#view) + */ + view?: MapViewProperties | SceneViewProperties; + } + + /** + * Describes a point in terms of a location, a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), and a coordinate, a string. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#Position) + */ + export interface Position extends Object { + /** + * A point geometry representing the location described by the conversion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#Position) + */ + location: Point; + /** + * A string representing the location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#Position) + */ + coordinate: string; + } + + + interface Conversion { + /** + * A formatted string based on the current [position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#position) and display information on the [format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#format). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#displayCoordinate) + */ + readonly displayCoordinate: string; + /** + * The [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) for this conversion. The Format contains information detailing how the Conversion should be performed and how it will be displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#format) + */ + format: Format; + /** + * The position property contains the location information for this conversion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#position) + */ + position: ConversionPosition; + } + + export const Conversion: Conversion; + + /** + * Describes a point in terms of a location, a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), and a coordinate, a string. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#Position) + */ + export interface ConversionPosition extends Object { + /** + * A point geometry representing the location described by the conversion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#Position) + */ + location: Point; + /** + * A string representing the location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html#Position) + */ + coordinate: string; + } + + + interface Format { + /** + * Contains information that describes how this Format should be converted. This property should only be set when creating a custom Format. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#conversionInfo) + * + * @default null + */ + conversionInfo: ConversionInfo; + /** + * A array of [Coordinate Segments](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment). Each segment represents a section of the Format's coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#coordinateSegments) + * + * @default null + */ + coordinateSegments: CoordinateSegment[]; + /** + * A string that serves as a pattern describing how this Format should be displayed. The pattern should contain all of aliases specified by the Format's [coordinateSegments property](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#coordinateSegments). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#currentPattern) + * + * @default null + */ + currentPattern: string; + /** + * The default pattern describing how this Format should be displayed. See [currentPattern](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#currentPattern). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#defaultPattern) + * + * @default null + */ + defaultPattern: string; + /** + * The name of the coordinate. A [CoordinateConversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html) widget should not contain multiple Formats with the same name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#name) + * + * @default null + */ + name: string; + } + + export const Format: Format; + + /** + * Information describing how a Format should be projected. Used to define custom Formats. 1. If the conversion can be performed synchronously, a convert function should be defined. 2. If the conversion cannot be performed synchronously, a convertDeferred function should be defined. 3. Alternatively, a [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) can be provided, and the Format will project to this Spatial Reference. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + */ + export interface ConversionInfo extends Object { + /** + * The SpatialReference to project to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + */ + spatialReference?: SpatialReference; + + /** + * A function that takes a point and returns a [position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + * + * + */ + convert(): void; + /** + * A function that takes a point and returns a promise that resolves into a [position](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + * + * + */ + convertDeferred(): void; + /** + * A function that takes a string and returns a Point. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#ConversionInfo) + * + * + */ + reverseConvert(): void; + } + + /** + * A coordinate segment represents one piece of a coordinate string. + * > A MGRS coordinate, for example `30UVG898998`, is described by four segments: 1. Alias `Z`, the gridzone: `30U` 2. Alias `S`, the 100,000 meter square designator: `VG` 3. Alias `X`, the easting (x coordinate with respect to the 10,000 meter square): `898` 4. Alias `Y`, the northing (y coordinate with respect to the 10,000 meter square): `998` + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment) + */ + export interface CoordinateSegment extends Object { + /** + * A string that provides the name for this segment of a coordinate string. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment) + */ + alias: string; + /** + * A string that describes the role of this segment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment) + */ + description: string; + /** + * A regular expression that should extract this segment from the complete coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#CoordinateSegment) + */ + searchPattern: RegExp; + } + + /** + * Describes a point in terms of a location, a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), and a coordinate, a string. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position) + */ + export interface FormatPosition extends Object { + /** + * A point geometry representing the location described by the conversion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position) + */ + location: Point; + /** + * A string representing the location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html#Position) + */ + coordinate: string; + } + interface Directions extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#label) + */ + readonly label: string; /** * The maximum number of stops allowed for routing. * @@ -41411,9 +45361,11 @@ declare namespace __esri { */ routeSymbol: SimpleLineSymbol; /** - * This property controls the default properties for [Searching](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). These properties can be configured per application. + * Controls the default properties used when [searching](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). Note that the default `searchProperties` differ slightly from the [Search widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#searchProperties) + * + * @default null */ searchProperties: DirectionsSearchProperties; /** @@ -41497,9 +45449,11 @@ declare namespace __esri { */ routeSymbol?: SimpleLineSymbolProperties; /** - * This property controls the default properties for [Searching](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). These properties can be configured per application. + * Controls the default properties used when [searching](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). Note that the default `searchProperties` differ slightly from the [Search widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#searchProperties) + * + * @default null */ searchProperties?: DirectionsSearchProperties; /** @@ -41845,7 +45799,7 @@ declare namespace __esri { */ impedanceAttributeName: string; /** - * Name of the travel mode. Users of ArcGIS Online or Portal for ArcGIS can define custom travel modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own travel modes inside a network dataset. + * Name of the travel mode. Users of ArcGIS Online or ArcGIS Enterprise can define custom travel modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own travel modes inside a network dataset. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#selectedTravelMode) */ @@ -41933,7 +45887,7 @@ declare namespace __esri { */ impedanceAttributeName?: string; /** - * Name of the travel mode. Users of ArcGIS Online or Portal for ArcGIS can define custom travel modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own travel modes inside a network dataset. + * Name of the travel mode. Users of ArcGIS Online or ArcGIS Enterprise can define custom travel modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own travel modes inside a network dataset. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#TravelMode) */ @@ -42091,12 +46045,26 @@ declare namespace __esri { } interface DirectLineMeasurement3D extends Widget { + /** + * List of unit options in the widget drop down list. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#unitOptions) + * + * @default ["metric", "imperial", "inches", "feet", "yards", "miles", "nautical-miles", "us-feet", "meters", "kilometers"] + */ + unitOptions: string[]; /** * A reference to the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#view) */ view: SceneView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [DirectLineMeasurement3DViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#viewModel) + */ + viewModel: DirectLineMeasurement3DViewModel; /** * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. @@ -42121,12 +46089,142 @@ declare namespace __esri { export const DirectLineMeasurement3D: DirectLineMeasurement3DConstructor; interface DirectLineMeasurement3DProperties extends WidgetProperties { + /** + * List of unit options in the widget drop down list. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#unitOptions) + * + * @default ["metric", "imperial", "inches", "feet", "yards", "miles", "nautical-miles", "us-feet", "meters", "kilometers"] + */ + unitOptions?: string[]; /** * A reference to the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#view) */ view?: SceneViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [DirectLineMeasurement3DViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D.html#viewModel) + */ + viewModel?: DirectLineMeasurement3DViewModel; + } + + interface DirectLineMeasurement3DViewModel { + /** + * The current measurement calculated between the two points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + readonly measurement: DirectLineMeasurement3DViewModelMeasurement; + /** + * The view model's state. + * + * Value | Description + * ------------|------------- + * disabled | not ready yet + * ready | ready for measuring + * measuring | currently measuring + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * Unit system (imperial, metric) or specific unit used for displaying the distance values. **Known Values:** imperial | metric | inches | feet | yards | miles | nautical-miles | meters | kilometers | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#unit) + */ + unit: string; + /** + * List of unit systems (imperial, metric) and specific units for displaying the distance values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#unitOptions) + * + * @default ["metric", "imperial", "inches", "feet", "yards", "miles", "nautical-miles", "us-feet", "meters", "kilometers"] + */ + unitOptions: string[]; + /** + * The view from which the widget will operate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#view) + */ + view: SceneView; + + /** + * Clears the current measurement. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#clearMeasurement) + * + * + */ + clearMeasurement(): void; + } + + interface DirectLineMeasurement3DViewModelConstructor { + + + + new(properties?: any): DirectLineMeasurement3DViewModel; + } + + export const DirectLineMeasurement3DViewModel: DirectLineMeasurement3DViewModelConstructor; + + + export interface DirectLineMeasurement3DViewModelMeasurement extends Object { + /** + * Describes the mode in which the measurement was taken. In `euclidean` mode, the distances are measured as straight lines in the [ECEF](https://en.wikipedia.org/wiki/ECEF) coordinate system. In `geodesic` mode, the distances are measured as geodesic lines on the WGS84 ellipsoid. **Known Values:** euclidean | geodesic + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + measurementMode: string; + /** + * The direct distance between the two points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + directDistance: DirectLineMeasurement3DViewModelMeasurementValue; + /** + * The horizontal distance between the two points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + horizontalDistance: DirectLineMeasurement3DViewModelMeasurementValue; + /** + * The vertical distance between the two points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#measurement) + */ + verticalDistance: DirectLineMeasurement3DViewModelMeasurementValue; + } + + /** + * Measurement value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#MeasurementValue) + */ + export interface DirectLineMeasurement3DViewModelMeasurementValue extends Object { + /** + * Textual representation of the measured value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#MeasurementValue) + */ + text: string; + /** + * State of the measured value. + * + * Value | Description + * ------------|------------- + * available | measured value is available + * unavailable | measured value is not available due an incomplete measurement or because the value is not available for the given measurement configuration (e.g. direct distance is unavailable in `geodesic` mode) + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#MeasurementValue) + */ + state: string; } interface Expand extends Widget { @@ -42192,6 +46290,21 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#iconNumber) */ iconNumber: number; + /** + * The mode in which the widget displays. These modes are listed below. + * + * mode | description + * ---------------|------------ + * auto | This is the default mode. It is responsive to browser size changes and will update based on whether the widget is viewed in a desktop or mobile application. + * floating | Use this mode if you wish to always display the widget as floating regardless of browser size. + * drawer | Use this mode if you wish to always display the widget in a panel regardless of browser size. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#mode) + * + * @default "auto" + */ + mode: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -42302,6 +46415,21 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#iconNumber) */ iconNumber?: number; + /** + * The mode in which the widget displays. These modes are listed below. + * + * mode | description + * ---------------|------------ + * auto | This is the default mode. It is responsive to browser size changes and will update based on whether the widget is viewed in a desktop or mobile application. + * floating | Use this mode if you wish to always display the widget as floating regardless of browser size. + * drawer | Use this mode if you wish to always display the widget in a panel regardless of browser size. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#mode) + * + * @default "auto" + */ + mode?: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -42386,6 +46514,205 @@ declare namespace __esri { view?: MapViewProperties | SceneViewProperties; } + interface Feature extends Widget { + /** + * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#graphic) + * + * @default null + */ + graphic: Graphic; + /** + * The title for the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#title) + * + * @default null + */ + readonly title: string; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#view) + * + * @default null + */ + view: MapView | SceneView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [FeatureViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#viewModel) + */ + viewModel: FeatureViewModel; + + /** + * Paginates to a specified [media](esri-PopupTemplate.html#media) info object. For example, you may have [media](esri-PopupTemplate.html#media) content which contains multiple `mediaInfos`. This method allows you to specify the index of the `mediaInfos` you wish to display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#goToMedia) + * + * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element to be updated. + * @param mediaInfoIndex The index position of the [media](esri-PopupTemplate.html#media) info object you wish to display. + * + */ + goToMedia(contentElementIndex: number, mediaInfoIndex: number): void; + /** + * Paginates to the next [media](esri-PopupTemplate.html#media) info. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#nextMedia) + * + * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element. + * + */ + nextMedia(contentElementIndex: number): void; + /** + * Paginates to the previous [media](esri-PopupTemplate.html#media) info in the specified [media](esri-PopupTemplate.html#media) content element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#previousMedia) + * + * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element. + * + */ + previousMedia(contentElementIndex: number): void; + /** + * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#render) + * + * + */ + render(): any; + } + + interface FeatureConstructor { + + + new(properties?: FeatureProperties): Feature; + } + + export const Feature: FeatureConstructor; + + interface FeatureProperties extends WidgetProperties { + /** + * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#graphic) + * + * @default null + */ + graphic?: GraphicProperties; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#view) + * + * @default null + */ + view?: MapViewProperties | SceneViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [FeatureViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#viewModel) + */ + viewModel?: FeatureViewModelProperties; + } + + interface FeatureViewModel extends Accessor { + /** + * The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) of the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#content) + * + * @default null + */ + readonly content: string | any[] | HTMLElement | Widget; + /** + * The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. They are obtained from the feature's [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#graphic) attribute values and can be read: + * * globally using the [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property directly at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html), or + * * per an individual content element. This element is defined with a type of fields on the PopupTemplate's content property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#formattedAttributes) + * + * @default null + */ + readonly formattedAttributes: FeatureViewModelFormattedAttributes; + /** + * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#graphic) + * + * @default null + */ + graphic: Graphic; + /** + * The title for the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#title) + * + * @default null + */ + readonly title: string; + /** + * The view associated with the Feature instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#view) + * + * @default null + */ + view: MapView | SceneView; + /** + * Indicates whether the feature is currently waiting for all of its content to finish loading. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#waitingForContent) + * + * @default true + */ + readonly waitingForContent: boolean; + } + + interface FeatureViewModelConstructor { + + + new(properties?: FeatureViewModelProperties): FeatureViewModel; + } + + export const FeatureViewModel: FeatureViewModelConstructor; + + interface FeatureViewModelProperties { + /** + * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#graphic) + * + * @default null + */ + graphic?: GraphicProperties; + /** + * The view associated with the Feature instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#view) + * + * @default null + */ + view?: MapViewProperties | SceneViewProperties; + } + + + export interface FeatureViewModelFormattedAttributes extends Object { + /** + * The formatted attributes specified at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) using the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property. + * + * [Read more...](global.html) + */ + global?: any; + /** + * The formatted attributes for an individual content element. This is derived from the module:esri/PopupTemplate#fields content property of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) defined as type `fields`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#formattedAttributes) + */ + content?: any; + } + interface Fullscreen extends Widget { /** * The [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) to present in fullscreen mode. @@ -42521,6 +46848,18 @@ declare namespace __esri { } interface Home extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#label) + */ + readonly label: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -42664,13 +47003,19 @@ declare namespace __esri { interface LayerList extends Widget { /** - * **Use [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) instead.** Specify the function that will create actions for [ListItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Actions are defined with the properties listed in the [Action class](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). This function must return a two-dimensional array of [Actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). + * The widget's default icon font. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#createActionsFunction) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#iconClass) */ - createActionsFunction: Function; + readonly iconClass: string; /** - * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable propeties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#label) + */ + readonly label: string; + /** + * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable properties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) */ @@ -42732,13 +47077,7 @@ declare namespace __esri { interface LayerListProperties extends WidgetProperties { /** - * **Use [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) instead.** Specify the function that will create actions for [ListItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Actions are defined with the properties listed in the [Action class](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). This function must return a two-dimensional array of [Actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#createActionsFunction) - */ - createActionsFunction?: Function; - /** - * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable propeties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. + * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable properties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) */ @@ -42772,12 +47111,6 @@ declare namespace __esri { } interface LayerListViewModel extends Accessor { - /** - * **Use [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#listItemCreatedFunction) instead.** Specify the function that will create actions for [ListItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Actions are defined with the properties listed in the [Action class](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#createActionsFunction) - */ - createActionsFunction: Function; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable propeties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * @@ -42826,12 +47159,6 @@ declare namespace __esri { export const LayerListViewModel: LayerListViewModelConstructor; interface LayerListViewModelProperties { - /** - * **Use [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#listItemCreatedFunction) instead.** Specify the function that will create actions for [ListItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Actions are defined with the properties listed in the [Action class](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-Action.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#createActionsFunction) - */ - createActionsFunction?: Function; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable propeties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * @@ -42895,6 +47222,12 @@ declare namespace __esri { * @default false */ open: boolean; + /** + * Allows you to display custom content for each ListItem in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. A common scenario for using ListItemPanel is to display a [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget within each list item. The `legend` keyword can be used in the [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#content) property of the panel to display a legend for each layer in the LayerList. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#panel) + */ + panel: ListItemPanel; /** * The parent of this item * @@ -42965,13 +47298,103 @@ declare namespace __esri { export const ListItem: ListItemConstructor; + interface ListItemPanel { + /** + * Adds a CSS class used to style a node that represents the panel. Clicking the node will open and close the panel. Typically, an icon font is used for this property. [Esri Icon Fonts](https://developers.arcgis.com/javascript/latest/guide/esri-icon-font/index.html) are automatically made available and can be used to represent this content. To use one of these provided icon fonts, you must prefix the class name with `esri-`. For example, the default icon font is `esri-icon-layer-list`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#className) + * + * @default esri-icon-layer-list + */ + className: string; + /** + * The content displayed in the ListItem panel. This can be raw text, a [Widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html) instance, an HTML Element, or an array of any of those elements. If the text `legend` is used, then an instance of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget is placed in the content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#content) + */ + content: Widget | HTMLElement | string | any[]; + /** + * The URL or data URI of an image used to represent the panel. This property will be used as a background image for the node. If neither `image` nor `className` are specified, a default icon ![default icon](https://developers.arcgis.com/javascript/latest/assets/img/guide/whats-new/41/default-action.png) will display. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#image) + */ + image: string; + /** + * The panel's parent ListItem that represents a layer in the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#listItem) + */ + listItem: ListItem; + /** + * Indicates if the panel's content is open and visible to the user. This is different from the [visible](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#visible) property, which is used for toggling the visibility of the icon used to control whether the content is expanded or collapsed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#open) + * + * @default false + */ + open: boolean; + /** + * The title of the panel. By default, this title matches the ListItem's title. Changing this value will not change the title of the ListItem in the LayerList. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#title) + */ + title: string; + /** + * Indicates if the node containing the [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#image) or [icon font](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#className) is visible to the user. Setting this value to `false` will prevent the user from toggling the visibility of the panel's content. Use [open](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#open) to programmatically set the visibility of the panel's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#visible) + * + * @default true + */ + visible: boolean; + } + + interface ListItemPanelConstructor { + /** + * This class allows you to display custom content for each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html) in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. ListItemPanel objects typically aren't constructed. Rather, they are modified using the [listItemCreatedFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCreatedFunction) property in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html) + */ + + + new(): ListItemPanel; + } + + export const ListItemPanel: ListItemPanelConstructor; + interface Legend extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#label) + */ + readonly label: string; /** * Specifies a subset of the layers to display in the legend. If this property is not set, all layers in the map will display in the legend. Objects in this array are defined with the properties listed below. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#layerInfos) */ layerInfos: LegendLayerInfos[]; + /** + * Indicates the style of the legend. The style determines the legend's layout and behavior. See the table below for a list of possible values. + * + * Value | Description + * ------|------------ + * classic | The legend has a portrait orientation. The user can scroll vertically when many elements are included in the legend's content. + * card | In wide views, the legend has a landscape orientation that allows users to scroll horizontally to view all legend elements. This style is responsive, making it ideal for mobile web apps. In smaller views, the legend collapses to occupy less space. One element is shown at a time in a card-style layout, which the user can navigate horizontally. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#style) + * + * @default classic + */ + style: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -43008,6 +47431,20 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#layerInfos) */ layerInfos?: LegendLayerInfos[]; + /** + * Indicates the style of the legend. The style determines the legend's layout and behavior. See the table below for a list of possible values. + * + * Value | Description + * ------|------------ + * classic | The legend has a portrait orientation. The user can scroll vertically when many elements are included in the legend's content. + * card | In wide views, the legend has a landscape orientation that allows users to scroll horizontally to view all legend elements. This style is responsive, making it ideal for mobile web apps. In smaller views, the legend collapses to occupy less space. One element is shown at a time in a card-style layout, which the user can navigate horizontally. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#style) + * + * @default classic + */ + style?: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -43055,6 +47492,20 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#graphic) */ graphic: Graphic; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#iconClass) + */ + iconClass: string; + /** + * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#scale) + * + * @default null + */ + scale: number; /** * Indicates whether the widget will automatically [rotate to user's direction](https://www.w3.org/TR/geolocation-API/#coordinates_interface). Set to `false` to disable this behavior. * @@ -43129,6 +47580,20 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#graphic) */ graphic?: GraphicProperties; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#iconClass) + */ + iconClass?: string; + /** + * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#scale) + * + * @default null + */ + scale?: number; /** * Indicates whether the widget will automatically [rotate to user's direction](https://www.w3.org/TR/geolocation-API/#coordinates_interface). Set to `false` to disable this behavior. * @@ -43188,6 +47653,18 @@ declare namespace __esri { } interface NavigationToggle extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#label) + */ + readonly label: string; /** * Sets the layout of the widget to either `horizontal` or `vertical`. See the table below for a list of possible values. * @@ -43415,7 +47892,13 @@ declare namespace __esri { */ readonly featureCount: number; /** - * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the poup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature). This value is `null` if no features are associated with the popup. + * Shows pagination for the popup if available. This allows the user to scroll through various [selected features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) using either arrows ![popup-pagination-arrows](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup-pagination-arrows.png) or a menu. ![popup-feature-menu](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup-pagination-menu.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#featureNavigationEnabled) + */ + featureNavigationEnabled: boolean; + /** + * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the popup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature). This value is `null` if no features are associated with the popup. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) */ @@ -43452,6 +47935,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeatureIndex) */ selectedFeatureIndex: number; + /** + * Indicates whether to display a spinner at the popup location prior to its display when it has pending promises. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#spinnerEnabled) + */ + spinnerEnabled: boolean; /** * The title of the popup. This can be set generically on the popup no matter the features that are selected. If the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature) has a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html), then the title set in the corresponding template is used here. * @@ -43633,7 +48122,13 @@ declare namespace __esri { */ dockOptions?: PopupDockOptions; /** - * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the poup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature). This value is `null` if no features are associated with the popup. + * Shows pagination for the popup if available. This allows the user to scroll through various [selected features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) using either arrows ![popup-pagination-arrows](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup-pagination-arrows.png) or a menu. ![popup-feature-menu](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup-pagination-menu.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#featureNavigationEnabled) + */ + featureNavigationEnabled?: boolean; + /** + * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the popup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature). This value is `null` if no features are associated with the popup. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) */ @@ -43664,6 +48159,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeatureIndex) */ selectedFeatureIndex?: number; + /** + * Indicates whether to display a spinner at the popup location prior to its display when it has pending promises. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#spinnerEnabled) + */ + spinnerEnabled?: boolean; /** * The title of the popup. This can be set generically on the popup no matter the features that are selected. If the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature) has a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html), then the title set in the corresponding template is used here. * @@ -43836,8 +48337,6 @@ declare namespace __esri { on(name: "trigger-action", eventHandler: PopupViewModelTriggerActionEventHandler): IHandle; - - on(name: "trigger-action", modifiers: string[], eventHandler: PopupViewModelTriggerActionEventHandler): IHandle; } interface PopupViewModelConstructor { @@ -44046,6 +48545,18 @@ declare namespace __esri { } interface Print extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#label) + */ + readonly label: string; /** * The URL of the REST endpoint of the Export Web Map Task. * @@ -44205,6 +48716,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#copyright) */ copyright: string; + /** + * Resolution in dots per inch. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#dpi) + * + * @default 96 + */ + dpi: string; /** * The output format for the printed map. **Known Values:** pdf | png32 | png8 | jpg | gif | eps | svg | svgz * @@ -44223,14 +48742,14 @@ declare namespace __esri { * Value | Description * | --- | --- * map-only | Map does not contain any layout elements. Only map image is printed. - * a3-landscape | 16.54 x 11.69 in - * a3-portrait | 11.69 x 16.54 in - * a4-landscape | 11.69 x 8.27 in - * a4-portrait | 8.27 × 11.69 in - * letter-ansi-a-landscape | 11.0 x 8.5 in - * letter-ansi-a-portrait | 8.5 x 11.0 in - * tabloid-ansi-b-landscape| 17.0 x 11.0 in - * tabloid-ansi-b-portrait | 11.0 x 17.0 in + * a3-landscape | A3 Landscape + * a3-portrait | A3 Portrait + * a4-landscape | A4 Landscape + * a4-portrait | A4 Portrait + * letter-ansi-a-landscape | Letter ANSI A Landscape + * letter-ansi-a-portrait | Letter ANSI A Portrait + * tabloid-ansi-b-landscape| Tabloid ANSI B Landscape + * tabloid-ansi-b-portrait | Tabloid ANSI B Portrait * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) @@ -44295,6 +48814,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#copyright) */ copyright?: string; + /** + * Resolution in dots per inch. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#dpi) + * + * @default 96 + */ + dpi?: string; /** * The output format for the printed map. **Known Values:** pdf | png32 | png8 | jpg | gif | eps | svg | svgz * @@ -44313,14 +48840,14 @@ declare namespace __esri { * Value | Description * | --- | --- * map-only | Map does not contain any layout elements. Only map image is printed. - * a3-landscape | 16.54 x 11.69 in - * a3-portrait | 11.69 x 16.54 in - * a4-landscape | 11.69 x 8.27 in - * a4-portrait | 8.27 × 11.69 in - * letter-ansi-a-landscape | 11.0 x 8.5 in - * letter-ansi-a-portrait | 8.5 x 11.0 in - * tabloid-ansi-b-landscape| 17.0 x 11.0 in - * tabloid-ansi-b-portrait | 11.0 x 17.0 in + * a3-landscape | A3 Landscape + * a3-portrait | A3 Portrait + * a4-landscape | A4 Landscape + * a4-portrait | A4 Portrait + * letter-ansi-a-landscape | Letter ANSI A Landscape + * letter-ansi-a-portrait | Letter ANSI A Portrait + * tabloid-ansi-b-landscape| Tabloid ANSI B Landscape + * tabloid-ansi-b-portrait | Tabloid ANSI B Portrait * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) @@ -44461,7 +48988,7 @@ declare namespace __esri { view?: MapViewProperties; } - interface Search extends Widget { + interface widgetsSearch extends Widget { /** * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) object currently selected. Can be either a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or a [locator task](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). * @@ -44498,6 +49025,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#defaultSource) */ readonly defaultSource: LocatorSource | FeatureLayerSource; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#label) + */ + readonly label: string; /** * Enables location services within the widget. ![locationEnabled](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/search-locationEnabled.png) * > The use of this property is only supported on secure origins. To use it, switch your application to a secure origin, such as HTTPS. Note that localhost is considered "potentially secure" and can be used for easy testing in browsers that supports [Window.isSecureContext](https://developer.mozilla.org/en-US/docs/Web/API/Window/isSecureContext#Browser_compatibility) (currently Chrome and Firefox). @@ -44691,19 +49230,19 @@ declare namespace __esri { suggest(value?: string): IPromise; } - interface SearchConstructor { + interface widgetsSearchConstructor { /** * The Search widget provides a way to perform search operations on [locator service(s)](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html) and/or [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html)/[feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) service feature layer(s). If using a locator with a geocoding service, the [findAddressCandidates](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm) operation is used, whereas [queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) are used on feature layers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html) */ - new(properties?: SearchProperties): Search; + new(properties?: widgetsSearchProperties): widgetsSearch; } - export const Search: SearchConstructor; + export const widgetsSearch: widgetsSearchConstructor; - interface SearchProperties extends WidgetProperties { + interface widgetsSearchProperties extends WidgetProperties { /** * The selected source's index. This value is `-1` when all sources are selected. * @@ -45031,27 +49570,15 @@ declare namespace __esri { on(name: "search-clear", eventHandler: SearchViewModelSearchClearEventHandler): IHandle; - on(name: "search-clear", modifiers: string[], eventHandler: SearchViewModelSearchClearEventHandler): IHandle; - on(name: "search-start", eventHandler: SearchViewModelSearchStartEventHandler): IHandle; - on(name: "search-start", modifiers: string[], eventHandler: SearchViewModelSearchStartEventHandler): IHandle; - on(name: "suggest-start", eventHandler: SearchViewModelSuggestStartEventHandler): IHandle; - on(name: "suggest-start", modifiers: string[], eventHandler: SearchViewModelSuggestStartEventHandler): IHandle; - on(name: "search-complete", eventHandler: SearchViewModelSearchCompleteEventHandler): IHandle; - on(name: "search-complete", modifiers: string[], eventHandler: SearchViewModelSearchCompleteEventHandler): IHandle; - on(name: "select-result", eventHandler: SearchViewModelSelectResultEventHandler): IHandle; - on(name: "select-result", modifiers: string[], eventHandler: SearchViewModelSelectResultEventHandler): IHandle; - on(name: "suggest-complete", eventHandler: SearchViewModelSuggestCompleteEventHandler): IHandle; - - on(name: "suggest-complete", modifiers: string[], eventHandler: SearchViewModelSuggestCompleteEventHandler): IHandle; } interface SearchViewModelConstructor { @@ -46538,7 +51065,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#graphic) */ - graphic: Graphic; + readonly graphic: Graphic; /** * GraphicsLayer associated with the SketchViewModel. It allows you to organize where temporary graphics are placed when the drawing is completed. * @@ -46546,19 +51073,19 @@ declare namespace __esri { */ layer: GraphicsLayer; /** - * A simple marker symbol used for drawing point geometries. + * A simple marker symbol used for representing the point geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#pointSymbol) */ pointSymbol: SimpleMarkerSymbol; /** - * A simple fill symbol used for drawing polygon geometries. + * A simple fill symbol used for representing the polygon geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polygonSymbol) */ polygonSymbol: SimpleFillSymbol; /** - * A simple line symbol used for drawing polyline geometries. + * A simple line symbol used for representing the polyline geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polylineSymbol) */ @@ -46587,14 +51114,33 @@ declare namespace __esri { */ complete(): void; /** - * Creates an instance of the requested draw action type. **Known Values:** point | multipoint | polyline | polygon + * Creates an instance of the requested draw action type. See the table below for a list of known values and type of draw action it creates. **Known Values:** point | multipoint | polyline | polygon | rectangle | circle + * + * Geometry type | Draw action instance + * ------------- | -------------------- + * point | [PointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html) + * multipoint | [MultipointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html) + * polyline | [PolylineDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html) + * polygon | [PolygonDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html) + * rectangle/square, circle/ellipse | [SegmentDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html) + * + * **Note:** Creating circle does not work in all spatial references. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) * * @param drawAction Name of the draw action tool. + * @param drawOptions Object of the drawing options for the geometry to be created. + * @param drawOptions.mode + * The drawing mode. The drawing mode only applies when creating `polygon` and `polyline` geometries. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. * */ - create(drawAction: string): void; + create(drawAction: string, drawOptions: SketchViewModelCreateDrawOptions): void; /** * Resets SketchViewModel to prepare for another create operation. Reset discards the current drawing, if called mid drawing. * @@ -46603,6 +51149,15 @@ declare namespace __esri { * */ reset(): void; + /** + * Starts an update operation for the selected geometry and fires [update-start](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:update-start) event. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) + * + * @param geometry The geometry to be updated. + * + */ + update(geometry: Geometry): void; } interface SketchViewModelConstructor { @@ -46618,12 +51173,6 @@ declare namespace __esri { export const SketchViewModel: SketchViewModelConstructor; interface SketchViewModelProperties { - /** - * Graphic representing the temporary geometry that is being drawn on the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#graphic) - */ - graphic?: GraphicProperties; /** * GraphicsLayer associated with the SketchViewModel. It allows you to organize where temporary graphics are placed when the drawing is completed. * @@ -46631,19 +51180,19 @@ declare namespace __esri { */ layer?: GraphicsLayerProperties; /** - * A simple marker symbol used for drawing point geometries. + * A simple marker symbol used for representing the point geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#pointSymbol) */ pointSymbol?: SimpleMarkerSymbolProperties; /** - * A simple fill symbol used for drawing polygon geometries. + * A simple fill symbol used for representing the polygon geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polygonSymbol) */ polygonSymbol?: SimpleFillSymbolProperties; /** - * A simple line symbol used for drawing polyline geometries. + * A simple line symbol used for representing the polyline geometry that is being drawn. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#polylineSymbol) */ @@ -46656,6 +51205,25 @@ declare namespace __esri { view?: MapViewProperties; } + + export interface SketchViewModelCreateDrawOptions extends Object { + /** + * The drawing mode. The drawing mode only applies when creating `polygon` and `polyline` geometries. **Known Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) + * + * @default hybrid + */ + mode?: string; + } + interface GeolocationPositioning { /** * The HTML5 Geolocation Position options for locating. Refer to [Geolocation API Specification](http://www.w3.org/TR/geolocation-API/#position-options) for details. @@ -46679,6 +51247,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GeolocationPositioning.html#graphic) */ graphic: Graphic; + /** + * The scale to set on the view when navigating to the position of the geolocated result. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GeolocationPositioning.html#scale) + * + * @default null + */ + scale: number; /** * The view associated with the widget. * @@ -46718,6 +51294,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GeolocationPositioning.html#graphic) */ graphic?: GraphicProperties; + /** + * The scale to set on the view when navigating to the position of the geolocated result. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GeolocationPositioning.html#scale) + * + * @default null + */ + scale?: number; /** * The view associated with the widget. * @@ -46736,6 +51320,16 @@ declare namespace __esri { * */ accessibleHandler(): Function; + /** + * Utility method used for creating CSS animation/transition functions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-widget.html#cssTransition) + * + * @param type The animation/transition type. **Possible Values:** enter | exit + * @param className The animation/transition class name. + * + */ + cssTransition(type: string, className: string): Function; /** * Utility method used for joining CSS classes. * @@ -46810,6 +51404,26 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#graphic) */ graphic: Graphic; + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#label) + */ + readonly label: string; + /** + * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#scale) + * + * @default null + */ + scale: number; /** * Indicates whether the widget is watching for new positions. * @@ -46900,6 +51514,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#graphic) */ graphic?: GraphicProperties; + /** + * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#scale) + * + * @default null + */ + scale?: number; /** * Indicates whether the widget will automatically [rotate to user's direction](https://www.w3.org/TR/geolocation-API/#coordinates_interface). Set to `false` to disable this behavior. * @@ -47181,7 +51803,7 @@ declare namespace __esri { */ max: number; /** - * The minimum of all all data values represented in the size and color visual variables. + * The minimum of all data values represented in the size and color visual variables. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-UnivariateColorSizeSlider.html#statistics) */ @@ -47214,6 +51836,22 @@ declare namespace __esri { */ id: string; + /** + * A utility method used for building the value for a widget's `class` property. This aids in simplifying CSS class setup. + * > Prior to version 4.7, there were various approaches towards setting CSS classes. These were dependant upon variables, such as whether the classes were: + * * a single static class, + * * multiple static classes, or + * * dynamic classes. + * + * + * This helper method takes all of these approaches into account and simplifies it to use one single pattern to accommodate these multiple approaches. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#classes) + * + * @param classNames The class names. + * + */ + classes(...classNames: (string | string[] | any)[]): string; /** * Destroys the widget instance. * @@ -47256,7 +51894,7 @@ declare namespace __esri { */ scheduleRender(): void; /** - * Finalizes the creation of the widget. + * **Deprecated.** Finalizes the creation of the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#startup) * @@ -47360,6 +51998,18 @@ declare namespace __esri { } interface Zoom extends Widget { + /** + * The widget's default icon font. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#iconClass) + */ + readonly iconClass: string; + /** + * The widget's default label. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#label) + */ + readonly label: string; /** * Determines the layout/orientation of the Zoom widget. **Known Values:** vertical | horizontal * @@ -47521,6 +52171,10 @@ declare namespace __esri { export type MultipointDrawActionDrawCompleteEventHandler = (event: MultipointDrawActionDrawCompleteEvent) => void; + export type MultipointDrawActionRedoEventHandler = (event: MultipointDrawActionRedoEvent) => void; + + export type MultipointDrawActionUndoEventHandler = (event: MultipointDrawActionUndoEvent) => void; + export type MultipointDrawActionVertexAddEventHandler = (event: MultipointDrawActionVertexAddEvent) => void; export type MultipointDrawActionVertexRemoveEventHandler = (event: MultipointDrawActionVertexRemoveEvent) => void; @@ -47541,6 +52195,10 @@ declare namespace __esri { export type PolygonDrawActionDrawCompleteEventHandler = (event: PolygonDrawActionDrawCompleteEvent) => void; + export type PolygonDrawActionRedoEventHandler = (event: PolygonDrawActionRedoEvent) => void; + + export type PolygonDrawActionUndoEventHandler = (event: PolygonDrawActionUndoEvent) => void; + export type PolygonDrawActionVertexAddEventHandler = (event: PolygonDrawActionVertexAddEvent) => void; export type PolygonDrawActionVertexRemoveEventHandler = (event: PolygonDrawActionVertexRemoveEvent) => void; @@ -47549,6 +52207,10 @@ declare namespace __esri { export type PolylineDrawActionDrawCompleteEventHandler = (event: PolylineDrawActionDrawCompleteEvent) => void; + export type PolylineDrawActionRedoEventHandler = (event: PolylineDrawActionRedoEvent) => void; + + export type PolylineDrawActionUndoEventHandler = (event: PolylineDrawActionUndoEvent) => void; + export type PolylineDrawActionVertexAddEventHandler = (event: PolylineDrawActionVertexAddEvent) => void; export type PolylineDrawActionVertexRemoveEventHandler = (event: PolylineDrawActionVertexRemoveEvent) => void; @@ -47559,14 +52221,20 @@ declare namespace __esri { export type SceneLayerLayerviewDestroyEventHandler = (event: SceneLayerLayerviewDestroyEvent) => void; + export type SceneViewBlurEventHandler = (event: SceneViewBlurEvent) => void; + export type SceneViewClickEventHandler = (event: SceneViewClickEvent) => void; export type SceneViewDoubleClickEventHandler = (event: SceneViewDoubleClickEvent) => void; export type SceneViewDragEventHandler = (event: SceneViewDragEvent) => void; + export type SceneViewFocusEventHandler = (event: SceneViewFocusEvent) => void; + export type SceneViewHoldEventHandler = (event: SceneViewHoldEvent) => void; + export type SceneViewImmediateClickEventHandler = (event: SceneViewImmediateClickEvent) => void; + export type SceneViewKeyDownEventHandler = (event: SceneViewKeyDownEvent) => void; export type SceneViewKeyUpEventHandler = (event: SceneViewKeyUpEvent) => void; @@ -47601,6 +52269,12 @@ declare namespace __esri { export type SearchViewModelSuggestStartEventHandler = (event: SearchViewModelSuggestStartEvent) => void; + export type SegmentDrawActionCursorUpdateEventHandler = (event: SegmentDrawActionCursorUpdateEvent) => void; + + export type SegmentDrawActionDrawCompleteEventHandler = (event: SegmentDrawActionDrawCompleteEvent) => void; + + export type SegmentDrawActionVertexAddEventHandler = (event: SegmentDrawActionVertexAddEvent) => void; + export type StreamLayerLayerviewCreateEventHandler = (event: StreamLayerLayerviewCreateEvent) => void; export type StreamLayerLayerviewDestroyEventHandler = (event: StreamLayerLayerviewDestroyEvent) => void; @@ -47696,9 +52370,14 @@ declare module "esri/core/Collection" { export = Collection; } -declare module "esri/core/workers/Connection" { - import Connection = __esri.Connection; - export = Connection; +declare module "esri/core/Handles" { + import Handles = __esri.Handles; + export = Handles; +} + +declare module "esri/core/HandleOwner" { + import HandleOwner = __esri.HandleOwner; + export = HandleOwner; } declare module "esri/geometry/Circle" { @@ -47721,6 +52400,11 @@ declare module "esri/geometry/HeightModelInfo" { export = HeightModelInfo; } +declare module "esri/geometry/Mesh" { + import Mesh = __esri.Mesh; + export = Mesh; +} + declare module "esri/geometry/Multipoint" { import Multipoint = __esri.Multipoint; export = Multipoint; @@ -47751,6 +52435,31 @@ declare module "esri/geometry/SpatialReference" { export = SpatialReference; } +declare module "esri/geometry/support/GeographicTransformation" { + import GeographicTransformation = __esri.GeographicTransformation; + export = GeographicTransformation; +} + +declare module "esri/geometry/support/GeographicTransformationStep" { + import GeographicTransformationStep = __esri.GeographicTransformationStep; + export = GeographicTransformationStep; +} + +declare module "esri/geometry/support/MeshComponent" { + import MeshComponent = __esri.MeshComponent; + export = MeshComponent; +} + +declare module "esri/geometry/support/ValueMeshColor" { + import ValueMeshColor = __esri.ValueMeshColor; + export = ValueMeshColor; +} + +declare module "esri/geometry/support/ImageMeshColor" { + import ImageMeshColor = __esri.ImageMeshColor; + export = ImageMeshColor; +} + declare module "esri/identity/Credential" { import Credential = __esri.Credential; export = Credential; @@ -47921,6 +52630,11 @@ declare module "esri/layers/support/Domain" { export = Domain; } +declare module "esri/layers/support/ElevationSampler" { + import ElevationSampler = __esri.ElevationSampler; + export = ElevationSampler; +} + declare module "esri/layers/support/Field" { import Field = __esri.Field; export = Field; @@ -47986,6 +52700,11 @@ declare module "esri/layers/support/RasterFunction" { export = RasterFunction; } +declare module "esri/layers/support/Relationship" { + import Relationship = __esri.Relationship; + export = Relationship; +} + declare module "esri/layers/support/Sublayer" { import Sublayer = __esri.Sublayer; export = Sublayer; @@ -48256,6 +52975,21 @@ declare module "esri/symbols/callouts/LineCallout3D" { export = LineCallout3D; } +declare module "esri/symbols/edges/Edges3D" { + import Edges3D = __esri.Edges3D; + export = Edges3D; +} + +declare module "esri/symbols/edges/SolidEdges3D" { + import SolidEdges3D = __esri.SolidEdges3D; + export = SolidEdges3D; +} + +declare module "esri/symbols/edges/SketchEdges3D" { + import SketchEdges3D = __esri.SketchEdges3D; + export = SketchEdges3D; +} + declare module "esri/tasks/ClosestFacilityTask" { import ClosestFacilityTask = __esri.ClosestFacilityTask; export = ClosestFacilityTask; @@ -48546,6 +53280,11 @@ declare module "esri/tasks/workflow/WorkflowTask" { export = WorkflowTask; } +declare module "esri/views/GroundView" { + import GroundView = __esri.GroundView; + export = GroundView; +} + declare module "esri/views/MapView" { import MapView = __esri.MapView; export = MapView; @@ -48621,6 +53360,11 @@ declare module "esri/views/2d/draw/Draw" { export = Draw; } +declare module "esri/views/2d/draw/DrawAction" { + import DrawAction = __esri.DrawAction; + export = DrawAction; +} + declare module "esri/views/2d/draw/PointDrawAction" { import PointDrawAction = __esri.PointDrawAction; export = PointDrawAction; @@ -48641,11 +53385,21 @@ declare module "esri/views/2d/draw/MultipointDrawAction" { export = MultipointDrawAction; } +declare module "esri/views/2d/draw/SegmentDrawAction" { + import SegmentDrawAction = __esri.SegmentDrawAction; + export = SegmentDrawAction; +} + declare module "esri/webmap/InitialViewProperties" { import InitialViewProperties = __esri.InitialViewProperties; export = InitialViewProperties; } +declare module "esri/webscene/ApplicationProperties" { + import ApplicationProperties = __esri.ApplicationProperties; + export = ApplicationProperties; +} + declare module "esri/webscene/Environment" { import Environment = __esri.Environment; export = Environment; @@ -48671,6 +53425,31 @@ declare module "esri/webscene/Slide" { export = Slide; } +declare module "esri/webscene/applicationProperties/Search" { + import Search = __esri.Search; + export = Search; +} + +declare module "esri/webscene/applicationProperties/SearchLayer" { + import SearchLayer = __esri.SearchLayer; + export = SearchLayer; +} + +declare module "esri/webscene/applicationProperties/SearchLayerField" { + import SearchLayerField = __esri.SearchLayerField; + export = SearchLayerField; +} + +declare module "esri/webscene/applicationProperties/Viewing" { + import Viewing = __esri.Viewing; + export = Viewing; +} + +declare module "esri/widgets/AreaMeasurement3D" { + import AreaMeasurement3D = __esri.AreaMeasurement3D; + export = AreaMeasurement3D; +} + declare module "esri/widgets/Attribution" { import Attribution = __esri.Attribution; export = Attribution; @@ -48691,6 +53470,11 @@ declare module "esri/widgets/ColorSlider" { export = ColorSlider; } +declare module "esri/widgets/CoordinateConversion" { + import CoordinateConversion = __esri.CoordinateConversion; + export = CoordinateConversion; +} + declare module "esri/widgets/Compass" { import Compass = __esri.Compass; export = Compass; @@ -48711,6 +53495,11 @@ declare module "esri/widgets/Expand" { export = Expand; } +declare module "esri/widgets/Feature" { + import Feature = __esri.Feature; + export = Feature; +} + declare module "esri/widgets/Fullscreen" { import Fullscreen = __esri.Fullscreen; export = Fullscreen; @@ -48757,8 +53546,8 @@ declare module "esri/widgets/ScaleBar" { } declare module "esri/widgets/Search" { - import Search = __esri.Search; - export = Search; + import widgetsSearch = __esri.widgetsSearch; + export = widgetsSearch; } declare module "esri/widgets/SizeSlider" { @@ -48786,6 +53575,11 @@ declare module "esri/widgets/Zoom" { export = Zoom; } +declare module "esri/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel" { + import AreaMeasurement3DViewModel = __esri.AreaMeasurement3DViewModel; + export = AreaMeasurement3DViewModel; +} + declare module "esri/widgets/Attribution/AttributionViewModel" { import AttributionViewModel = __esri.AttributionViewModel; export = AttributionViewModel; @@ -48796,6 +53590,11 @@ declare module "esri/widgets/BasemapGallery/BasemapGalleryViewModel" { export = BasemapGalleryViewModel; } +declare module "esri/widgets/BasemapGallery/support/BasemapGalleryItem" { + import BasemapGalleryItem = __esri.BasemapGalleryItem; + export = BasemapGalleryItem; +} + declare module "esri/widgets/BasemapGallery/support/LocalBasemapsSource" { import LocalBasemapsSource = __esri.LocalBasemapsSource; export = LocalBasemapsSource; @@ -48816,16 +53615,31 @@ declare module "esri/widgets/Compass/CompassViewModel" { export = CompassViewModel; } +declare module "esri/widgets/CoordinateConversion/CoordinateConversionViewModel" { + import CoordinateConversionViewModel = __esri.CoordinateConversionViewModel; + export = CoordinateConversionViewModel; +} + declare module "esri/widgets/Directions/DirectionsViewModel" { import DirectionsViewModel = __esri.DirectionsViewModel; export = DirectionsViewModel; } +declare module "esri/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel" { + import DirectLineMeasurement3DViewModel = __esri.DirectLineMeasurement3DViewModel; + export = DirectLineMeasurement3DViewModel; +} + declare module "esri/widgets/Expand/ExpandViewModel" { import ExpandViewModel = __esri.ExpandViewModel; export = ExpandViewModel; } +declare module "esri/widgets/Feature/FeatureViewModel" { + import FeatureViewModel = __esri.FeatureViewModel; + export = FeatureViewModel; +} + declare module "esri/widgets/Fullscreen/FullscreenViewModel" { import FullscreenViewModel = __esri.FullscreenViewModel; export = FullscreenViewModel; @@ -48846,6 +53660,11 @@ declare module "esri/widgets/LayerList/ListItem" { export = ListItem; } +declare module "esri/widgets/LayerList/ListItemPanel" { + import ListItemPanel = __esri.ListItemPanel; + export = ListItemPanel; +} + declare module "esri/widgets/Locate/LocateViewModel" { import LocateViewModel = __esri.LocateViewModel; export = LocateViewModel; @@ -49031,6 +53850,11 @@ declare module "esri/core/requireUtils" { export = requireUtils; } +declare module "esri/core/scheduling" { + import scheduling = __esri.scheduling; + export = scheduling; +} + declare module "esri/core/urlUtils" { import urlUtils = __esri.urlUtils; export = urlUtils; @@ -49046,11 +53870,21 @@ declare module "esri/core/workers" { export = workers; } +declare module "esri/core/workers/Connection" { + import Connection = __esri.Connection; + export = Connection; +} + declare module "esri/core/accessorSupport/decorators" { import decorators = __esri.decorators; export = decorators; } +declare module "esri/geometry/coordinateFormatter" { + import coordinateFormatter = __esri.coordinateFormatter; + export = coordinateFormatter; +} + declare module "esri/geometry/geometryEngine" { import geometryEngine = __esri.geometryEngine; export = geometryEngine; @@ -49061,11 +53895,21 @@ declare module "esri/geometry/geometryEngineAsync" { export = geometryEngineAsync; } +declare module "esri/geometry/projection" { + import projection = __esri.projection; + export = projection; +} + declare module "esri/geometry/support/jsonUtils" { import jsonUtils = __esri.jsonUtils; export = jsonUtils; } +declare module "esri/geometry/support/meshUtils" { + import meshUtils = __esri.meshUtils; + export = meshUtils; +} + declare module "esri/geometry/support/normalizeUtils" { import normalizeUtils = __esri.normalizeUtils; export = normalizeUtils; @@ -49171,9 +54015,14 @@ declare module "esri/widgets/support/widget" { export = widget; } -declare module "esri/widgets/BasemapGallery/support/BasemapGalleryItem" { - import BasemapGalleryItem = __esri.BasemapGalleryItem; - export = BasemapGalleryItem; +declare module "esri/widgets/CoordinateConversion/support/Format" { + import Format = __esri.Format; + export = Format; +} + +declare module "esri/widgets/CoordinateConversion/support/Conversion" { + import Conversion = __esri.Conversion; + export = Conversion; } @@ -49185,6 +54034,7 @@ declare module "esri/geometry" { export import Polyline = __esri.Polyline; export import SpatialReference = __esri.SpatialReference; export import ScreenPoint = __esri.ScreenPoint; + export import Mesh = __esri.Mesh; - export type Geometry = Extent | Multipoint | Point | Polygon | Polyline; + export type Geometry = Extent | Multipoint | Point | Polygon | Polyline | Mesh; } diff --git a/types/arcgis-js-api/v3/index.d.ts b/types/arcgis-js-api/v3/index.d.ts index 391dfb6e0a..e4161412b5 100644 --- a/types/arcgis-js-api/v3/index.d.ts +++ b/types/arcgis-js-api/v3/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for ArcGIS API for JavaScript 3.23 +// Type definitions for ArcGIS API for JavaScript 3.24 // Project: https://developers.arcgis.com/javascript/3/ // Definitions by: Esri +// Bjorn Svensson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "esri" { @@ -30,6 +31,7 @@ declare module "esri" { import LayerSource = require("esri/layers/LayerSource"); import GraphicsLayer = require("esri/layers/GraphicsLayer"); import SpatialReference = require("esri/SpatialReference"); + import GeographicTransformationStep = require("esri/geometry/GeographicTransformationStep"); import Layer = require("esri/layers/layer"); import SimpleFillSymbol = require("esri/symbols/SimpleFillSymbol"); import ArcGISImageServiceLayer = require("esri/layers/ArcGISImageServiceLayer"); @@ -42,6 +44,9 @@ declare module "esri" { import FillSymbol = require("esri/symbols/FillSymbol"); import PrintTemplate = require("esri/tasks/PrintTemplate"); import QueryTask = require("esri/tasks/QueryTask"); + import DataProviderGE = require("esri/dijit/geoenrichment/ReportPlayer/DataProviderGE"); + import PlayerResizeModes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes"); + import PlayerThemes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerThemes"); import TextSymbol = require("esri/symbols/TextSymbol"); import StandardGeographyQueryTask = require("esri/tasks/geoenrichment/StandardGeographyQueryTask"); import WCSConnection = require("esri/layers/WCSConnection"); @@ -943,6 +948,8 @@ declare module "esri" { useMapTime?: boolean; /** Initial visibility of the layer. */ visible?: boolean; + /** Indicates if the layer will enable WebGL for rendering. */ + webglEnabled?: boolean; } export interface FeatureLayerStatisticsOptions { /** The feature layer that will be the source for calculating statistics. */ @@ -1152,6 +1159,16 @@ declare module "esri" { /** Scale to zoom to when geocoder does not return an extent. */ zoomScale?: number; } + export interface GeographicTransformationOptions { + /** Geographic transformation steps. */ + steps?: GeographicTransformationStep[]; + } + export interface GeographicTransformationStepOptions { + /** The well-known id (wkid) that represents a known geographic transformation. */ + wkid?: number; + /** The well-known text (wkt) that represents a known geographic transformation. */ + wkt?: string; + } export interface GeometryLocationProviderOptions { /** The attribute field in the graphic object that contains the JSON string representing the geometry. */ geometryField: string; @@ -1475,6 +1492,8 @@ declare module "esri" { sliderStyle?: string; /** When true, for Apple computers with a trackpad or magic mouse use, swipe pans instead of zooming. */ smartNavigation?: boolean; + /** Indicates whether to enable WebGL rendering for FeatureLayers in the map. */ + webglEnabled?: boolean; /** When true, supports continuous pan across the dateline. */ wrapAround180?: boolean; /** Initial zoom level of the map. */ @@ -1876,6 +1895,16 @@ declare module "esri" { /** Stores positions represented as numbers that fall between minimum and maximum. */ values: number[]; } + export interface ReportPlayerOptions { + /** Specifies which export options are available for the report. */ + dataProvider?: DataProviderGE; + /** Indicate whether to display the report in slide view or full screen, defaults to false which is full view. */ + isSlidesView?: boolean; + /** Specifies the resize mode of the ReportPlayer. */ + resizeMode?: PlayerResizeModes; + /** Specifies the theme of the ReportPlayer. */ + theme?: PlayerThemes; + } export interface RingBufferOptions { /** The radii to use to create ring buffers */ radii: number[]; @@ -2553,6 +2582,8 @@ declare module "esri/IdentityManagerBase" { class IdentityManagerBase { /** The suggested lifetime of the token in minutes. */ tokenValidity: number; + /** If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. */ + useSignInPage: boolean; /** * Returns the credential (via Deferred) if the user has already signed in to access the given resource. * @param resUrl The resource URL. @@ -2625,7 +2656,7 @@ declare module "esri/IdentityManagerBase" { */ setProtocolErrorHandler(handlerFunction: Function): void; /** - * When accessing secure resources from ArcGIS.com or one of its sub-domains the IdentityManager redirects the user to the ArcGIS.com sign-in page. + * If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. * @param handlerFunction When called, the function passed to setRedirectionHandler receives an object containing redirection properties. */ setRedirectionHandler(handlerFunction: Function): void; @@ -3736,9 +3767,11 @@ declare module "esri/dijit/ClassedColorSlider" { startup(): void; /** Fires when the ClassedColorSlider widget properties change. */ on(type: "change", listener: (event: { breakInfos: any; target: ClassedColorSlider }) => void): esri.Handle; - /** Fires when minValue or maxValue of the ClassedColorSlider changes. */ + /** Fires during slide and slide stop, and when a handle or the minValue or maxValue of the slider are updated via text box. */ + on(type: "data-change", listener: (event: { breakInfos: any[]; maxValue: number; minValue: number; target: ClassedColorSlider }) => void): esri.Handle; + /** Fires when minValue or maxValue are updated via textbox. */ on(type: "data-value-change", listener: (event: { breakInfos: any; maxValue: number; minValue: number; target: ClassedColorSlider }) => void): esri.Handle; - /** Fires when a ClassedColorSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { breakInfos: any; target: ClassedColorSlider }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; } @@ -3789,9 +3822,11 @@ declare module "esri/dijit/ClassedSizeSlider" { constructor(params: esri.ClassedSizeSliderOptions, srcNodeRef: Node | string); /** Fires when ClassedSizeSlider changes. */ on(type: "change", listener: (event: { breakInfos: any; target: ClassedSizeSlider }) => void): esri.Handle; - /** Fires when minValue or maxValue of the ClassedSizeSlider changes. */ + /** Fires during slide and slide stop, and when a handle or the minValue or maxValue of the slider are updated via text box. */ + on(type: "data-change", listener: (event: { breakInfos: any[]; maxValue: number; minValue: number; target: ClassedSizeSlider }) => void): esri.Handle; + /** Fires when minValue or maxValue are updated via textbox. */ on(type: "data-value-change", listener: (event: { breakInfos: any; maxValue: number; minValue: number; target: ClassedSizeSlider }) => void): esri.Handle; - /** Fires when a ClassedSizeSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { breakInfos: any; target: ClassedSizeSlider }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; } @@ -3850,9 +3885,11 @@ declare module "esri/dijit/ColorInfoSlider" { startup(): void; /** Fires when ColorInfoSlider changes. */ on(type: "change", listener: (event: { colorInfo: any; target: ColorInfoSlider }) => void): esri.Handle; - /** Fires when minValue or maxValue of the ColorInfoSlider changes. */ + /** Fires during slide and slide stop, and when a handle or the minValue or maxValue of the ColorInfoSlider are updated via text box. */ + on(type: "data-change", listener: (event: { colorInfo: any; maxValue: number; minValue: number; target: ColorInfoSlider }) => void): esri.Handle; + /** Fires when minValue or maxValue of the ColorInfoSlider are updated via text box. */ on(type: "data-value-change", listener: (event: { colorInfo: any; maxValue: number; minValue: number; target: ColorInfoSlider }) => void): esri.Handle; - /** Fires when a ColorInfoSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { colorInfo: any; target: ColorInfoSlider }) => void): esri.Handle; /** Fires when the zoom state changes. */ on(type: "zoomed", listener: (event: { zoomed: boolean; target: ColorInfoSlider }) => void): esri.Handle; @@ -4069,7 +4106,7 @@ declare module "esri/dijit/ElevationProfile" { import esri = require("esri"); import Geometry = require("esri/geometry/Geometry"); - /** (Currently in beta)The Elevation Profile widget allows a user to create an elevation profile based on a polyline geometry input parameter or existing features.NOTE: Currently there is a known issue when creating an elevation profile that crosses the international dateline multiple times. */ + /** (Currently in beta)The Elevation Profile widget allows a user to create an elevation profile based on a polyline geometry input parameter or existing features. */ class ElevationProfile { /** The measurement unit of the polyline geometry. */ measureUnits: string; @@ -4452,7 +4489,7 @@ declare module "esri/dijit/HeatmapSlider" { constructor(params: esri.HeatmapSliderOptions, srcNodeRef: Node | string); /** Fires when HeatmapSlider changes. */ on(type: "change", listener: (event: { colorStops: any; target: HeatmapSlider }) => void): esri.Handle; - /** Fires when HeatmapSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { colorStops: any; target: HeatmapSlider }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; } @@ -5112,7 +5149,7 @@ declare module "esri/dijit/OpacitySlider" { on(type: "change", listener: (event: { opacityInfo: any; target: OpacitySlider }) => void): esri.Handle; /** Fires when minValue or maxValue of the OpacitySlider changes. */ on(type: "data-value-change", listener: (event: { maxValue: number; minValue: number; opacityInfo: any; target: OpacitySlider }) => void): esri.Handle; - /** Fires when an OpacitySlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { opacityInfo: any; target: OpacitySlider }) => void): esri.Handle; /** Fires when the zoom state changes. */ on(type: "zoomed", listener: (event: { zoomed: boolean; target: OpacitySlider }) => void): esri.Handle; @@ -5159,7 +5196,7 @@ declare module "esri/dijit/Popup" { import Graphic = require("esri/graphic"); import LineSymbol = require("esri/symbols/LineSymbol"); import Point = require("esri/geometry/Point"); - import MarkerSymbol = require("esri/symbols/MarkerSymbol"); + import SimpleMarkerSymbol = require("esri/symbols/SimpleMarkerSymbol"); /** The Popup class is an implementation of InfoWindow that inherits from InfoWindowBase to provide additional capabilities. */ class Popup extends InfoWindowBase { @@ -5194,7 +5231,7 @@ declare module "esri/dijit/Popup" { /** Specify the margin (in pixels) to leave at the top of the popup window when it is maximized. */ marginTop: number; /** Define the marker symbol used to highlight point features. */ - markerSymbol: MarkerSymbol; + markerSymbol: SimpleMarkerSymbol; /** Specify the x-offset (in pixels) used when positioning the popup. */ offsetX: number; /** Specify the y-offset (in pixels) used when positioning the popup. */ @@ -5700,9 +5737,11 @@ declare module "esri/dijit/SizeInfoSlider" { startup(): void; /** Fires when the SizeInfoSlider properties change. */ on(type: "change", listener: (event: { sizeInfo: any; target: SizeInfoSlider }) => void): esri.Handle; + /** Fires during slide and slide stop, and when a handle or the minValue or maxValue of the SizeInfoSlider are updated via text box. */ + on(type: "data-change", listener: (event: { maxValue: number; minValue: number; sizeInfo: any; target: SizeInfoSlider }) => void): esri.Handle; /** Fires when minValue or maxValue of the SizeInfoSlider changes. */ on(type: "data-value-change", listener: (event: { maxValue: number; minValue: number; sizeInfo: any; target: SizeInfoSlider }) => void): esri.Handle; - /** Fires when a SizeInfoSlider handle is moved. */ + /** Fires on slide stop and when a handle is updated via textbox. */ on(type: "handle-value-change", listener: (event: { sizeInfo: any; target: SizeInfoSlider }) => void): esri.Handle; /** Fires when the zoom state changes. */ on(type: "zoomed", listener: (event: { zoomed: boolean; target: SizeInfoSlider }) => void): esri.Handle; @@ -7454,6 +7493,94 @@ declare module "esri/dijit/geoenrichment/InfographicsOptionsItem" { export = InfographicsOptionsItem; } +declare module "esri/dijit/geoenrichment/ReportPlayer/DataProviderGE" { + import PlayerCommands = require("esri/dijit/geoenrichment/ReportPlayer/PlayerCommands"); + + /** Data Provider for the ReportPlayer which allows you to specify which export options are available when running the report. */ + class DataProviderGE { + /** + * Registers a export option which can be performed. + * @param playerCommand The export option to register to make available to the Report Player. + * @param label The display name of the export option. + */ + registerCommand(playerCommand: PlayerCommands, label?: string): void; + } + export = DataProviderGE; +} + +declare module "esri/dijit/geoenrichment/ReportPlayer/PlayerCommands" { + /** Enumerator of available export options that are available for the Report Player. */ + class PlayerCommands { + /** Generates a stand-alone HTML file which displays dynamic content, including interactive map and infographic panels for the run infographic report. */ + static DYNAMIC_HTML: any; + /** Generates a stand-alone HTML file without the dynamic interactivity of the DYNAMIC_HTML option for the run infographic report. */ + static HTML: any; + /** Generates an image of the run infographic report. */ + static IMAGE: any; + /** Generates a PDF file of the run infographic report. */ + static PDF: any; + /** Displays a print dialog for the run infographic report for printing directly from the web browser. */ + static PRINT: any; + } + export = PlayerCommands; +} + +declare module "esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes" { + /** Enumerator of available player resize mode options for the Report Player widget. */ + class PlayerResizeModes { + /** The Report Player will be auto-resizable for the pagination view, the size of the player will change to fit the content. */ + static AUTO: any; + /** The Report Player will be stretched and constrained to the browser window size. */ + static FIT_WINDOW: any; + /** The Report Player dimensions (height and width) will need to be set manually in CSS. */ + static MANUAL: any; + } + export = PlayerResizeModes; +} + +declare module "esri/dijit/geoenrichment/ReportPlayer/PlayerThemes" { + /** Enumerator of available theme options for displaying the Report Player. */ + class PlayerThemes { + /** Report Player will display in a dark theme. */ + static DARK: any; + /** Report Player will display in a light theme. */ + static LIGHT: any; + } + export = PlayerThemes; +} + +declare module "esri/dijit/geoenrichment/ReportPlayer/ReportPlayer" { + import esri = require("esri"); + import DataProviderGE = require("esri/dijit/geoenrichment/ReportPlayer/DataProviderGE"); + import PlayerResizeModes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes"); + import PlayerThemes = require("esri/dijit/geoenrichment/ReportPlayer/PlayerThemes"); + + /** The ReportPlayer widget runs infographic report templates for a provided analysis area. */ + class ReportPlayer { + /** Data Provider for the ReportPlayer which allows you to specify which export options are available when running the report. */ + dataProvider: DataProviderGE; + /** Indicate whether to display the report in slide view or full screen, defaults to false which is full view. */ + isSlidesView: boolean; + /** Specifies the resize mode of the ReportPlayer. */ + resizeModes: PlayerResizeModes; + /** Specifies the theme of the ReportPlayer. */ + theme: PlayerThemes; + /** + * Creates a new ReportPlayer dijit using the given DOM node. + * @param params Various parameters that can be used to configure the ReportPlayer. + * @param srcNode Reference or id of the HTML element where the widget should be rendered. + */ + constructor(params: esri.ReportPlayerOptions, srcNode?: Node | string); + /** + * Generates the report for the supplied parameters. + * @param dataProviderParams See the object specifications table below for the structure of the dataProviderParams object. + * @param playParams See the object specifications table below for the structure of the playParams object. + */ + playReport(dataProviderParams: any, playParams?: any): any; + } + export = ReportPlayer; +} + declare module "esri/dijit/util/busyIndicator" { /** This module provides the ability to create a busy indicator for a target. */ var busyIndicator: { @@ -7612,6 +7739,47 @@ declare module "esri/geometry/Extent" { export = Extent; } +declare module "esri/geometry/GeographicTransformation" { + import esri = require("esri"); + import GeographicTransformationStep = require("esri/geometry/GeographicTransformationStep"); + + /** Projecting your data between coordinate systems sometimes requires transforming between geographic coordinate systems. */ + class GeographicTransformation { + /** Geographic transformation steps. */ + steps: GeographicTransformationStep[]; + /** + * Creates a new GeographicTransformation object. + * @param params See options descriptions for further information. + */ + constructor(params?: esri.GeographicTransformationOptions); + /** Returns the inverse of the geographic transformation, calling this method or null if the transformation is not invertible. */ + getInverse(): GeographicTransformation; + } + export = GeographicTransformation; +} + +declare module "esri/geometry/GeographicTransformationStep" { + import esri = require("esri"); + + /** Represents a step in the process of transforming coordinates from one geographic coordinate system to another. */ + class GeographicTransformationStep { + /** Indicates whether the geographic transformation is inverted. */ + isInverse: boolean; + /** The well-known id (wkid) that represents a known geographic transformation. */ + wkid: number; + /** The well-known text (wkt) hat represents a known geographic transformation. */ + wkt: string; + /** + * Creates a new GeographicTransformationStep object. + * @param params See the params table for additional information. + */ + constructor(params?: esri.GeographicTransformationStepOptions); + /** Returns the inverse of the geographic transformation calling this method or null if the transformation is not invertible. */ + getInverse(): GeographicTransformationStep; + } + export = GeographicTransformationStep; +} + declare module "esri/geometry/Geometry" { import SpatialReference = require("esri/SpatialReference"); @@ -7987,6 +8155,77 @@ declare module "esri/geometry/ScreenPoint" { export = ScreenPoint; } +declare module "esri/geometry/coordinateFormatter" { + import SpatialReference = require("esri/SpatialReference"); + import Point = require("esri/geometry/Point"); + + /** This module converts between points and formatted coordinate notation strings such as: decimal degrees degrees, minutes, and secondsU.S. */ + var coordinateFormatter: { + /** + * Parses coordinates in latitude/longitude notation, and returns a Point representing that location. + * @param coordinates The latitude/longitude notation string for the coordinates. + * @param spatialReference A spatial reference for a geographic coordinate system that defines the datum and ellipsoid referenced by the latitude-longitude coordinates. + */ + fromLatitudeLongitude(coordinates: string, spatialReference?: SpatialReference): Point; + /** + * Parses coordinates in Military Grid Reference System (MGRS) notation, and returns a Point representing that location. + * @param coordinates The MGRS notation string for the coordinates. + * @param spatialReference A spatial reference for a geographic coordinate system that defines the datum and ellipsoid referenced by the MGRS coordinates. + * @param conversionMode The mode used by the given MGRS coordinates. + */ + fromMgrs(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point; + /** + * Parses coordinates in United States National Grid (USNG) notation, and returns a Point representing that location. + * @param coordinates The USNG notation string for the coordinates. + * @param spatialReference A spatial reference for a geographic coordinate system that defines the datum and ellipsoid referenced by the USNG coordinates. + */ + fromUsng(coordinates: string, spatialReference?: SpatialReference): Point; + /** + * Parses coordinates in Universal Transverse Mercator (UTM) notation, and returns a Point representing that location. + * @param coordinates The UTM notation string for the coordinates. + * @param spatialReference A spatial reference for a geographic coordinate system that defines the datum and ellipsoid referenced by the UTM coordinates. + * @param conversionMode The latitude notation scheme used by the given UTM coordinates, either a latitudinal band, or a hemisphere designator. + */ + fromUtm(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point; + /** Indicates if all dependencies of this module have been loaded. */ + isLoaded(): boolean; + /** Indicates if this module is supported in the current browser. */ + isSupported(): boolean; + /** Loads this module's dependencies. */ + load(): any; + /** + * Returns formatted coordinates in latitude/longitude notation representing the given point's location. + * @param point The location to be represented as a formatted latitude/longitude string. + * @param format The mode to use when formatting the latitude/longitude string. + * @param decimalPlaces The number of decimal places to use, it should be an integer from 0 to 16. + */ + toLatitudeLongitude(point: Point, format: string, decimalPlaces?: number): string; + /** + * Returns formatted coordinates in Military Grid Reference System (MGRS) notation representing the given point's location. + * @param point The location to be represented in MGRS notation. + * @param conversionMode The mode to use for the returned MGRS notation string. + * @param precision The precision with which to represent the coordinates. + * @param addSpaces Indicates whether the generated strings contain no spaces. + */ + toMgrs(point: Point, conversionMode: string, precision?: number, addSpaces?: boolean): string; + /** + * Returns formatted coordinates in United States National Grid (USNG) notation representing the given point's location. + * @param point The location to be represented in USNG notation. + * @param precision The precision with which to represent the coordinates. + * @param addSpaces Indicates whether the generated strings contain no spaces. + */ + toUsng(point: Point, precision?: number, addSpaces?: boolean): string; + /** + * Returns formatted coordinates in Universal Transverse Mercator (UTM) notation representing the given point's location. + * @param point The location to be represented in UTM notation. + * @param conversionMode The latitude notation scheme to use in the returned UTM notation string, either a latitudinal band, or a hemisphere designator. + * @param addSpaces Indicates whether the generated strings contain no spaces. + */ + toUtm(point: Point, conversionMode: string, addSpaces?: boolean): string; + }; + export = coordinateFormatter; +} + declare module "esri/geometry/geodesicUtils" { import Polygon = require("esri/geometry/Polygon"); import Geometry = require("esri/geometry/Geometry"); @@ -8562,6 +8801,45 @@ declare module "esri/geometry/normalizeUtils" { export = normalizeUtils; } +declare module "esri/geometry/projection" { + import SpatialReference = require("esri/SpatialReference"); + import Extent = require("esri/geometry/Extent"); + import GeographicTransformation = require("esri/geometry/GeographicTransformation"); + import Geometry = require("esri/geometry/Geometry"); + + /** A client-side projection engine for converting geometries from one SpatialReference to another. */ + var projection: { + /** + * Gets the default geographic transformation used to convert the geometry from the input spatial reference to the output spatial reference. + * @param inSpatialReference The input spatial reference from which to project geometries. + * @param outSpatialReference The spatial reference to which you are converting the geometries. + * @param extent An extent used to determine the suitability of the returned transformation. + */ + getTransformation(inSpatialReference: SpatialReference, outSpatialReference: SpatialReference, extent?: Extent): GeographicTransformation; + /** + * Returns a list of all geographic transformations suitable to convert geometries from the input spatial reference to the specified output spatial reference. + * @param inSpatialReference The spatial reference that the geometries are currently using. + * @param outSpatialReference The spatial reference to which you are converting the geometries to. + * @param extent An extent used to determine the suitability of the returned transformations. + */ + getTransformations(inSpatialReference: SpatialReference, outSpatialReference: SpatialReference, extent?: Extent): GeographicTransformation[]; + /** Indicates if all dependencies of this module have been loaded. */ + isLoaded(): boolean; + /** Indicates if this module is supported in the browser. */ + isSupported(): boolean; + /** Load this module's dependencies. */ + load(): any; + /** + * Projects a geometry or an array of geometries to the specified output spatial reference. + * @param geometry The geometry or geometries to project. + * @param outSpatialReference The spatial reference to which you are converting the geometries' coordinates. + * @param geographicTransformation The geographic transformation used to transform the geometries. + */ + project(geometry: Geometry | Geometry[], outSpatialReference: SpatialReference, geographicTransformation?: GeographicTransformation): Geometry | Geometry[]; + }; + export = projection; +} + declare module "esri/geometry/scaleUtils" { import Map = require("esri/map"); import Extent = require("esri/geometry/Extent"); @@ -9677,6 +9955,8 @@ declare module "esri/layers/FeatureLayer" { version: number; /** When true, the layer is visible at the current map scale. */ visibleAtMapScale: boolean; + /** Indicates if WebGL is enabled on the layer. */ + webglEnabled: boolean; /** * Creates a new instance of a feature layer object from the ArcGIS Server REST resource identified by the input URL. * @param url URL to the ArcGIS Server REST resource that represents a feature service. @@ -9773,6 +10053,10 @@ declare module "esri/layers/FeatureLayer" { * @param feature A feature from this layer. */ getType(feature: Graphic): FeatureType; + /** Indicates whether an error is thrown after the layer updates. */ + hasUpdateError(): void; + /** Indicates if the layer is rendered in WebGL. */ + hasWebGLSurface(): boolean; /** Returns true if geometryType is esriGeometryMultipatch and multipatchOption is xyFootprint. */ hasXYFootprint(): boolean; /** Returns true if the FeatureLayer is editable. */ @@ -9934,6 +10218,11 @@ declare module "esri/layers/FeatureLayer" { * @param update When false the layer will not update its content based on the map's time extent. */ setUseMapTime(update: boolean): void; + /** + * Toggles WebGL rendering on/off on the layer. + * @param enable Indicates whether to enable WebGL on the layer. + */ + setWebGLEnabled(enable: boolean): void; /** Suspends layer drawing. */ suspend(): void; /** Returns an easily serializable object representation of the layer. */ @@ -11961,6 +12250,8 @@ declare module "esri/map" { timeExtent: TimeExtent; /** Indicates whether map is visible. */ visible: boolean; + /** Indicates if WebGL is enabled for rendering FeatureLayers in the map. */ + webglEnabled: boolean; /** Current width of the map in screen pixels. */ width: number; /** @@ -12164,6 +12455,11 @@ declare module "esri/map" { * @param visible If true, map will be visible. */ setVisibility(visible: boolean): Map; + /** + * Toggles WebGL rendering on/off for all FeatureLayers in the map. + * @param enable Indicates whether to enable WebGL rendering on the FeatureLayers in the map. + */ + setWebGLEnabled(enable: boolean): void; /** * Set the map zoom level to the given value. * @param zoom A valid zoom level value. @@ -15860,6 +16156,8 @@ declare module "esri/tasks/PrintTemplate" { class PrintTemplate { /** Define the map width, height and dpi. */ exportOptions: any; + /** When true, the feature's attributes are included in feature collection layers even when they are not needed for rendering. */ + forceFeatureAttributes: boolean; /** The print output format. */ format: string; /** The text that appears on the Print widget's print button. */ diff --git a/types/arrify/arrify-tests.ts b/types/arrify/arrify-tests.ts index 12995781bf..3fee89133d 100644 --- a/types/arrify/arrify-tests.ts +++ b/types/arrify/arrify-tests.ts @@ -1,5 +1,6 @@ import * as arrify from 'arrify'; +/***************** arrify *****************/ arrify(null); arrify(null); @@ -12,3 +13,74 @@ arrify([2, 3]); function test(val?: string | string[]) { arrify(val); } +/***************** arrify *****************/ + +/***************** arrify *****************/ +arrify(undefined); // returns [] + +arrify(null); // returns [] + +{ + const value: number | string[] = 2018; + arrify(value); // returns [2018] +} + +{ + const value: number[] | string | string[] = ['a', 'b']; + arrify(value); // returns ['a', 'b'] +} +/***************** arrify *****************/ + +/***************** arrify *****************/ +arrify(undefined); + +arrify(null); + +{ + const value: boolean | number[] | string[] = true; + // returns [true] + arrify(value); +} + +{ + const value: boolean[] | number | string[] = ['a', 'b']; + // returns ['a', 'b'] + arrify(value); +} +/***************** arrify *****************/ + +/***************** arrify *****************/ +arrify(undefined); + +arrify(null); + +{ + const value: boolean | Date | number[] | string[] = new Date(2018); + // returns [ new Date(2018) ] + arrify(value); +} + +{ + const value: boolean[] | Date[] | number | string = [true, false]; + // returns [true, false] + arrify(value); +} +/***************** arrify *****************/ + +/***************** arrify *****************/ +arrify(undefined); + +arrify(null); + +{ + const value: boolean | Date | number[] | RegExp | string[] = /test/; + // returns [ /test/ ] + arrify(value); +} + +{ + const value: boolean[] | Date[] | number | RegExp[] | string = [/test1/, /test2/]; + // returns [/test1/, /test2/] + arrify(value); +} +/***************** arrify *****************/ diff --git a/types/arrify/index.d.ts b/types/arrify/index.d.ts index 43c06af05f..7c3c588ea6 100644 --- a/types/arrify/index.d.ts +++ b/types/arrify/index.d.ts @@ -14,5 +14,78 @@ * arrify([2, 3]) // returns [2, 3] */ declare function arrify(val: undefined | null | T | T[]): T[]; + +/** + * @example + * // returns [] + * arrify(undefined); + * @example + * // returns [] + * arrify(null); + * @example + * let value: number | string[] = 2018; + * // returns [2018] + * arrify(value); + * @example + * let value: number[] | string | string[] = ['a', 'b']; + * // returns ['a', 'b'] + * arrify(value); + */ +declare function arrify(val: undefined | null | T1 | T2 | T1[] | T2[]): T1[] | T2[]; + +/** + * @example + * // returns [] + * arrify(undefined); + * @example + * // returns [] + * arrify(null); + * @example + * let value: boolean | number[] | string[] = true; + * // returns [true] + * arrify(value); + * @example + * let value: boolean[] | number | string[] = ['a', 'b']; + * // returns ['a', 'b'] + * arrify(value); + */ +declare function arrify(val: undefined | null | T1 | T2 | T3 | T1[] | T2[] | T3[]): T1[] | T2[] | T3[]; + +/** + * @example + * // returns [] + * arrify(undefined); + * @example + * // returns [] + * arrify(null); + * @example + * let value: boolean | Date | number[] | string[] = new Date(2018); + * // returns [ new Date(2018) ] + * arrify(value); + * @example + * let value: boolean[] | Date[] | number | string = [true, false]; + * // returns [true, false] + * arrify(value); + */ +declare function arrify(val: undefined | null | T1 | T2 | T3 | T4 | T1[] | T2[] | T3[] | T4[]): T1[] | T2[] | T3[] | T4[]; + +/** + * @example + * // returns [] + * arrify(undefined); + * @example + * // returns [] + * arrify(null); + * @example + * let value: boolean | Date | number[] | RegExp | string[] = /test/; + * // returns [ /test/ ] + * arrify(value); + * @example + * let value: boolean[] | Date[] | number | RegExp[] | string = [/test1/, /test2/]; + * // returns [/test1/, /test2/] + * arrify(value); + */ +declare function arrify(val: undefined | null | T1 | T2 | T3 | T4 | T5 | T1[] | T2[] | T3[] | T4[] | T5[]): T1[] | T2[] | T3[] | T4[] | T5[]; + declare namespace arrify {} export = arrify; diff --git a/types/atlaskit__calendar/atlaskit__calendar-tests.tsx b/types/atlaskit__calendar/atlaskit__calendar-tests.tsx new file mode 100644 index 0000000000..3a2f9c0a71 --- /dev/null +++ b/types/atlaskit__calendar/atlaskit__calendar-tests.tsx @@ -0,0 +1,8 @@ +import Calendar from '@atlaskit/calendar'; + +import * as React from 'react'; +import { render } from 'react-dom'; + +declare const container: Element; + +render( {}} month={1} year={2000} />, container); diff --git a/types/atlaskit__calendar/index.d.ts b/types/atlaskit__calendar/index.d.ts new file mode 100644 index 0000000000..e92776c1f3 --- /dev/null +++ b/types/atlaskit__calendar/index.d.ts @@ -0,0 +1,81 @@ +// Type definitions for atlaskit__calendar 5.0 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ +// Definitions by: Lee Standen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Component, HTMLAttributes, FocusEvent } from 'react'; + +export type ArrowKeys = 'left' | 'up' | 'right' | 'down'; + +export interface DateObj { + day: number; + month: number; + year: number; +} + +export interface ChangeEvent extends DateObj { + iso: string; + type: 'left' | 'up' | 'right' | 'down' | 'prev' | 'next'; +} + +export interface SelectEvent extends DateObj { + iso: string; +} + +export interface Props { + /** The number of the day currently focused. Places border around the date. 0 highlights no date. */ + day?: number; + /** Default for `day`. */ + defaultDay?: number; + /** Default for `disabled`. */ + defaultDisabled?: string[]; + /** Default for `month`. */ + defaultMonth?: number; + /** Default for `previouslySelected`. */ + defaultPreviouslySelected?: string[]; + /** Default for `selected`. */ + defaultSelected?: string[]; + /** Default for `year`. */ + defaultYear?: number; + /** + * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates provided are greyed out. + * This does not prevent these dates being selected. + */ + disabled?: string[]; + /** Props to apply to the container. */ + innerProps?: HTMLAttributes; + /** The number of the month (from 1 to 12) which the calendar should be on. */ + month?: number; + /** Function which is called when the calendar is no longer focused. */ + onBlur?: (e?: FocusEvent) => void; + /** + * Called when the calendar is navigated. This can be triggered by the keyboard, or by clicking the navigational buttons. + * The 'type' property indicates the the direction the calendar was navigated whereas the 'iso' property is a string of the format YYYY-MM-DD. + */ + onChange?: (e: ChangeEvent) => void; + /** Called when the calendar receives focus. This could be from a mouse event on the container by tabbing into it. */ + onFocus?: (e?: FocusEvent) => void; + /** + * Function called when a day is clicked on. Calls with an object that has + * a day, month and week property as numbers, representing the date just clicked. + * It also has an 'iso' property, which is a string of the selected date in the + * format YYYY-MM-DD. + */ + onSelect?: (e: SelectEvent) => void; + /** + * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates + * provided are given a background color. + */ + previouslySelected?: string[]; + /** + * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates + * provided are given a background color. + */ + selected?: string[]; + /** Value of current day, as a string in the format 'YYYY-MM-DD'. */ + today?: string; + /** Year to display the calendar for. */ + year?: number; +} +export default class Calendar extends Component {} diff --git a/types/atlaskit__calendar/tsconfig.json b/types/atlaskit__calendar/tsconfig.json new file mode 100644 index 0000000000..55dd5249f1 --- /dev/null +++ b/types/atlaskit__calendar/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/calendar": ["atlaskit__calendar"] + } + }, + "files": ["index.d.ts", "atlaskit__calendar-tests.tsx"] +} diff --git a/types/atlaskit__calendar/tslint.json b/types/atlaskit__calendar/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__calendar/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/atlaskit__inline-edit/atlaskit__inline-edit-tests.tsx b/types/atlaskit__inline-edit/atlaskit__inline-edit-tests.tsx new file mode 100644 index 0000000000..1c8a7278b5 --- /dev/null +++ b/types/atlaskit__inline-edit/atlaskit__inline-edit-tests.tsx @@ -0,0 +1,15 @@ +import InlineEdit from '@atlaskit/inline-edit'; + +import * as React from 'react'; +import { render } from 'react-dom'; + +declare const container: Element; + +render( + Hello} + onConfirm={() => {}} + onCancel={() => {}} + />, + container, +); diff --git a/types/atlaskit__inline-edit/index.d.ts b/types/atlaskit__inline-edit/index.d.ts new file mode 100644 index 0000000000..4ee82ee4c3 --- /dev/null +++ b/types/atlaskit__inline-edit/index.d.ts @@ -0,0 +1,51 @@ +// Type definitions for @atlaskit/inline-edit 5.0 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/ +// Definitions by: Lee Standen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { ReactElement, Component } from 'react'; +export default class InlineEdit extends Component {} +export class InlineEditStateless extends Component {} + +export interface BaseProps { + /** Label above the input. */ + label?: string; + /** Component to be shown when reading only */ + readView: ReactElement; + /** Component to be shown when editing. Should be an @atlaskit/input. */ + editView?: ReactElement; + /** Set whether the read view should fit width, most obvious when hovered. */ + isFitContainerWidthReadView?: boolean; + /** Greys out text and shows spinner. Does not disable input. */ + isWaiting?: boolean; + /** Sets yellow border with warning symbol at end of input. Removes confirm and cancel buttons. */ + isInvalid?: boolean; + /** Determine whether the label is shown. */ + isLabelHidden?: boolean; + /** Sets whether the checkmark and cross are displayed in the bottom right fo the field. */ + areActionButtonsHidden?: boolean; + /** Sets whether the confirm function is called when the input loses focus. */ + isConfirmOnBlurDisabled?: boolean; + /** Handler called when checkmark is clicked. Also by default called when the input loses focus. */ + onConfirm: () => void; + /** Handler called when the cross is clicked on. */ + onCancel: () => void; + /** html to pass down to the label htmlFor prop. */ + labelHtmlFor?: string; + /** Set whether onConfirm is called on pressing enter. */ + shouldConfirmOnEnter?: boolean; + /** Set whether default stylings should be disabled when editing. */ + disableEditViewFieldBase?: boolean; + /** Component to be shown in an @atlaskit/inline-dialog when edit view is open. */ + invalidMessage?: ReactElement; +} + +export interface StatelessProps extends BaseProps { + /** Whether the component shows the readView or the editView. */ + isEditing: boolean; + /** Handler called when the wrapper or the label are clicked. */ + onEditRequested: () => void; +} + +export type StatefulProps = BaseProps; diff --git a/types/atlaskit__inline-edit/tsconfig.json b/types/atlaskit__inline-edit/tsconfig.json new file mode 100644 index 0000000000..d2974ebb7a --- /dev/null +++ b/types/atlaskit__inline-edit/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/inline-edit": ["atlaskit__inline-edit"] + } + }, + "files": ["index.d.ts", "atlaskit__inline-edit-tests.tsx"] +} diff --git a/types/atlaskit__inline-edit/tslint.json b/types/atlaskit__inline-edit/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__inline-edit/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/atlaskit__layer/atlaskit__layer-tests.tsx b/types/atlaskit__layer/atlaskit__layer-tests.tsx new file mode 100644 index 0000000000..d10ad57ff0 --- /dev/null +++ b/types/atlaskit__layer/atlaskit__layer-tests.tsx @@ -0,0 +1,15 @@ +import Layer from '@atlaskit/layer'; + +import * as React from 'react'; +import { render } from 'react-dom'; + +declare const container: Element; + +render( + Hello, world!} + autoFlip={false} + />, + container, +); diff --git a/types/atlaskit__layer/index.d.ts b/types/atlaskit__layer/index.d.ts new file mode 100644 index 0000000000..2f50a5abcf --- /dev/null +++ b/types/atlaskit__layer/index.d.ts @@ -0,0 +1,72 @@ +// Type definitions for @atlaskit/layer 3.1 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ +// Definitions by: Lee Standen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Component, ReactNode } from 'react'; + +export default class Layer extends Component {} + +export interface Props { + /** + * Sets whether the content auto flip when it reaches the border set it as true for default flip + * or set the custom flip positions + */ + autoFlip?: boolean | FlipPositionType | FlipPositionType[]; + /** + * Element to act as a boundary for the Layer. The Layer will not sit outside this element if it + * can help it. If, through it's normal positoning, it would end up outside the boundary the + * layer will flip positions if the autoPosition prop is set. + */ + boundariesElement?: BoundariesElementType; + /** Target to which layer is attached */ + children?: ReactNode; + /** HTML content to display in the layer. Will be aligned to the target according to the position prop. */ + content?: ReactNode; + /** + * String representing the offsets from the target element in the format "[x-offset][y-offset]", + * measured in pixels. + */ + offset?: string; + /** + * Callback that is used to know when the flipped state of Layer changes. This occurs when placing a + * Layered element in the requested position would cause Layer to be rendered outside of the + * boundariesElement (usually viewport). + */ + onFlippedChange?: ( + flipped: boolean, + actualPosition: CSSPositionType, + originalPosition: CSSPositionType, + ) => void; + /** + * Position of a layer relative to its target. The position attribute takes two positional arguments in + * the format position="edge edge-position", where edge specifies what edge to align the layer to, and + * edge-position specifies where on that edge the layer should appear. + */ + position?: PositionType; + /** z-index for the layer component */ + zIndex?: number; + /** Lock scrolling behind the layer */ + lockScroll?: boolean; +} + +export type FlipPositionType = 'top' | 'right' | 'bottom' | 'left'; + +export type PositionType = + | 'top left' + | 'top center' + | 'top right' + | 'right top' + | 'right middle' + | 'right bottom' + | 'bottom left' + | 'bottom center' + | 'bottom right' + | 'left top' + | 'left middle' + | 'left bottom'; + +export type BoundariesElementType = 'viewport' | 'window' | 'scrollParent'; + +export type CSSPositionType = 'absolute' | 'fixed'; diff --git a/types/atlaskit__layer/tsconfig.json b/types/atlaskit__layer/tsconfig.json new file mode 100644 index 0000000000..6b6a475bd3 --- /dev/null +++ b/types/atlaskit__layer/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/layer": ["atlaskit__layer"] + } + }, + "files": ["index.d.ts", "atlaskit__layer-tests.tsx"] +} diff --git a/types/atlaskit__layer/tslint.json b/types/atlaskit__layer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__layer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/atlaskit__single-select/atlaskit__single-select-tests.tsx b/types/atlaskit__single-select/atlaskit__single-select-tests.tsx new file mode 100644 index 0000000000..baa25dfe1f --- /dev/null +++ b/types/atlaskit__single-select/atlaskit__single-select-tests.tsx @@ -0,0 +1,14 @@ +import SingleSelect, { StatelessSelect } from '@atlaskit/single-select'; + +import * as React from 'react'; +import { render } from 'react-dom'; + +declare const container: Element; + +render( +
+ + +
, + container, +); diff --git a/types/atlaskit__single-select/index.d.ts b/types/atlaskit__single-select/index.d.ts new file mode 100644 index 0000000000..6536869512 --- /dev/null +++ b/types/atlaskit__single-select/index.d.ts @@ -0,0 +1,125 @@ +// Type definitions for @atlaskit/single-select 4.0 +// Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ +// Definitions by: Lee Standen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Component, ReactNode, SyntheticEvent } from 'react'; + +export default class SingleSelect extends Component {} +export class StatelessSelect extends Component {} + +export interface Props { + /** Subtle items do not have a background color. */ + appearance?: 'default' | 'subtle'; + /** Item to be selected on component mount. */ + defaultSelected?: ItemType; + /** Sets whether the dropdown should be constrained to the width of its trigger */ + droplistShouldFitContainer?: boolean; + /** + * Sets whether the field should be selectable. If it is, the field will be + * a text box, which will filter the items. + */ + hasAutocomplete?: boolean; + /** id property to be passed down to the html select component. */ + id?: string; + /** message to show on the dialog when isInvalid is true */ + invalidMessage?: ReactNode; + /** controls the top margin of the label component rendered. */ + isFirstChild?: boolean; + /** Sets whether the select is selectable. Changes hover state. */ + isDisabled?: boolean; + /** Sets whether the component should be open on mount. */ + isDefaultOpen?: boolean; + /** + * Sets whether form including select can be submitted without an option + * being made. + */ + isRequired?: boolean; + /** + * Set whether there is an error with the selection. Sets an orange border + * and shows the warning icon. + */ + isInvalid?: boolean; + /** + * An array of objects, each one of which must have an array of items, and + * may have a heading. All items should have content and value properties, with + * content being the displayed text. + */ + items?: GroupType[]; + /** Label to be displayed above select. */ + label?: string; + /** name property to be passed to the html select element. */ + name?: string; + /** + * Message to display in any group in items if there are no items in it, + * including if there is one item that has been selected. + */ + noMatchesFound?: string; + /** Handler to be called when the filtered items changes. */ + onFilterChange?: (filter: string) => void; + /** + * Handler to be called when an item is selected. Called with an object that + * has the item selected as a property on the object. + */ + onSelected?: (item: ItemType) => void; + /** + * Handler called when the select is opened or closed. Called with an object + * that has both the event, and the new isOpen state. + */ + onOpenChange?: ( + change: { event: SyntheticEvent; isOpen: boolean }, + ) => void; + /** Text to be shown within the select when no item is selected. */ + placeholder?: string; + /** Where the select dropdown should be displayed relative to the field position. */ + position?: string; + /** Sets whether the field will become focused. */ + shouldFocus?: boolean; + /** Sets whether the field should be constrained to the width of its trigger */ + shouldFitContainer?: boolean; + /** Sets whether the droplist should flip its position when there is not enough space. */ + shouldFlip?: boolean; + /** Set the max height of the dropdown list in pixels. */ + maxHeight?: number; +} + +export interface StatelessProps extends Props { + /** Value to be used when filtering the items. Compared against 'content'. */ + filterValue?: string; + /** Sets whether the Select dropdown is open. */ + isOpen?: boolean; + /** + * Sets whether the field is loading data. The same property is used + * for either initial fetch (when no options are available) as well for + * subsequent loading of more options. The component reacts accordingly + * based on the `items` provided. + */ + isLoading?: boolean; + /** + * Message to be displayed when the component is set to its loading state. + * The message might be displayed differently depending on whether or not + * there are items already being rendered. + */ + loadingMessage?: string; + /** The selected item data */ + selectedItem?: ItemType; +} + +export interface GroupType { + heading?: string; + items: ItemType[]; +} + +export interface ItemType { + content?: ReactNode; + description?: string; + label?: string; + tooltipDescription?: string; + tooltipPosition?: 'top' | 'bottom' | 'left'; + value?: string | number; + filterValues?: string[]; + isDisabled?: boolean; + isSelected?: boolean; + elemBefore?: ReactNode; +} diff --git a/types/atlaskit__single-select/tsconfig.json b/types/atlaskit__single-select/tsconfig.json new file mode 100644 index 0000000000..1ec4324243 --- /dev/null +++ b/types/atlaskit__single-select/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@atlaskit/single-select": ["atlaskit__single-select"] + } + }, + "files": ["index.d.ts", "atlaskit__single-select-tests.tsx"] +} diff --git a/types/atlaskit__single-select/tslint.json b/types/atlaskit__single-select/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/atlaskit__single-select/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/atob/atob-tests.ts b/types/atob/atob-tests.ts new file mode 100644 index 0000000000..e2e2618387 --- /dev/null +++ b/types/atob/atob-tests.ts @@ -0,0 +1,3 @@ +import atob from 'atob'; + +atob('foo'); diff --git a/types/atob/index.d.ts b/types/atob/index.d.ts new file mode 100644 index 0000000000..632880f7a6 --- /dev/null +++ b/types/atob/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for atob 2.1 +// Project: https://git.coolaj86.com/coolaj86/atob.js.git +// Definitions by: John Wright +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export default function(str: string): string; diff --git a/types/atob/tsconfig.json b/types/atob/tsconfig.json new file mode 100644 index 0000000000..70dd7f0fdc --- /dev/null +++ b/types/atob/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "lib": ["es6"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "atob-tests.ts" + ] +} diff --git a/types/atob/tslint.json b/types/atob/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/atob/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/auth0-lock/auth0-lock-tests.ts b/types/auth0-lock/auth0-lock-tests.ts index b3b2c81339..0c64fd361b 100644 --- a/types/auth0-lock/auth0-lock-tests.ts +++ b/types/auth0-lock/auth0-lock-tests.ts @@ -258,6 +258,7 @@ new Auth0Lock(CLIENT_ID, DOMAIN, avatarOptions); const authResult : AuthResult = { accessToken: 'fake_access_token', + expiresIn: 7200, idToken: 'fake_id_token', idTokenPayload: { aud: "EaQzyHt1Dy57l-r5iHcMeT-lh1fFZntg", @@ -267,5 +268,6 @@ const authResult : AuthResult = { sub: "auth0|aksjfkladsf" }, refreshToken: undefined, - state: "923jf092j3.FFSDJFDSKLDF" + state: "923jf092j3.FFSDJFDSKLDF", + tokenType: 'Bearer' }; diff --git a/types/auth0-lock/index.d.ts b/types/auth0-lock/index.d.ts index fec943ce02..27639834db 100644 --- a/types/auth0-lock/index.d.ts +++ b/types/auth0-lock/index.d.ts @@ -165,6 +165,8 @@ interface Auth0LockShowOptions { interface AuthResult { accessToken: string; + appState?: any; + expiresIn: number; idToken: string; idTokenPayload: { aud: string; @@ -174,8 +176,10 @@ interface AuthResult { sub: string; }; refreshToken?: string; + scope?: string; state: string; -} + tokenType: string; + } interface Auth0LockStatic { new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic; diff --git a/types/auth0/auth0-tests.ts b/types/auth0/auth0-tests.ts index 0572c2b0e7..94e7d63cb3 100644 --- a/types/auth0/auth0-tests.ts +++ b/types/auth0/auth0-tests.ts @@ -75,6 +75,25 @@ management // Handle the error. }); +// Link users +management + .createUser({ connection: 'email', email: 'hi@me.co' }) + .catch(err => console.error('Cannot create E-mail user', err)) + .then((emailUser) => { + if (!emailUser) return; + management + .createUser({ connection: 'sms', phone_number: '+1234567890' }) + .catch(err => console.error('Cannot create SMS user', err)) + .then((smsUser) => { + if (!smsUser) return; + const userId = emailUser.user_id; + const params = { user_id: smsUser.user_id, provider: 'sms' }; + management.linkUsers(userId, params) + .catch(err => console.error('Cannot link E-mail and SMS users', err)) + .then((linkedUsers) => console.log(linkedUsers)) + }) + }); + auth .requestChangePasswordEmail({ connection: 'My-Connection', @@ -141,3 +160,12 @@ management.createPasswordChangeTicket({ }, (err: Error, data) => { console.log(data.ticket); }); + +// Link users +management.linkUsers('primaryId', { user_id: 'secondaryId' }) + .then((result: any) => console.log(result)); + +// Link users with callback +management.linkUsers('primaryId', { user_id: 'secondaryId' }, + (err: Error, result: any) => {}); + diff --git a/types/auth0/index.d.ts b/types/auth0/index.d.ts index 58013848f8..aa82e908e5 100644 --- a/types/auth0/index.d.ts +++ b/types/auth0/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for auth0 2.7 +// Type definitions for auth0 2.9.1 // Project: https://github.com/auth0/node-auth0 // Definitions by: Wilson Hobbs , Seth Westphal , Amiram Korach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -33,8 +33,13 @@ export interface RetryOptions { maxRetries?: number; } -export interface UserMetadata { } -export interface AppMetadata { } +export interface UserMetadata { + [propName: string]: string +} + +export interface AppMetadata { + [propName: string]: any +} export interface UserData { email?: string; @@ -345,6 +350,14 @@ export interface Identity { user_id: string; provider: string; isSocial: boolean; + profileData?: { + email?: string; + email_verified?: boolean; + name?: string; + phone_number?: string; + phone_verified?: boolean; + request_language?: string; + } } export interface AuthenticationClientOptions { @@ -462,7 +475,7 @@ export interface UnlinkAccountsResponse { profileData?: UnlinkAccountsResponseProfile } -export interface LinkAccountsData { +export interface LinkAccountsParams { user_id: string; connection_id?: string; provider?: string; @@ -505,9 +518,72 @@ export interface EmailVerificationTicketOptions { result_url: string; } +export interface BaseClientOptions { + baseUrl: string; + clientId?: string; +} + +export interface OAuthClientOptions extends BaseClientOptions { + clientSecret?: string; +} + +export interface DatabaseClientOptions extends BaseClientOptions { +} + +export interface PasswordLessClientOptions extends BaseClientOptions { +} + +export interface TokenManagerOptions extends BaseClientOptions { + headers?: any; +} +export interface UsersOptions extends BaseClientOptions { + headers?: any; +} + +export interface SignInOptions extends VerifyOptions { + connection?: string; +} + +export interface SocialSignInOptions { + access_token: string; + connection: string; +} + +export interface SignInToken { + access_token: string; + id_token?: string; + token_type?: string; + expiry: number; +} + +export interface RequestSMSCodeOptions extends RequestSMSOptions { + client_id: string; +} + +export type SendType = 'link' | 'code'; +export interface RequestEmailCodeOrLinkOptions { + email: string; + send: SendType +} + +export interface ImpersonateSettingOptions { + impersonator_id: string; + protocol: string; + token: string; + clientId?: string; +} + export class AuthenticationClient { + + // Members + database?: DatabaseAuthenticator; + oauth?: OAuthAuthenticator; + passwordless?: PasswordlessAuthenticator; + tokens?: TokenManager; + users?: UsersManager; + constructor(options: AuthenticationClientOptions); getClientInfo(): ClientInfo; @@ -664,8 +740,8 @@ export class ManagementClient { unlinkUsers(params: UnlinkAccountsParams): Promise; unlinkUsers(params: UnlinkAccountsParams, cb: (err: Error, data: UnlinkAccountsResponse) => void): void; - linkUsers(params: ObjectWithId, data: LinkAccountsData): Promise; - linkUsers(params: ObjectWithId, data: LinkAccountsData, cb: (err: Error, data: any) => void): void; + linkUsers(userId: string, params: LinkAccountsParams): Promise; + linkUsers(userId: string, params: LinkAccountsParams, cb: (err: Error, data: any) => void): void; // Tokens @@ -747,3 +823,63 @@ export class ManagementClient { updateResourceServer(params: ObjectWithId, data: ResourceServer): Promise; updateResourceServer(params: ObjectWithId, data: ResourceServer, cb?: (err: Error, data: ResourceServer) => void): void; } + + +export class DatabaseAuthenticator { + constructor(options: DatabaseClientOptions, oauth: OAuthAuthenticator); + + changePassword(data: ResetPasswordOptions): Promise; + changePassword(data: ResetPasswordOptions, cb: (err: Error, message: string) => void): void; + + requestChangePasswordEmail(data: ResetPasswordEmailOptions): Promise; + requestChangePasswordEmail(data: ResetPasswordEmailOptions, cb: (err: Error, message: string) => void): void; + + signIn(data: SignInOptions): Promise; + signIn(data: SignInOptions, cb: (err: Error, data: SignInToken) => void): void; + + signUp(data: CreateUserData): Promise; + signIn(data: CreateUserData, cb: (err: Error, data: User) => void): void; + +} + +export class OAuthAuthenticator { + constructor(options: OAuthClientOptions); + + passwordGrant(options: PasswordGrantOptions): Promise; + passwordGrant(options: PasswordGrantOptions, cb: (err: Error, response: SignInToken) => void): void; + + signIn(data: SignInOptions): Promise; + signIn(data: SignInOptions, cb: (err: Error, data: SignInToken) => void): void; + + + socialSignIn(data: SocialSignInOptions): Promise; + socialSignIn(data: SocialSignInOptions, cb: (err: Error, data: SignInToken) => void): void; +} + +export class PasswordlessAuthenticator { + constructor(options: PasswordLessClientOptions, oauth: OAuthAuthenticator); + + signIn(data: SignInOptions): Promise; + signIn(data: SignInOptions, cb: (err: Error, data: SignInToken) => void): void; + + sendEmail(data: RequestEmailCodeOrLinkOptions): Promise; + sendEmail(data: RequestEmailCodeOrLinkOptions, cb: (err: Error, message: string) => void): void; + + sendSMS(data: RequestSMSCodeOptions): Promise; + sendSMS(data: RequestSMSCodeOptions, cb: (err: Error, message: string) => void): void; +} + +export class TokenManager { + constructor(options: TokenManagerOptions); + +} + +export class UsersManager { + constructor(options: UsersOptions); + + getInfo(accessToken: string): Promise; + getInfo(accessToken: string, cb: (err: Error, user: User) => void): void; + + impersonate(userId: string, settings: ImpersonateSettingOptions): Promise; + impersonate(userId: string, settings: ImpersonateSettingOptions, cb: (err: Error, data: any) => void): void; +} \ No newline at end of file diff --git a/types/awesomplete/awesomplete-tests.ts b/types/awesomplete/awesomplete-tests.ts index f9ff4fed77..a3c66875a4 100644 --- a/types/awesomplete/awesomplete-tests.ts +++ b/types/awesomplete/awesomplete-tests.ts @@ -11,6 +11,7 @@ new Awesomplete(input, { const awesomplete = new Awesomplete(input); awesomplete.list = ["Ada", "Java", "JavaScript", "LOLCODE", "Node.js", "Ruby on Rails"]; +awesomplete.destroy(); new Awesomplete(input, { list: [ diff --git a/types/awesomplete/index.d.ts b/types/awesomplete/index.d.ts index 149b87e9f6..e73b7cf2f3 100644 --- a/types/awesomplete/index.d.ts +++ b/types/awesomplete/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for Awesomplete 1.1 // Project: https://leaverou.github.io/awesomplete/ -// Definitions by: webbiesdk , Ben Dixon , Trevor Bekolay +// Definitions by: webbiesdk +// Ben Dixon +// Trevor Bekolay +// Chris LoPresto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class Awesomplete { @@ -35,6 +38,7 @@ declare class Awesomplete { selected: boolean; open: () => void; status: HTMLElement; + destroy: () => void; } declare namespace Awesomplete { diff --git a/types/aws-lambda-mock-context/index.d.ts b/types/aws-lambda-mock-context/index.d.ts index 6fc5fda67a..b5a3768f2d 100644 --- a/types/aws-lambda-mock-context/index.d.ts +++ b/types/aws-lambda-mock-context/index.d.ts @@ -26,10 +26,10 @@ interface Context { } interface Options { - region: string; - account: string; - functionName: string; - functionVersion: string; - memoryLimitInMB: string; + region?: string; + account?: string; + functionName?: string; + functionVersion?: string; + memoryLimitInMB?: string; alias?: string; } diff --git a/types/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts index dc16eca58f..9f9d7438e3 100644 --- a/types/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -83,6 +83,7 @@ str = apiGwEvtReqCtx.httpMethod; strOrNull = apiGwEvtReqCtx.identity.accessKey; strOrNull = apiGwEvtReqCtx.identity.accountId; strOrNull = apiGwEvtReqCtx.identity.apiKey; +strOrNull = apiGwEvtReqCtx.identity.apiKeyId; strOrNull = apiGwEvtReqCtx.identity.caller; strOrNull = apiGwEvtReqCtx.identity.cognitoAuthenticationProvider; strOrNull = apiGwEvtReqCtx.identity.cognitoAuthenticationType; @@ -259,6 +260,46 @@ statement = { Resource: str }; +// $ExpectError +statement = { + Effect: str, + Action: str, + Principal: 123 +}; + +// Bad Resource +// $ExpectError +statement = { + Effect: str, + Action: str, + Resource: 123 +}; + +// Bad Resource with valid Principal +// $ExpectError +statement = { + Effect: str, + Action: str, + Principal: { Service: str}, + Resource: 123 +}; + +// Bad principal with valid Resource +// $ExpectError +statement = { + Effect: str, + Action: str, + Principal: 123, + Resource: str +}; + +// No Effect +// $ExpectError +statement = { + Action: str, + Principal: str +}; + statement = { Sid: str, Action: [str, str], @@ -277,6 +318,20 @@ statement = { NotPrincipal: [str, str] }; +statement = { + Action: str, + Principal: str, + Effect: str +}; + +statement = { + Action: str, + NotPrincipal: { + Service: str + }, + Effect: str +}; + statement = { Effect: str, NotAction: str, diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index c060bc10ee..7795c4cdfe 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -31,6 +31,7 @@ export interface APIGatewayEventRequestContext { accessKey: string | null; accountId: string | null; apiKey: string | null; + apiKeyId: string | null; caller: string | null; cognitoAuthenticationProvider: string | null; cognitoAuthenticationType: string | null; @@ -472,19 +473,26 @@ export interface Condition { * https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-policy-language-overview.html * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html */ -export type Statement = BaseStatement & StatementAction & StatementResource; +export type Statement = BaseStatement & StatementAction & (StatementResource | StatementPrincipal); export interface BaseStatement { Effect: string; Sid?: string; Condition?: ConditionBlock; - Principal?: string | string[]; - NotPrincipal?: string | string[]; } +export type PrincipalValue = { [key: string]: string | string[]; } | string | string[]; +export interface MaybeStatementPrincipal { + Principal?: PrincipalValue; + NotPrincipal?: PrincipalValue; +} +export interface MaybeStatementResource { + Resource?: string | string[]; + NotResource?: string | string[]; +} export type StatementAction = { Action: string | string[] } | { NotAction: string | string[] }; -export type StatementResource = { Resource: string | string[] } | { NotResource: string | string[] }; - +export type StatementResource = MaybeStatementPrincipal & ({ Resource: string | string[] } | { NotResource: string | string[] }); +export type StatementPrincipal = MaybeStatementResource & ({ Principal: PrincipalValue } | { NotPrincipal: PrincipalValue }); /** * API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Statement. * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output diff --git a/types/babel-types/index.d.ts b/types/babel-types/index.d.ts index b1de338923..8c892a3ca0 100644 --- a/types/babel-types/index.d.ts +++ b/types/babel-types/index.d.ts @@ -46,7 +46,7 @@ export interface Node { export interface ArrayExpression extends Node { type: "ArrayExpression"; - elements: Array; + elements: Array; } export interface AssignmentExpression extends Node { @@ -1306,7 +1306,7 @@ export type TSEntityName = Identifier | TSQualifiedName; export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature | TSMethodSignature | TSPropertySignature; -export function arrayExpression(elements?: Array): ArrayExpression; +export function arrayExpression(elements?: Array): ArrayExpression; export function assignmentExpression(operator?: string, left?: LVal, right?: Expression): AssignmentExpression; export function binaryExpression( operator?: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", diff --git a/types/base64-arraybuffer/base64-arraybuffer-tests.ts b/types/base64-arraybuffer/base64-arraybuffer-tests.ts new file mode 100644 index 0000000000..3263f45afe --- /dev/null +++ b/types/base64-arraybuffer/base64-arraybuffer-tests.ts @@ -0,0 +1,4 @@ +import { encode, decode } from 'base64-arraybuffer'; + +encode(new Float32Array([1, 2, 3]).buffer); // $ExpectType string +decode('AACAPwAAAEAAAEBA'); // $ExpectType ArrayBuffer diff --git a/types/base64-arraybuffer/index.d.ts b/types/base64-arraybuffer/index.d.ts new file mode 100644 index 0000000000..8d8f5b8285 --- /dev/null +++ b/types/base64-arraybuffer/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for base64-arraybuffer 0.1 +// Project: https://github.com/niklasvh/base64-arraybuffer +// Definitions by: Ben Cook +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function encode(arraybuffer: ArrayBuffer): string; +export function decode(base64: string): ArrayBuffer; diff --git a/types/base64-arraybuffer/tsconfig.json b/types/base64-arraybuffer/tsconfig.json new file mode 100644 index 0000000000..5d6ba6ac31 --- /dev/null +++ b/types/base64-arraybuffer/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "base64-arraybuffer-tests.ts" + ] +} diff --git a/types/base64-arraybuffer/tslint.json b/types/base64-arraybuffer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/base64-arraybuffer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bcrypt/bcrypt-tests.ts b/types/bcrypt/bcrypt-tests.ts index 6824549a61..0d824f40a2 100644 --- a/types/bcrypt/bcrypt-tests.ts +++ b/types/bcrypt/bcrypt-tests.ts @@ -8,15 +8,24 @@ let error: Error; str = bcrypt.genSaltSync(); str = bcrypt.genSaltSync(num); +str = bcrypt.genSaltSync(num, str); bcrypt.genSalt(num, (err: Error, salt: string): void => { error = err; str = salt; }) .then(salt => str = salt) .catch(err => error = err); +bcrypt.genSalt(num, str, (err: Error, salt: string): void => { error = err; str = salt; }) + .then(salt => str = salt) + .catch(err => error = err); + bcrypt.genSalt(num) .then(salt => str = salt) .catch(err => error = err); +bcrypt.genSalt(num, str) + .then(salt => str = salt) + .catch(err => error = err); + bcrypt.genSalt((err: Error, salt: string): void => { error = err; str = salt; }) .then(salt => str = salt) .catch(err => error = err); diff --git a/types/bcrypt/index.d.ts b/types/bcrypt/index.d.ts index 98c7ba97fe..3cf57ca562 100644 --- a/types/bcrypt/index.d.ts +++ b/types/bcrypt/index.d.ts @@ -1,20 +1,32 @@ -// Type definitions for bcrypt 1.0 +// Type definitions for bcrypt 2.0 // Project: https://www.npmjs.org/package/bcrypt -// Definitions by: Peter Harris , Ayman Nedjmeddine +// Definitions by: Peter Harris +// Ayman Nedjmeddine +// David Stapleton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** - * @param rounds The cost of processing the data. Default 10. + * @param rounds The cost of processing the data. Default 10. + * @param minor The minor version of bcrypt to use. Either 'a' or 'b'. Default 'b'. */ -export declare function genSaltSync(rounds?: number): string; +export declare function genSaltSync(rounds?: number, minor?: string): string; /** * @param rounds The cost of processing the data. Default 10. * @param callback A callback to be fire once the sald has been generated. Uses eio making it asynchronous. * @return A promise to be either resolved with the generated salt or rejected with an Error */ -export declare function genSalt(rounds: number, callback?: (err: Error, salt: string) => void): Promise; +export declare function genSalt(rounds?: number, callback?: (err: Error, salt: string) => void): Promise; + +/** + * @param rounds The cost of processing the data. Default 10. + * @param minor The minor version of bcrypt to use. Either 'a' or 'b'. Default 'b'. + * @param callback A callback to be fire once the sald has been generated. Uses eio making it asynchronous. + * @return A promise to be either resolved with the generated salt or rejected with an Error + */ +export declare function genSalt(rounds?: number, minor?: string, callback?: (err: Error, salt: string) => void): Promise; + /** * @param callback A callback to be fire once the sald has been generated. Uses eio making it asynchronous. * @return A promise to be either resolved with the generated salt or rejected with an Error diff --git a/types/behavior3/behavior3-tests.ts b/types/behavior3/behavior3-tests.ts new file mode 100644 index 0000000000..b612209a09 --- /dev/null +++ b/types/behavior3/behavior3-tests.ts @@ -0,0 +1,73 @@ +import '../behavior3'; + +// Test decode +const blackboard = new b3.Blackboard(); +const behaviorTree = new b3.BehaviorTree(); +behaviorTree.load({ + version: "0.3.0", + scope: "tree", + id: "6bc03cd0-38ef-4a3e-8e08-54c412491525", + title: "A behavior tree", + description: "", + root: "607d29f5-9dbc-4cc4-8ebb-e57c4908d87b", + properties: {}, + nodes: { + "607d29f5-9dbc-4cc4-8ebb-e57c4908d87b": { + id: "607d29f5-9dbc-4cc4-8ebb-e57c4908d87b", + name: "Sequence", + title: "Sequence", + description: "", + properties: {}, + display: { + x: -216, + y: -36 + }, + children: [ + "09f04185-205b-40c0-8494-ffd53ffd0820", + "df7366f8-999a-4971-872c-cef57607f99f" + ] + }, + "df7366f8-999a-4971-872c-cef57607f99f": { + id: "df7366f8-999a-4971-872c-cef57607f99f", + name: "Runner", + title: "Runner", + description: "", + properties: {}, + display: { + x: -12, + y: -36 + } + }, + "e498e1a5-5295-43c3-8716-20dd6d3407f2": { + id: "e498e1a5-5295-43c3-8716-20dd6d3407f2", + name: "Succeeder", + title: "Succeeder", + description: "", + properties: {}, + display: { + x: 192, + y: -96 + } + }, + "09f04185-205b-40c0-8494-ffd53ffd0820": { + id: "09f04185-205b-40c0-8494-ffd53ffd0820", + name: "Inverter", + title: "Inverter", + description: "", + properties: {}, + display: { + x: -36, + y: -108 + }, + child: "e498e1a5-5295-43c3-8716-20dd6d3407f2" + } + }, + display: { + camera_x: 640, + camera_y: 324, + camera_z: 1, + x: -324, + y: -36 + } + }); +behaviorTree.tick(null, blackboard); diff --git a/types/behavior3/index.d.ts b/types/behavior3/index.d.ts new file mode 100644 index 0000000000..7cb3ad9deb --- /dev/null +++ b/types/behavior3/index.d.ts @@ -0,0 +1,908 @@ +// Type definitions for behavior3 0.2 +// Project: https://github.com/behavior3/behavior3js +// Definitions by: carry.wu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Behavior3JS + * =========== + * + * * * * + * + * **Behavior3JS** is a Behavior Tree library written in JavaScript. It + * provides structures and algorithms that assist you in the task of creating + * intelligent agents for your game or application. Check it out some features + * of Behavior3JS: + * + * - Based on the work of (Marzinotto et al., 2014), in which they propose a + * **formal**, **consistent** and **general** definition of Behavior Trees; + * - **Optimized to control multiple agents**: you can use a single behavior + * tree instance to handle hundreds of agents; + * - It was **designed to load and save trees in a JSON format**, in order to + * use, edit and test it in multiple environments, tools and languages; + * - A **cool visual editor** which you can access online; + * - Several **composite, decorator and action nodes** available within the + * library. You still can define your own nodes, including composites and + * decorators; + * - **Completely free**, the core module and the visual editor are all + * published under the MIT License, which means that you can use them for + * your open source and commercial projects; + * - **Lightweight**! + * + * Visit http://behavior3.com to know more! + * + * + * ## Core Classes and Functions + * + * This library include the following core structures... + * + * + * **Public:** + * + * - **BehaviorTree**: the structure that represents a Behavior Tree; + * - **Blackboard**: represents a "memory" in an agent and is required to to + * run a `BehaviorTree`; + * - **Composite**: base class for all composite nodes; + * - **Decorator**: base class for all decorator nodes; + * - **Action**: base class for all action nodes; + * - **Condition**: base class for all condition nodes; + * + * + * **Internal:** + * + * - **Tick**: used as container and tracking object through the tree during + * the tick signal; + * - **BaseNode**: the base class that provide all common node features; + * + * *Some classes are used internally on Behavior3JS, but you may need to access + * its functionalities eventually, specially the `Tick` object.* + * + * + * **Nodes:** + * + * - **Composite Nodes**: Sequence, Priority, MemSequence, MemPriority. + * - **Decorators**: Inverter, Limiter, MaxTime, Repeater, + * RepeaterUntilFailure, RepeaterUntilSuccess. + * - **Actions**: Succeeder, Failer, Error, Runner, Wait. + * + * ## The list of all constants in B3. + * + * NAME | VALUE + * ------------------- | ---------------------- + * VERSION | depends on the version + * | + * **Node State** | + * SUCCESS | 1 + * FAILURE | 2 + * RUNNING | 3 + * ERROR | 4 + * | + * **Node categories** | + * COMPOSITE | 'composite' + * DECORATOR | 'decorator' + * ACTION | 'action' + * CONDITION | 'condition' + * + */ +declare namespace b3 { + /** + * This function is used to create unique IDs for trees and nodes. + * + * (consult http://www.ietf.org/rfc/rfc4122.txt). + * + */ + function createUUID(): string; + + /** + * The BaseNode class is used as super class to all nodes in BehaviorJS. It + * comprises all common variables and methods that a node must have to + * execute. + * + * **IMPORTANT:** Do not inherit from this class, use `Composite`, + * `Decorator`, `Action` or `Condition`, instead. + * + * The attributes are specially designed to serialization of the node in a + * JSON format. In special, the `parameters` attribute can be set into the + * visual editor (thus, in the JSON file), and it will be used as parameter + * on the node initialization at `BehaviorTree.load`. + * + * BaseNode also provide 5 callback methods, which the node implementations + * can override. They are `enter`, `open`, `tick`, `close` and `exit`. See + * their documentation to know more. These callbacks are called inside the + * `_execute` method, which is called in the tree traversal. + * + */ + class BaseNode { + /** + * Initialization method. + */ + constructor({category, name, title, description, properties}?: {category?: string, name?: string, title?: string, description?: string, properties?: any}); + + /** + * This is the main method to propagate the tick signal to this node. This + * method calls all callbacks: `enter`, `open`, `tick`, `close`, and + * `exit`. It only opens a node if it is not already open. In the same + * way, this method only close a node if the node returned a status + * different of `RUNNING`. + * + */ + _execute(tick: Tick): number; + + /** + * Wrapper for enter method. + */ + _enter(tick: Tick): void; + + /** + * Wrapper for open method. + */ + _open(tick: Tick): void; + + /** + * Wrapper for tick method. + */ + _tick(tick: Tick): number; + + /** + * Wrapper for close method. + */ + _close(tick: Tick): void; + + /** + * Wrapper for exit method. + */ + _exit(tick: Tick): void; + + /** + * Enter method, override this to use. It is called every time a node is + * asked to execute, before the tick itself. + */ + enter(tick: Tick): void; + + /** + * Open method, override this to use. It is called only before the tick + * callback and only if the not isn't closed. + * + * Note: a node will be closed if it returned `RUNNING` in the tick. + * + */ + open(tick: Tick): void; + + /** + * Tick method, override this to use. This method must contain the real + * execution of node (perform a task, call children, etc.). It is called + * every time a node is asked to execute. + * + */ + tick(tick: Tick): void; + + /** + * Close method, override this to use. This method is called after the tick + * callback, and only if the tick return a state different from + * `RUNNING`. + * + */ + close(tick: Tick): void; + + /** + * Exit method, override this to use. Called every time in the end of the + * execution. + * + */ + exit(tick: Tick): void; + } + + /** + * Action is the base class for all action nodes. Thus, if you want to create + * new custom action nodes, you need to inherit from this class. For example, + * take a look at the Runner action: + * + * class Runner extends b3.Action { + * constructor(){ + * super({name: 'Runner'}); + * } + * tick(tick) { + * return b3.RUNNING; + * } + * }; + * + */ + class Action extends BaseNode { + /** + * Creates an instance of Action. + */ + constructor({name, title, properties}?: {name?: string, title?: string, properties?: any}); + } + + /** + * The BehaviorTree class, as the name implies, represents the Behavior Tree + * structure. + * + * There are two ways to construct a Behavior Tree: by manually setting the + * root node, or by loading it from a data structure (which can be loaded + * from a JSON). Both methods are shown in the examples below and better + * explained in the user guide. + * + * The tick method must be called periodically, in order to send the tick + * signal to all nodes in the tree, starting from the root. The method + * `BehaviorTree.tick` receives a target object and a blackboard as + * parameters. The target object can be anything: a game agent, a system, a + * DOM object, etc. This target is not used by any piece of Behavior3JS, + * i.e., the target object will only be used by custom nodes. + * + * The blackboard is obligatory and must be an instance of `Blackboard`. This + * requirement is necessary due to the fact that neither `BehaviorTree` or + * any node will store the execution variables in its own object (e.g., the + * BT does not store the target, information about opened nodes or number of + * times the tree was called). But because of this, you only need a single + * tree instance to control multiple (maybe hundreds) objects. + * + * Manual construction of a Behavior Tree + * -------------------------------------- + * + * var tree = new b3.BehaviorTree(); + * + * tree.root = new b3.Sequence({children:[ + * new b3.Priority({children:[ + * new MyCustomNode(), + * new MyCustomNode() + * ]}), + * ... + * ]}); + * + * + * Loading a Behavior Tree from data structure + * ------------------------------------------- + * + * var tree = new b3.BehaviorTree(); + * + * tree.load({ + * 'title' : 'Behavior Tree title' + * 'description' : 'My description' + * 'root' : 'node-id-1' + * 'nodes' : { + * 'node-id-1' : { + * 'name' : 'Priority', // this is the node type + * 'title' : 'Root Node', + * 'description' : 'Description', + * 'children' : ['node-id-2', 'node-id-3'], + * }, + * ... + * } + * }) + * + */ + class BehaviorTree { + /** + * Initialization method. + */ + constructor(); + + /** + * This method loads a Behavior Tree from a data structure, populating this + * object with the provided data. Notice that, the data structure must + * follow the format specified by Behavior3JS. Consult the guide to know + * more about this format. + * + * You probably want to use custom nodes in your BTs, thus, you need to + * provide the `names` object, in which this method can find the nodes by + * `names[NODE_NAME]`. This variable can be a namespace or a dictionary, + * as long as this method can find the node by its name, for example: + * + * //json + * ... + * 'node1': { + * 'name': MyCustomNode, + * 'title': ... + * } + * ... + * + * //code + * var bt = new b3.BehaviorTree(); + * bt.load(data, {'MyCustomNode':MyCustomNode}) + * + * + */ + load(data: any, names?: any): void; + + /** + * This method dump the current BT into a data structure. + * + * Note: This method does not record the current node parameters. Thus, + * it may not be compatible with load for now. + * + */ + dump(): any; + + /** + * Propagates the tick signal through the tree, starting from the root. + * + * This method receives a target object of any type (Object, Array, + * DOMElement, whatever) and a `Blackboard` instance. The target object has + * no use at all for all Behavior3JS components, but surely is important + * for custom nodes. The blackboard instance is used by the tree and nodes + * to store execution variables (e.g., last node running) and is obligatory + * to be a `Blackboard` instance (or an object with the same interface). + * + * Internally, this method creates a Tick object, which will store the + * target and the blackboard objects. + * + * Note: BehaviorTree stores a list of open nodes from last tick, if these + * nodes weren't called after the current tick, this method will close them + * automatically. + * + */ + tick(target: any, blackboard: Blackboard): string; + } + + /** + * The Blackboard is the memory structure required by `BehaviorTree` and its + * nodes. It only have 2 public methods: `set` and `get`. These methods works + * in 3 different contexts: global, per tree, and per node per tree. + * + * Suppose you have two different trees controlling a single object with a + * single blackboard, then: + * + * - In the global context, all nodes will access the stored information. + * - In per tree context, only nodes sharing the same tree share the stored + * information. + * - In per node per tree context, the information stored in the blackboard + * can only be accessed by the same node that wrote the data. + * + * The context is selected indirectly by the parameters provided to these + * methods, for example: + * + * // getting/setting variable in global context + * blackboard.set('testKey', 'value'); + * var value = blackboard.get('testKey'); + * + * // getting/setting variable in per tree context + * blackboard.set('testKey', 'value', tree.id); + * var value = blackboard.get('testKey', tree.id); + * + * // getting/setting variable in per node per tree context + * blackboard.set('testKey', 'value', tree.id, node.id); + * var value = blackboard.get('testKey', tree.id, node.id); + * + * Note: Internally, the blackboard store these memories in different + * objects, being the global on `_baseMemory`, the per tree on `_treeMemory` + * and the per node per tree dynamically create inside the per tree memory + * (it is accessed via `_treeMemory[id].nodeMemory`). Avoid to use these + * variables manually, use `get` and `set` instead. + * + */ + class Blackboard { + /** + * Initialization method. + */ + constructor(); + + /** + * Internal method to retrieve the tree context memory. If the memory does + * not exist, this method creates it. + * + */ + _getTreeMemory(treeScope: string): any; + + /** + * Internal method to retrieve the node context memory, given the tree + * memory. If the memory does not exist, this method creates is. + * + */ + _getNodeMemory(treeMemory: string, nodeScope: string): any; + + /** + * Internal method to retrieve the context memory. If treeScope and + * nodeScope are provided, this method returns the per node per tree + * memory. If only the treeScope is provided, it returns the per tree + * memory. If no parameter is provided, it returns the global memory. + * Notice that, if only nodeScope is provided, this method will still + * return the global memory. + * + */ + _getMemory(treeScope: string, nodeScope: string): any; + + /** + * Stores a value in the blackboard. If treeScope and nodeScope are + * provided, this method will save the value into the per node per tree + * memory. If only the treeScope is provided, it will save the value into + * the per tree memory. If no parameter is provided, this method will save + * the value into the global memory. Notice that, if only nodeScope is + * provided (but treeScope not), this method will still save the value into + * the global memory. + * + */ + set(key: string, value: string, treeScope: string, nodeScope: string): void; + + /** + * Retrieves a value in the blackboard. If treeScope and nodeScope are + * provided, this method will retrieve the value from the per node per tree + * memory. If only the treeScope is provided, it will retrieve the value + * from the per tree memory. If no parameter is provided, this method will + * retrieve from the global memory. If only nodeScope is provided (but + * treeScope not), this method will still try to retrieve from the global + * memory. + * + */ + get(key: string, treeScope: string, nodeScope: string): any; + } + + /** + * Composite is the base class for all composite nodes. Thus, if you want to + * create new custom composite nodes, you need to inherit from this class. + * + * When creating composite nodes, you will need to propagate the tick signal + * to the children nodes manually. To do that, override the `tick` method and + * call the `_execute` method on all nodes. For instance, take a look at how + * the Sequence node inherit this class and how it call its children: + * + * // Inherit from Composite, using the util function Class. + * class Sequence extends Composite { + * + * constructor(){ + * // Remember to set the name of the node. + * super({name: 'Sequence'}); + * } + * + * // Override the tick function + * tick(tick) { + * + * // Iterates over the children + * for (var i=0; i +bidirectionalMap.has("one"); // $ExpectType boolean +bidirectionalMap.hasValue(2); // $ExpectType boolean +bidirectionalMap.keys(); // $ExpectType IterableIterator +bidirectionalMap.values(); // $ExpectType IterableIterator diff --git a/types/bidirectional-map/index.d.ts b/types/bidirectional-map/index.d.ts new file mode 100644 index 0000000000..67662d3441 --- /dev/null +++ b/types/bidirectional-map/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for bidirectional-map 1.0 +// Project: https://github.com/educastellano/bidirectional-map +// Definitions by: Helen Anderson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export default class BiMap { + constructor(object?: { [i: string]: TValue }); + size: number; + + set(key: string, value: TValue): void; + get(key: string): TValue; + getKey(value: TValue): string; + clear(): void; + delete(key: string): void; + deleteValue(value: TValue): void; + entries(): IterableIterator<[string, TValue]>; + has(key: string): boolean; + hasValue(value: TValue): boolean; + keys(): IterableIterator; + values(): IterableIterator; +} diff --git a/types/bidirectional-map/tsconfig.json b/types/bidirectional-map/tsconfig.json new file mode 100644 index 0000000000..0c3b3a1cac --- /dev/null +++ b/types/bidirectional-map/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bidirectional-map-tests.ts" + ] +} diff --git a/types/bidirectional-map/tslint.json b/types/bidirectional-map/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bidirectional-map/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts b/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts index 669c00d77a..9576ba7289 100644 --- a/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts +++ b/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts @@ -41,3 +41,22 @@ bitcoin.address.toBase58Check(rsBase58Check.hash, rsBase58Check.version); bitcoin.address.toBech32(rsBech32.data, rsBech32.version, rsBech32.prefix); bitcoin.address.toOutputScript(address); bitcoin.address.toOutputScript(address, network); + +const redeemScript = bitcoin.script.multisig.output.encode( + 2, + [ + new Buffer('12345678901234567890123456789012'), + new Buffer('12345678901234567890123456789012'), + new Buffer('12345678901234567890123456789012'), + ] +); +bitcoin.script.scriptHash.input.encode( + bitcoin.script.multisig.input.encodeStack( + [ + new Buffer('12345678901234567890123456789012'), + new Buffer('12345678901234567890123456789012'), + ], + redeemScript, + ), + redeemScript, +); diff --git a/types/bitcoinjs-lib/index.d.ts b/types/bitcoinjs-lib/index.d.ts index 920df43d6e..2d0603b87c 100644 --- a/types/bitcoinjs-lib/index.d.ts +++ b/types/bitcoinjs-lib/index.d.ts @@ -1,10 +1,11 @@ -// Type definitions for bitcoinjs-lib 3.3 +// Type definitions for bitcoinjs-lib 3.4 // Project: https://github.com/bitcoinjs/bitcoinjs-lib // Definitions by: Mohamed Hegazy // Daniel // Ron Buckton // Satana Charuwichitratana // Youssef GHOUBACH +// Kento // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Declaration file initially generated by dts-gen for bitcoinjs-lib 3.0.3 // based on the flow version found at https://github.com/flowtype/flow-typed/blob/master/definitions/npm/bitcoinjs-lib_v2.x.x/flow_v0.17.x-/bitcoinjs-lib_v2.x.x.js @@ -23,9 +24,11 @@ export interface In { hash: Buffer; index: number; sequence: number; + witness: Buffer[]; } export interface Network { + bech32?: string; bip32: { public: number; private: number; @@ -467,8 +470,8 @@ export namespace script { check(script: Buffer, allowIncomplete: boolean): boolean; decode(buffer: Buffer): Array; decodeStack(stack: Buffer[], allowIncomplete: boolean): Array; - encode(signatures: ECSignature[], scriptPubKey: Buffer): Buffer; - encodeStack(signatures: ECSignature[], scriptPubKey: Buffer): ECSignature[]; + encode(signatures: Buffer[], scriptPubKey: Buffer): Buffer; + encodeStack(signatures: Buffer[], scriptPubKey: Buffer): Buffer[]; }; output: { check(script: Buffer, allowIncomplete: boolean): boolean; @@ -482,8 +485,8 @@ export namespace script { check(script: Buffer): boolean; decode(buffer: Buffer): Array; decodeStack(stack: Buffer[]): Array; - encode(signature: ECSignature): Buffer; - encodeStack(signature: ECSignature): ECSignature[]; + encode(signature: Buffer): Buffer; + encodeStack(signature: Buffer): Buffer[]; }; output: { @@ -496,10 +499,10 @@ export namespace script { const pubKeyHash: { input: { check(script: Buffer): boolean; - decode(buffer: Buffer): { signature: ECSignature; pubKey: Buffer }; - decodeStack(stack: Buffer[]): { signature: ECSignature; pubKey: Buffer }; - encode(signature: ECSignature, pubKey: Buffer): Buffer; - encodeStack(signature: ECSignature, pubKey: Buffer): [ECSignature, Buffer]; + decode(buffer: Buffer): { signature: Buffer; pubKey: Buffer }; + decodeStack(stack: Buffer[]): { signature: Buffer; pubKey: Buffer }; + encode(signature: Buffer, pubKey: Buffer): Buffer; + encodeStack(signature: Buffer, pubKey: Buffer): [Buffer, Buffer]; }; output: { @@ -515,7 +518,7 @@ export namespace script { decode(buffer: Buffer): { redeemScriptStack: Buffer[]; redeemScript: Buffer }; decodeStack(stack: Buffer[]): { redeemScriptStack: Buffer[]; redeemScript: Buffer }; encode(redeemScriptSig: Array, redeemScript: Buffer): Buffer; - encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer; + encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer[]; }; output: { @@ -536,8 +539,8 @@ export namespace script { const witnessPubKeyHash: { input: { check(script: Buffer): boolean; - decodeStack(stack: Buffer[]): { signature: ECSignature; pubKey: Buffer }; - encodeStack(signature: ECSignature, pubKey: Buffer): [ECSignature, Buffer]; + decodeStack(stack: Buffer[]): { signature: Buffer; pubKey: Buffer }; + encodeStack(signature: Buffer, pubKey: Buffer): [Buffer, Buffer]; }; output: { @@ -551,7 +554,7 @@ export namespace script { input: { check(script: Buffer, allowIncomplete: boolean): boolean; decodeStack(stack: Buffer[]): { redeemScriptStack: Buffer[]; redeemScript: Buffer }; - encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer; + encodeStack(redeemScriptStack: Buffer[], redeemScript: Buffer): Buffer[]; }; output: { diff --git a/types/blocked/blocked-tests.ts b/types/blocked/blocked-tests.ts new file mode 100644 index 0000000000..f43eb82cba --- /dev/null +++ b/types/blocked/blocked-tests.ts @@ -0,0 +1,7 @@ +import * as blocked from 'blocked'; + +blocked((ms: number) => { + // todo: show warning +}, { + threshold: 10 +}); diff --git a/types/blocked/index.d.ts b/types/blocked/index.d.ts new file mode 100644 index 0000000000..5292011f23 --- /dev/null +++ b/types/blocked/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for blocked 1.2 +// Project: https://github.com/visionmedia/node-blocked#readme +// Definitions by: Jonas Lochmann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +/*~ Note that ES6 modules cannot directly export callable functions. + *~ This file should be imported using the CommonJS-style: + *~ import x = require('someLibrary'); + *~ + *~ Refer to the documentation to understand common + *~ workarounds for this limitation of ES6 modules. + */ + +export = Blocked; + +declare function Blocked(callback: (ms: number) => void, options?: Blocked.Options): NodeJS.Timer; + +declare namespace Blocked { + interface Options { + threshold: number; // in milliseconds + } +} diff --git a/types/blocked/tsconfig.json b/types/blocked/tsconfig.json new file mode 100644 index 0000000000..3b110548b0 --- /dev/null +++ b/types/blocked/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "blocked-tests.ts" + ] +} diff --git a/types/blocked/tslint.json b/types/blocked/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/blocked/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bluebird-retry/bluebird-retry-tests.ts b/types/bluebird-retry/bluebird-retry-tests.ts index e9beaf5562..45a665c969 100644 --- a/types/bluebird-retry/bluebird-retry-tests.ts +++ b/types/bluebird-retry/bluebird-retry-tests.ts @@ -30,3 +30,10 @@ const options: retry.Options = { }; retry(logFail, options); + +function stopErrorExample() { + console.log('retrying\n'); + throw new retry.StopError('stop retrying'); +} + +retry(stopErrorExample); diff --git a/types/bluebird-retry/index.d.ts b/types/bluebird-retry/index.d.ts index 358c75936d..b7ba96495d 100644 --- a/types/bluebird-retry/index.d.ts +++ b/types/bluebird-retry/index.d.ts @@ -20,6 +20,8 @@ declare namespace retry { context?: any; args?: any; } + + class StopError extends Error {} } export = retry; diff --git a/types/body-parser-xml/body-parser-xml-tests.ts b/types/body-parser-xml/body-parser-xml-tests.ts new file mode 100644 index 0000000000..9aab34ecc7 --- /dev/null +++ b/types/body-parser-xml/body-parser-xml-tests.ts @@ -0,0 +1,4 @@ +import bodyParser = require('body-parser'); +import bodyParserXml = require('body-parser-xml'); + +bodyParserXml(bodyParser); diff --git a/types/body-parser-xml/index.d.ts b/types/body-parser-xml/index.d.ts new file mode 100644 index 0000000000..c5de21c062 --- /dev/null +++ b/types/body-parser-xml/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for body-parser-xml 1.1 +// Project: https://github.com/fiznool/body-parser-xml +// Definitions by: tbounsiar +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { Request, RequestHandler, Response, NextFunction } from 'express'; + +declare function bodyParserXml(bodyParser: any): (req: Request, res: Response, next: NextFunction) => void; + +export = bodyParserXml; diff --git a/types/node-common-errors/tsconfig.json b/types/body-parser-xml/tsconfig.json similarity index 92% rename from types/node-common-errors/tsconfig.json rename to types/body-parser-xml/tsconfig.json index a862893b87..c597f3cb08 100644 --- a/types/node-common-errors/tsconfig.json +++ b/types/body-parser-xml/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "node-common-errors-tests.ts" + "body-parser-xml-tests.ts" ] } \ No newline at end of file diff --git a/types/body-parser-xml/tslint.json b/types/body-parser-xml/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/body-parser-xml/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/body-parser/body-parser-tests.ts b/types/body-parser/body-parser-tests.ts index 2f6a33ea72..89d905ead0 100644 --- a/types/body-parser/body-parser-tests.ts +++ b/types/body-parser/body-parser-tests.ts @@ -1,3 +1,4 @@ +import * as http from 'http'; import express = require('express'); import { json, @@ -13,6 +14,21 @@ app.use(raw()); app.use(text()); app.use(urlencoded()); +const jsonParser = app.use(json({ + inflate: true, + limit: '100kb', + type: 'application/*', + verify: ( + req: http.IncomingMessage, + res: http.ServerResponse, + buf: Buffer, + encoding: string + ) => { + return true; + } +})); +app.use(jsonParser); + // send any data, it should be parsed and printed app.all('/', (req, res, next) => { console.log(req.body); diff --git a/types/body-parser/index.d.ts b/types/body-parser/index.d.ts index b1485770a1..67774e2149 100644 --- a/types/body-parser/index.d.ts +++ b/types/body-parser/index.d.ts @@ -1,24 +1,30 @@ -// Type definitions for body-parser 1.16 +// Type definitions for body-parser 1.17 // Project: https://github.com/expressjs/body-parser -// Definitions by: Santi Albo , Vilic Vane , Jonathan Häberle , Gevik Babakhani , Tomasz Łaziuk +// Definitions by: Santi Albo +// Vilic Vane +// Jonathan Häberle +// Gevik Babakhani +// Tomasz Łaziuk +// Jason Walton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 /// -import { Request, RequestHandler, Response } from 'express'; +import { NextHandleFunction } from 'connect'; +import * as http from 'http'; // for docs go to https://github.com/expressjs/body-parser/tree/1.16.0#body-parser // @deprecated -declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): RequestHandler; +declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): NextHandleFunction; declare namespace bodyParser { interface Options { inflate?: boolean; limit?: number | string; - type?: string | string[] | ((req: Request) => any); - verify?(req: Request, res: Response, buf: Buffer, encoding: string): void; + type?: string | string[] | ((req: http.IncomingMessage) => any); + verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void; } interface OptionsJson extends Options { @@ -35,13 +41,13 @@ declare namespace bodyParser { parameterLimit?: number; } - function json(options?: OptionsJson): RequestHandler; + function json(options?: OptionsJson): NextHandleFunction; - function raw(options?: Options): RequestHandler; + function raw(options?: Options): NextHandleFunction; - function text(options?: OptionsText): RequestHandler; + function text(options?: OptionsText): NextHandleFunction; - function urlencoded(options?: OptionsUrlencoded): RequestHandler; + function urlencoded(options?: OptionsUrlencoded): NextHandleFunction; } export = bodyParser; diff --git a/types/browser-sync/browser-sync-tests.ts b/types/browser-sync/browser-sync-tests.ts index 613f8aee25..c63cb0c862 100644 --- a/types/browser-sync/browser-sync-tests.ts +++ b/types/browser-sync/browser-sync-tests.ts @@ -167,8 +167,8 @@ browserSync({ browserSync({ proxy: { target: "http://yourlocal.dev", - proxyRes: function (proxyRes, req, res) { - console.log(proxyRes); + proxyRes: function (proxyResponse, req, res) { + console.log(proxyResponse); } } }); @@ -177,8 +177,28 @@ browserSync({ proxy: { target: "http://yourlocal.dev", proxyRes: [ - function (proxyRes, req, res) { - console.log(proxyRes); + function (proxyResponse, req, res) { + console.log(proxyResponse); + } + ] + } +}); + +browserSync({ + proxy: { + target: "http://yourlocal.dev", + proxyRes: function (res) { + console.log(res); + } + } +}); + +browserSync({ + proxy: { + target: "http://yourlocal.dev", + proxyRes: [ + function (res) { + console.log(res); } ] } diff --git a/types/browser-sync/index.d.ts b/types/browser-sync/index.d.ts index 3b97fc8616..de0a457266 100644 --- a/types/browser-sync/index.d.ts +++ b/types/browser-sync/index.d.ts @@ -39,7 +39,7 @@ declare namespace browserSync { * Specify which file events to respond to. * Available events: `add`, `change`, `unlink`, `addDir`, `unlinkDir` */ - watchEvents?: string[]; + watchEvents?: WatchEvents | string[]; /** * Watch files automatically. */ @@ -72,7 +72,7 @@ declare namespace browserSync { * ws - Default: undefined * middleware - Default: undefined * reqHeaders - Default: undefined - * proxyRes - Default: undefined + * proxyRes - Default: undefined (http.ServerResponse if expecting single parameter) * proxyReq - Default: undefined */ proxy?: string | ProxyOptions; @@ -91,7 +91,7 @@ declare namespace browserSync { * Default: [] * Note: Requires at least version 2.8.0. */ - serveStatic?: (string | { route?: string | string[], dir?: string | string[]})[]; + serveStatic?: StaticOptions[] | string[]; /** * Options that are passed to the serve-static middleware when you use the * string[] syntax: eg: `serveStatic: ['./app']`. @@ -120,7 +120,7 @@ declare namespace browserSync { * Can be either "info", "debug", "warn", or "silent" * Default: info */ - logLevel?: string; + logLevel?: LogLevel; /** * Change the console logging prefix. Useful if you're creating your own project based on Browsersync * Default: BS @@ -170,7 +170,7 @@ declare namespace browserSync { * Decide which URL to open automatically when Browsersync starts. Defaults to "local" if none set. * Can be true, local, external, ui, ui-external, tunnel or false */ - open?: string | boolean; + open?: OpenOptions | boolean; /** * The browser(s) to open * Default: default @@ -320,6 +320,12 @@ declare namespace browserSync { excludeFileTypes?: string[]; } + type WatchEvents = "add" | "change" | "unlink" | "addDir" | "unlinkDir"; + + type LogLevel = "info" | "debug" | "warn" | "silent"; + + type OpenOptions = "local" | "external" | "ui" | "ui-external" | "tunnel"; + interface Hash { [path: string]: T; } @@ -353,16 +359,21 @@ declare namespace browserSync { routes?: Hash; /** configure custom middleware */ middleware?: (MiddlewareHandler | PerRouteMiddleware)[]; - serveStaticOptions?: ServeStaticOptions + serveStaticOptions?: ServeStaticOptions; } interface ProxyOptions { target?: string; middleware?: MiddlewareHandler; ws?: boolean; - reqHeaders?: (config: any) => Hash; - proxyRes?: ((res: http.ServerResponse, req: http.IncomingMessage, next: Function) => any)[] | ((res: http.ServerResponse, req: http.IncomingMessage, next: Function) => any); - proxyReq?: ((res: http.ServerRequest) => any)[] | ((res: http.ServerRequest) => any); + reqHeaders?: (config: object) => Hash; + proxyRes?: ProxyResponseMiddleware | ProxyResponseMiddleware[]; + proxyReq?: ((res: http.ServerRequest) => void)[] | ((res: http.ServerRequest) => void); + error?: (err: NodeJS.ErrnoException, req: http.IncomingMessage, res: http.ServerResponse) => void; + } + + interface ProxyResponseMiddleware { + (proxyRes: http.ServerResponse | http.IncomingMessage, res: http.ServerResponse, req: http.IncomingMessage): void; } interface HttpsOptions { @@ -370,11 +381,17 @@ declare namespace browserSync { cert?: string; } + interface StaticOptions { + route: string | string[], + dir: string | string[] + } + interface MiddlewareHandler { - (req: http.IncomingMessage, res: http.ServerResponse, next: Function): any; + (req: http.IncomingMessage, res: http.ServerResponse, next: () => void): any; } interface PerRouteMiddleware { + id?: string; route: string; handle: MiddlewareHandler; } @@ -382,18 +399,23 @@ declare namespace browserSync { interface GhostOptions { clicks?: boolean; scroll?: boolean; - forms?: boolean | { - submit?: boolean; - inputs?: boolean; - toggles?: boolean; - }; + forms?: FormsOptions | boolean; + } + + interface FormsOptions { + inputs: boolean, + submit: boolean, + toggles: boolean } interface SnippetOptions { - async?: boolean, + async?: boolean; whitelist?: string[], blacklist?: string[], - rule?: { match?: RegExp; fn?: (snippet: string, match: string) => any }; + rule?: { + match?: RegExp; + fn?: (snippet: string, match: string) => any + }; } interface SocketOptions { diff --git a/types/btoa/btoa-tests.ts b/types/btoa/btoa-tests.ts new file mode 100644 index 0000000000..d09cdad23a --- /dev/null +++ b/types/btoa/btoa-tests.ts @@ -0,0 +1,3 @@ +import btoa from 'btoa'; + +btoa('foo'); diff --git a/types/btoa/index.d.ts b/types/btoa/index.d.ts new file mode 100644 index 0000000000..cc311ed836 --- /dev/null +++ b/types/btoa/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for btoa 1.2 +// Project: https://git.coolaj86.com/coolaj86/btoa.js +// Definitions by: John Wright +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export default function(str: string): string; diff --git a/types/btoa/tsconfig.json b/types/btoa/tsconfig.json new file mode 100644 index 0000000000..da4e373e68 --- /dev/null +++ b/types/btoa/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "lib": ["es6"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "btoa-tests.ts" + ] +} diff --git a/types/btoa/tslint.json b/types/btoa/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/btoa/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts b/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts index c93c4a1d04..cd35998db8 100644 --- a/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts +++ b/types/chai-jest-snapshot/chai-jest-snapshot-tests.ts @@ -1,4 +1,4 @@ -import chaiJestSnapshot from 'chai-jest-snapshot'; +import * as chaiJestSnapshot from 'chai-jest-snapshot'; import { expect } from 'chai'; chai.use(chaiJestSnapshot); diff --git a/types/chai-jest-snapshot/index.d.ts b/types/chai-jest-snapshot/index.d.ts index 470e4fa423..27ec049b14 100644 --- a/types/chai-jest-snapshot/index.d.ts +++ b/types/chai-jest-snapshot/index.d.ts @@ -40,4 +40,4 @@ interface ChaiJestSnapshot { } declare var ChaiJestSnapshot: ChaiJestSnapshot; -export default ChaiJestSnapshot; +export = ChaiJestSnapshot; diff --git a/types/chai-spies/chai-spies-tests.ts b/types/chai-spies/chai-spies-tests.ts index 1d99f0add2..f5247ba13f 100644 --- a/types/chai-spies/chai-spies-tests.ts +++ b/types/chai-spies/chai-spies-tests.ts @@ -88,6 +88,27 @@ spyStringArg('foo'); expect(spyStringArg).to.have.been.called.always.with.exactly('foo'); spyStringArg.should.have.been.called.always.with.exactly('foo'); +// .first / .second / .third +const spyStringIteratedArg = chai.spy((arg: string) => arg); +spyStringIteratedArg('foo'); +spyStringIteratedArg('bar'); +spyStringIteratedArg('baz'); +expect(spyStringIteratedArg).to.have.been.first.called.with('foo'); +spyStringIteratedArg.should.have.been.first.called.with('foo'); +expect(spyStringIteratedArg).to.have.been.first.called.with('bar'); +spyStringIteratedArg.should.have.been.first.called.with('bar'); +expect(spyStringIteratedArg).to.have.been.first.called.with('baz'); +spyStringIteratedArg.should.have.been.first.called.with('baz'); + +// .nth +const spyStringNthArg = chai.spy((arg: string) => arg); +spyStringNthArg('foo'); +spyStringNthArg('bar'); +expect(spyStringNthArg).on.nth(1).be.called.with('foo'); +spyStringNthArg.should.on.nth(1).be.called.with('foo'); +expect(spyStringNthArg).on.nth(2).be.called.with('bar'); +spyStringNthArg.should.on.nth(2).be.called.with('bar'); + // .once expect(spy).to.have.been.called.once; expect(spy).to.not.have.been.called.once; diff --git a/types/chai-spies/index.d.ts b/types/chai-spies/index.d.ts index ffed6e594b..75f702ca37 100644 --- a/types/chai-spies/index.d.ts +++ b/types/chai-spies/index.d.ts @@ -10,6 +10,10 @@ declare namespace Chai { spy: ChaiSpies.Spy; } + interface LanguageChains { + on: Assertion; + } + interface Assertion { /** * ####.spy @@ -31,6 +35,28 @@ declare namespace Chai { * Note that ```called``` can be used as a chainable method. */ called: ChaiSpies.Called; + + /** + * * ####.been + * * Assert that something has been spied on. Negation passes through. + * * ```ts + * * expect(spy).to.have.been.called(); + * * spy.should.have.been.called(); + * ``` + * Note that ```been``` can be used as a chainable method. + */ + been: ChaiSpies.Been; + + /** + * * ####.nth (function) + * * Assert that something has been spied on on a certain index. Negation passes through. + * * ```ts + * * expect(spy).on.nth(5).be.called.with('foobar'); + * * spy.should.on.nth(5).be.called.with('foobar'); + * ``` + * Note that ```nth``` can be used as a chainable method. + */ + nth(index: number): Assertion; } } @@ -224,6 +250,47 @@ declare namespace ChaiSpies { lt(n: number): Chai.Assertion; } + interface Been extends Chai.Assertion { + (): Chai.Assertion; + called: Called; + + /** + * ####.first + * Assert that a spy has been called first. + * ```ts + * expect(spy).to.have.been.called.first; + * expect(spy).to.not.have.been.called.first; + * spy.should.have.been.called.first; + * spy.should.not.have.been.called.first; + * ``` + */ + first: Chai.Assertion; + + /** + * ####.second + * Assert that a spy has been called second. + * ```ts + * expect(spy).to.have.been.called.second; + * expect(spy).to.not.have.been.called.second; + * spy.should.have.been.called.second; + * spy.should.not.have.been.called.second; + * ``` + */ + second: Chai.Assertion; + + /** + * ####.third + * Assert that a spy has been called third. + * ```ts + * expect(spy).to.have.been.called.third; + * expect(spy).to.not.have.been.called.third; + * spy.should.have.been.called.third; + * spy.should.not.have.been.called.third; + * ``` + */ + third: Chai.Assertion; + } + interface With { /** * ####.with diff --git a/types/chai-uuid/chai-uuid-tests.ts b/types/chai-uuid/chai-uuid-tests.ts new file mode 100644 index 0000000000..0620464988 --- /dev/null +++ b/types/chai-uuid/chai-uuid-tests.ts @@ -0,0 +1,15 @@ +import { assert, expect, use, should } from 'chai'; +import chaiUuid = require('chai-uuid'); + +use(chaiUuid); +should(); + +// bdd style +expect('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7').to.be.uuid('v4'); +expect('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7').to.be.guid; +expect('invalid').to.not.be.uuid('v4'); +expect('invalid').to.not.be.guid(); + +// tdd style +assert.uuid('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7', 'v4'); +assert.guid('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7'); diff --git a/types/chai-uuid/index.d.ts b/types/chai-uuid/index.d.ts new file mode 100644 index 0000000000..23a0b6db92 --- /dev/null +++ b/types/chai-uuid/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for chai-uuid 1.0 +// Project: https://github.com/rfrench/chai-uuid +// Definitions by: Harm van der Werf +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// +/// + +declare global { + namespace Chai { + type UuidVersion = 'v1' | 'v2' | 'v3' | 'v4' | 'v5' | ''; + + interface Assertion extends LanguageChains, NumericComparison, TypeComparison { + uuid(uuid?: UuidVersion): void; + guid(guid?: any): void; + } + + interface Assert { + uuid(uuid: string, version?: UuidVersion): void; + guid(guid: string, version?: any): void; + } + } +} + +declare function chaiUuid(chai: any, utils: any): void; +export = chaiUuid; diff --git a/types/chai-uuid/tsconfig.json b/types/chai-uuid/tsconfig.json new file mode 100644 index 0000000000..ca2ca40071 --- /dev/null +++ b/types/chai-uuid/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chai-uuid-tests.ts" + ] +} diff --git a/types/chai-uuid/tslint.json b/types/chai-uuid/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chai-uuid/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/chai/chai-tests.ts b/types/chai/chai-tests.ts index 57b7d127ac..f19514fe71 100644 --- a/types/chai/chai-tests.ts +++ b/types/chai/chai-tests.ts @@ -191,6 +191,18 @@ function within() { expect(10).to.be.within(50, 100, 'blah'); (10).should.be.within(50, 100, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40')); + new Date('December 17, 1995 03:24:30').should.not.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40')); + new Date('December 17, 1995 03:24:30').should.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.within(new Date('December 17, 1995 03:24:20'), new Date('December 17, 1995 03:24:40'), 'blah'); + expect('foo').to.have.length.within(5, 7, 'blah'); 'foo'.should.have.length.within(5, 7, 'blah'); @@ -218,6 +230,18 @@ function above() { expect(10).to.not.be.above(6, 'blah'); (10).should.not.be.above(6, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.above(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.not.be.above(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.above(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.be.above(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.above(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.above(new Date('December 17, 1995 03:24:20'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.above(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.above(new Date('December 17, 1995 03:24:20'), 'blah'); + expect('foo').to.have.length.above(4, 'blah'); 'foo'.should.have.length.above(4, 'blah'); @@ -243,6 +267,18 @@ function least() { expect(10).to.not.be.at.least(6, 'blah'); (10).should.not.be.at.least(6, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.least(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.not.be.least(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.least(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.be.least(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.least(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.least(new Date('December 17, 1995 03:24:20'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.least(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.least(new Date('December 17, 1995 03:24:20'), 'blah'); + expect('foo').to.have.length.of.at.least(4, 'blah'); 'foo'.should.have.length.of.at.least(4, 'blah'); @@ -273,6 +309,18 @@ function below() { expect(6).to.not.be.below(10, 'blah'); (6).should.not.be.below(10, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.below(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.not.be.below(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.below(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.be.below(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.below(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.below(new Date('December 17, 1995 03:24:20'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.below(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.below(new Date('December 17, 1995 03:24:20'), 'blah'); + expect('foo').to.have.length.below(2, 'blah'); 'foo'.should.have.length.below(2, 'blah'); @@ -300,6 +348,18 @@ function most() { expect(6).to.not.be.at.most(10, 'blah'); (6).should.not.be.at.most(10, 'blah'); + expect(new Date('December 17, 1995 03:24:30')).to.not.be.most(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.not.be.most(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.be.most(new Date('December 17, 1995 03:24:20')); + new Date('December 17, 1995 03:24:30').should.be.most(new Date('December 17, 1995 03:24:20')); + + expect(new Date('December 17, 1995 03:24:30')).to.not.be.most(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.not.be.most(new Date('December 17, 1995 03:24:20'), 'blah'); + + expect(new Date('December 17, 1995 03:24:30')).to.be.most(new Date('December 17, 1995 03:24:20'), 'blah'); + new Date('December 17, 1995 03:24:30').should.be.most(new Date('December 17, 1995 03:24:20'), 'blah'); + expect('foo').to.have.length.of.at.most(2, 'blah'); 'foo'.should.have.length.of.at.most(2, 'blah'); diff --git a/types/chai/index.d.ts b/types/chai/index.d.ts index 02bca8909f..d0f5ab099c 100644 --- a/types/chai/index.d.ts +++ b/types/chai/index.d.ts @@ -9,6 +9,7 @@ // Shaun Luttin // Gintautas Miselis // Satana Charuwichitratana +// Erik Schierboom // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Chai { @@ -150,10 +151,11 @@ declare namespace Chai { most: NumberComparer; lte: NumberComparer; within(start: number, finish: number, message?: string): Assertion; + within(start: Date, finish: Date, message?: string): Assertion; } interface NumberComparer { - (value: number, message?: string): Assertion; + (value: number | Date, message?: string): Assertion; } interface TypeComparison { diff --git a/types/chardet/chardet-tests.ts b/types/chardet/chardet-tests.ts new file mode 100644 index 0000000000..7c06d2cc61 --- /dev/null +++ b/types/chardet/chardet-tests.ts @@ -0,0 +1,7 @@ +import * as chardet from "chardet"; + +chardet.detect(new Buffer('hello there!')); +chardet.detectFile('/path/to/file', (err, encoding) => {}); +chardet.detectFileSync('/path/to/file'); + +chardet.detectFile('/path/to/file', { sampleSize: 32 }, (err, encoding) => {}); diff --git a/types/chardet/index.d.ts b/types/chardet/index.d.ts new file mode 100644 index 0000000000..20324be60e --- /dev/null +++ b/types/chardet/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for chardet 0.5 +// Project: https://github.com/runk/node-chardet +// Definitions by: Hauke Oldsen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export interface Confidence { + name: string; + confidence: number; + lang?: string; +} + +export interface Options { + returnAllMatches?: boolean; + sampleSize?: number; +} + +export type Result = Confidence[] | string | null; + +export function detect(buf: Buffer, opts?: Options): Result; + +export function detectFile(path: string, cb: (err: any, result: Result) => void): void; +export function detectFile(path: string, opts: Options, cb: (err: any, result: Result) => void): void; + +export function detectFileSync(path: string, opts?: Options): Result; diff --git a/types/chardet/tsconfig.json b/types/chardet/tsconfig.json new file mode 100644 index 0000000000..6215a6303f --- /dev/null +++ b/types/chardet/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chardet-tests.ts" + ] +} diff --git a/types/chardet/tslint.json b/types/chardet/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chardet/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 2c5de28962..04d2e182ee 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -10,6 +10,7 @@ // Guillaume Rodriguez // Sergey Rubanov // Simon Archer +// Ken Elkabany // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -166,8 +167,9 @@ declare namespace Chart { interface ChartPoint { x?: number | string | Date; - y?: number; + y?: number | string | Date; r?: number; + t?: number | string | Date; } interface ChartConfiguration { @@ -219,7 +221,7 @@ declare namespace Chart { interface ChartTitleOptions { display?: boolean; position?: PositionType; - fullWdith?: boolean; + fullWidth?: boolean; fontSize?: number; fontFamily?: string; fontColor?: ChartColor; @@ -422,6 +424,7 @@ declare namespace Chart { padding?: number; reverse?: boolean; showLabelBackdrop?: boolean; + source?: 'auto' | 'data' | 'labels'; } interface AngleLineOptions { @@ -510,6 +513,7 @@ declare namespace Chart { gridLines?: GridLineOptions; barThickness?: number; scaleLabel?: ScaleTitleOptions; + offset?: boolean; beforeUpdate?(scale?: any): void; beforeSetDimension?(scale?: any): void; beforeDataLimits?(scale?: any): void; @@ -529,6 +533,7 @@ declare namespace Chart { interface ChartXAxe extends CommonAxe { categoryPercentage?: number; barPercentage?: number; + distribution?: 'linear' | 'series'; time?: TimeScale; } diff --git a/types/chosen-js/chosen-js-tests.ts b/types/chosen-js/chosen-js-tests.ts index 575b7503ea..811ff4994b 100644 --- a/types/chosen-js/chosen-js-tests.ts +++ b/types/chosen-js/chosen-js-tests.ts @@ -1,5 +1,3 @@ - - // Options $(".my_select_box").chosen(); @@ -12,14 +10,23 @@ $(".my_select_box").chosen({ width: "95%" }); +$(".chosen-select").chosen({ + rtl: true +}); + // Destroy $(".my_select_box").chosen("destroy"); // Triggered Events -$(".my_select_box").on("change", function(evt, params) { +$(".my_select_box").on("change", (evt, params) => { evt.preventDefault(); - let s = params.selected; - console.log(s); + const s: string = params.selected; + const d: string = params.deselected; + console.log(s, d); +}); + +$(".chosen-select").on("chosen:maxselected", () => { + alert("Max selected"); }); // Triggerable Events diff --git a/types/chosen-js/index.d.ts b/types/chosen-js/index.d.ts index c9a5556c26..e9a67550db 100644 --- a/types/chosen-js/index.d.ts +++ b/types/chosen-js/index.d.ts @@ -1,9 +1,11 @@ -// Type definitions for Chosen.JQuery 1.6.1 +// Type definitions for Chosen 1.8 // Project: http://harvesthq.github.com/chosen/ -// Definitions by: Boris Yankov , denis +// Definitions by: Boris Yankov , denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +// Validated against Chosen version 1.8.5 + /// declare namespace Chosen { @@ -11,71 +13,107 @@ declare namespace Chosen { type TriggerEvent = "chosen:updated" | "chosen:activate" | "chosen:open" | "chosen:close"; interface Options { - /**When set to true on a single select, Chosen adds a UI element which selects the first element (if it is blank). - * @default: false + /** + * When set to true on a single select, Chosen adds a UI element which selects the first element (if it is blank). + * @default false */ allow_single_deselect?: boolean; - /**By default Chosen's search is case-insensitive. Setting this option to true makes the search case-sensitive. - * @default: false + /** + * By default, Chosen's search is case-insensitive. Setting this option to true makes the search case-sensitive. + * @default false */ case_sensitive_search?: boolean; - /**When set to true, Chosen will not display the search field (single selects only). - * @default: false + /** + * When set to true, Chosen will not display the search field (single selects only). + * @default false */ disable_search?: boolean; - /**Hide the search input on single selects if there are n or fewer options. - * @default: 0 + /** + * Hide the search input on single selects if there are n or fewer options. + * @default 0 */ disable_search_threshold?: number; - /**By default, searching will match on any word within an option tag. Set this option to false if you want to only match on the entire text of an option tag. - * @default: true + /** + * By default, searching will match on any word within an option tag. Set this option to false if you want to only match on the entire text of an option tag. + * @default true */ enable_split_word_search?: boolean; - /**When set to true, Chosen will grab any classes on the original select field and add them to Chosen’s container div. - * @default: false + /** + * By default, Chosen will search group labels as well as options, and filter to show all options below matching groups. Set this to false to search only in the options. + * @default true + */ + group_search?: boolean; + /** + * By default, Chosen's results are hidden after a option is selected. Setting this option to false will keep the results open after selection. This only applies to multiple selects. + * @default true + */ + hide_results_on_select?: boolean; + /** + * When set to true, Chosen will grab any classes on the original select field and add them to Chosen’s container div. + * @default false */ inherit_select_classes?: boolean; - /**Limits how many options the user can select. When the limit is reached, the chosen:maxselected event is triggered. - * @default: Infinity + /** + * Limits how many options the user can select. When the limit is reached, the `chosen:maxselected` event is triggered. + * @default Infinity */ max_selected_options?: number; - /**The text to be displayed when no matching results are found. The current search is shown at the end of the text (e.g., No results match "Bad Search"). - * @default: "No results match" + /** + * The text to be displayed when no matching results are found. The current search is shown at the end of the text (e.g., No results match "Bad Search"). + * @default "No results match" */ no_results_text?: string; - /**The text to be displayed as a placeholder when no options are selected for a multiple select. - * @default: "Select Some Options" + /** + * The text to be displayed as a placeholder when no options are selected for a multiple select. + * @default "Select Some Options" */ placeholder_text_multiple?: string; - /**The text to be displayed as a placeholder when no options are selected for a single select. - * @default: "Select an Option" + /** + * The text to be displayed as a placeholder when no options are selected for a single select. + * @default "Select an Option" */ placeholder_text_single?: string; - /**By default, Chosen’s search matches starting at the beginning of a word. Setting this option to true allows matches starting from anywhere within a word. This is especially useful for options that include a lot of special characters or phrases in ()s and []s. - * @default: false + /** + * Chosen supports right-to-left text in select boxes. Set this option to true to support right-to-left text options. + * @default false + */ + rtl?: boolean; + /** + * By default, Chosen’s search matches starting at the beginning of a word. Setting this option to true allows matches starting from anywhere within a word. + * This is especially useful for options that include a lot of special characters or phrases in ()s and []s. + * @default false */ search_contains?: boolean; - /**By default, pressing delete/backspace on multiple selects will remove a selected choice. When false, pressing delete/backspace will highlight the last choice, and a second press deselects it. - * @default: true + /** + * By default, pressing delete/backspace on multiple selects will remove a selected choice. + * When false, pressing delete/backspace will highlight the last choice, and a second press deselects it. + * @default true */ single_backstroke_delete?: boolean; - /**The width of the Chosen select box. By default, Chosen attempts to match the width of the select box you are replacing. If your select is hidden when Chosen is instantiated, you must specify a width or the select will show up with a width of 0. */ + /** + * The width of the Chosen select box. By default, Chosen attempts to match the width of the select box you are replacing. + * If your select is hidden when Chosen is instantiated, you must specify a width or the select will show up with a width of 0. + */ width?: string; - /**By default, Chosen includes disabled options in search results with a special styling. Setting this option to false will hide disabled results and exclude them from searches. - * @default: true + /** + * By default, Chosen includes disabled options in search results with a special styling. Setting this option to false will hide disabled results and exclude them from searches. + * @default true */ display_disabled_options?: boolean; - /**By default, Chosen includes selected options in search results with a special styling. Setting this option to false will hide selected results and exclude them from searches. + /** + * By default, Chosen includes selected options in search results with a special styling. Setting this option to false will hide selected results and exclude them from searches. * Note: this is for multiple selects only. In single selects, the selected result will always be displayed. - * @default: true + * @default true */ display_selected_options?: boolean; - /**By default, Chosen only shows the text of a selected option. Setting this option to true will show the text and group (if any) of the selected option. - * @default: false + /** + * By default, Chosen only shows the text of a selected option. Setting this option to true will show the text and group (if any) of the selected option. + * @default false */ include_group_label_in_selected?: boolean; - /**Only show the first (n) matching options in the results. This can be used to increase performance for selects with very many options. - * @default: Infinity + /** + * Only show the first (n) matching options in the results. This can be used to increase performance for selects with very many options. + * @default Infinity */ max_shown_results?: number; } @@ -87,13 +125,27 @@ declare namespace Chosen { } interface JQuery { - chosen(): JQuery; - chosen(options: Chosen.Options | "destroy"): JQuery; + chosen(options?: Chosen.Options | "destroy"): JQuery; - /**Chosen triggers the standard DOM event whenever a selection is made (it also sends a selected or deselected parameter that tells you which option was changed). */ + /** + * Chosen triggers the standard DOM event whenever a selection is made (it also sends a selected or deselected parameter that tells you which option was changed). + */ on(events: "change", handler: (eventObject: JQueryEventObject, args: Chosen.SelectedData) => any): JQuery; + /** + * * `chosen:ready` Triggered after Chosen has been fully instantiated. + * * `chosen:maxselected` Triggered if max_selected_options is set and that total is broken. + * * `chosen:showing_dropdown` Triggered when Chosen’s dropdown is opened. + * * `chosen:hiding_dropdown` Triggered when Chosen’s dropdown is closed. + * * `chosen:no_results` Triggered when a search returns no matching results. + */ on(events: Chosen.OnEvent, handler: (eventObject: JQueryEventObject) => any): JQuery; + /** + * * `chosen:updated` This event should be triggered whenever Chosen’s underlying select element changes (such as a change in selected options). + * * `chosen:activate` This is the equivalant of focusing a standard HTML select field. When activated, Chosen will capure keypress events as if you had clicked the field directly. + * * `chosen:open` This event activates Chosen and also displays the search results. + * * `chosen:close` This event deactivates Chosen and hides the search results. + */ trigger(eventType: Chosen.TriggerEvent): JQuery; } diff --git a/types/chosen-js/tsconfig.json b/types/chosen-js/tsconfig.json index 9f4ce049cb..93360e6201 100644 --- a/types/chosen-js/tsconfig.json +++ b/types/chosen-js/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/chosen-js/tslint.json b/types/chosen-js/tslint.json index a41bf5d19a..f93cf8562a 100644 --- a/types/chosen-js/tslint.json +++ b/types/chosen-js/tslint.json @@ -1,79 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "extends": "dtslint/dt.json" } diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 466f09107d..d2b92e4b22 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -263,6 +263,7 @@ declare namespace chrome.bookmarks { export interface BookmarkRemoveInfo { index: number; parentId: string; + node: BookmarkTreeNode; } export interface BookmarkMoveInfo { diff --git a/types/chromedriver/chromedriver-tests.ts b/types/chromedriver/chromedriver-tests.ts new file mode 100644 index 0000000000..abafb29676 --- /dev/null +++ b/types/chromedriver/chromedriver-tests.ts @@ -0,0 +1,11 @@ +import * as chromeDriver from 'chromedriver'; +import { ChildProcess } from 'child_process'; + +const chromeDriverPath: string = chromeDriver.path; +const chromeDriverVersion: string = chromeDriver.version; + +chromeDriver.start(); +chromeDriver.stop(); + +const driverProcess: ChildProcess = chromeDriver.start(['a', 'b', 'c']); +const chromeDriverDefaultInstance: ChildProcess | undefined = chromeDriver.defaultInstance; diff --git a/types/chromedriver/index.d.ts b/types/chromedriver/index.d.ts new file mode 100644 index 0000000000..af48749615 --- /dev/null +++ b/types/chromedriver/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for chromedriver 2.38 +// Project: https://github.com/giggio/node-chromedriver +// Definitions by: Peter Safranek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { ChildProcess } from 'child_process'; + +export const path: string; +export const version: string; +export function start(args?: ReadonlyArray): ChildProcess; +export function stop(): void; +export let defaultInstance: ChildProcess | undefined; diff --git a/types/chromedriver/tsconfig.json b/types/chromedriver/tsconfig.json new file mode 100644 index 0000000000..3727446dd9 --- /dev/null +++ b/types/chromedriver/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chromedriver-tests.ts" + ] +} diff --git a/types/chromedriver/tslint.json b/types/chromedriver/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chromedriver/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cleave.js/cleave.js-tests.tsx b/types/cleave.js/cleave.js-tests.tsx index 825b44a2ad..eb682d432b 100644 --- a/types/cleave.js/cleave.js-tests.tsx +++ b/types/cleave.js/cleave.js-tests.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import Cleave = require("cleave.js"); import CleaveReact = require("cleave.js/react"); -const Example1 = () => { +const ExampleSelector1 = () => { const cleave = new Cleave("#my-input", { phone: true }); cleave.setPhoneRegionCode("AT"); cleave.setRawValue("foo"); @@ -11,6 +11,15 @@ const Example1 = () => { cleave.destroy(); }; +const ExampleElement1 = () => { + const input: HTMLElement = new HTMLElement(); + + const cleave = new Cleave(input, { date: true }); + cleave.setRawValue("2001/01/01"); + const formattedDate: string = cleave.getISOFormatDate(); + cleave.destroy(); +}; + const ExampleReact1 = (props: any) => { return ( , // J Giancono , // Alex Shakun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { CleaveOptions } from './options'; declare class Cleave { - constructor(selector: string, options: CleaveOptions); + constructor(selector: string | HTMLElement, options: CleaveOptions); getRawValue(): string; @@ -17,6 +17,8 @@ declare class Cleave { getFormattedValue(): string; + getISOFormatDate(): string; + destroy(): void; setPhoneRegionCode(regionCode: string): void; diff --git a/types/cli-progress/cli-progress-tests.ts b/types/cli-progress/cli-progress-tests.ts new file mode 100644 index 0000000000..b9fa6d5057 --- /dev/null +++ b/types/cli-progress/cli-progress-tests.ts @@ -0,0 +1,92 @@ +import progress = require('cli-progress'); + +function test0() { + // Usage + // Multiple examples are available e.g.example.js - just try it $ node example.js + + const _cliProgress = require('cli-progress'); + + // create a new progress bar instance and use shades_classic theme + const bar1 = new _cliProgress.Bar({}, _cliProgress.Presets.shades_classic); + + // start the progress bar with a total value of 200 and start value of 0 + bar1.start(200, 0); + + // update the current value in your application.. + bar1.update(100); + + // stop the progress bar + bar1.stop(); +} + +function test1() { + // Examples + // Example 1 - Set Options + + // change the progress characters + // set fps limit to 5 + // change the output stream and barsize + const bar = new progress.Bar({ + barCompleteChar: '#', + barIncompleteChar: '.', + fps: 5, + stream: process.stdout, + barsize: 65 + }); +} + +function test2() { + // Example 2 - Change Styles defined by Preset + // uee shades preset + // change the barsize + const bar = new progress.Bar({ + barsize: 65 + }, progress.Presets.shades_grey); +} + +function test3() { + // Example 3 - Custom Payload + // create new progress bar with custom token "speed" + const bar = new progress.Bar({ + format: 'progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total} | Speed: {speed} kbit' + }); + + // initialize the bar - set payload token "speed" with the default value "N/A" + bar.start(200, 0, { + speed: "N/A" + }); + + // some code/update loop + // ... + + // update bar value. set custom token "speed" to 125 + bar.update(5, { + speed: '125' + }); + + // process finished + bar.stop(); +} + +function test4() { + // Example 4 - Custom Presets + // File mypreset.js + + const _colors = require('colors'); + + module.exports = { + format: _colors.red(' {bar}') + ' {percentage}% | ETA: {eta}s | {value}/{total} | Speed: {speed} kbit', + barCompleteChar: '\u2588', + barIncompleteChar: '\u2591' + }; +} + +function test5() { + // Application + + const _mypreset = require('./mypreset.js'); + + const bar = new progress.Bar({ + barsize: 65 + }, _mypreset); +} diff --git a/types/cli-progress/index.d.ts b/types/cli-progress/index.d.ts new file mode 100644 index 0000000000..3ac9dfe8a3 --- /dev/null +++ b/types/cli-progress/index.d.ts @@ -0,0 +1,114 @@ +// Type definitions for cli-progress 1.8 +// Project: https://github.com/AndiDittrich/Node.CLI-Progress +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +export interface Options { + /** + * progress bar output format. + * The progressbar can be customized by using the following build-in placeholders. They can be combined in any order. + * {bar} - the progress bar, customizable by the options barsize, barCompleteString and barIncompleteString + * {percentage} - the current progress in percent (0-100) + * {total} - the end value + * {value} - the current value set by last update() call + * {eta} - expected time of accomplishment in seconds + * {duration} - elapsed time in seconds + * {eta_formatted} - expected time of accomplishment formatted into appropriate units + * {duration_formatted} - elapsed time formatted into appropriate units + * + * Example: + * progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total} + * is rendered as + * progress [========================================] 100% | ETA: 0s | 200/200 + */ + format?: string; + + /** the maximum update rate (default: 10) */ + fps?: number; + + /** output stream to use (default: process.stderr) */ + stream?: NodeJS.WritableStream; + + /** automatically call stop() when the value reaches the total (default: false) */ + stopOnComplete?: boolean; + + /** clear the progress bar on complete / stop() call (default: false) */ + clearOnComplete?: boolean; + + /** the length of the progress bar in chars (default: 40) */ + barsize?: number; + + /** character to use as "complete" indicator in the bar (default: "=") */ + barCompleteString?: string; + + /** character to use as "incomplete" indicator in the bar (default: "-") */ + barIncompleteString?: string; + + /** character to use as "complete" indicator in the bar (default: "=") */ + barCompleteChar?: string; + + /** character to use as "incomplete" indicator in the bar (default: "-") */ + barIncompleteChar?: string; + + /** hide the cursor during progress operation; restored on complete (default: false) */ + hideCursor?: boolean; + + /** number of updates with which to calculate the eta; higher numbers give a more stable eta (default: 10) */ + etaBuffer?: number; + + /** disable line wrapping (default: false) - pass null to keep terminal settings; pass true to trim the output to terminal width */ + linewrap?: boolean | null; +} + +export interface Preset { + barCompleteChar: string; + barIncompleteChar: string; + format: string; +} + +export class Bar { + /** Initialize a new Progress bar. An instance can be used multiple times! it's not required to re-create it! */ + constructor(opt: Options, preset?: Preset); + + calculateETA(): void; + + formatTime(t: any, roundToMultipleOf: any): any; + + getTotal(): any; + + /** Increases the current progress value by a specified amount (default +1). Update payload optionally */ + increment(step: number, payload?: object): void; + + render(): void; + + /** Sets the total progress value while progressbar is active. Especially useful handling dynamic tasks. */ + setTotal(total: number): void; + + /** Starts the progress bar and set the total and initial value */ + start(total: number, startValue: number, payload?: object): void; + + /** Stops the progress bar and go to next line */ + stop(): void; + + stopTimer(): void; + + /** Sets the current progress value and optionally the payload with values of custom tokens as a second parameter */ + update(current: number, payload?: object): void; +} + +export const Presets: { + /** Styles as of cli-progress v1.3.0 */ + legacy: Preset; + + /** Unicode Rectangles */ + rect: Preset; + + /** Unicode background shades are used for the bar */ + shades_classic: Preset; + + /** Unicode background shades with grey bar */ + shades_grey: Preset; +}; diff --git a/types/cli-progress/tsconfig.json b/types/cli-progress/tsconfig.json new file mode 100644 index 0000000000..be8771c6c5 --- /dev/null +++ b/types/cli-progress/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "cli-progress-tests.ts" + ] +} diff --git a/types/cli-progress/tslint.json b/types/cli-progress/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cli-progress/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/clientjs/clientjs-tests.ts b/types/clientjs/clientjs-tests.ts new file mode 100644 index 0000000000..2781ae4a42 --- /dev/null +++ b/types/clientjs/clientjs-tests.ts @@ -0,0 +1,66 @@ +import ClientJS = require("clientjs"); + +const client = new ClientJS(); +client.getSoftwareVersion(); // $ExpectType string +client.getFingerprint(); // $ExpectType number +client.getCustomFingerprint(client.getUserAgent(), client.getFonts()); // $ExpectType number +client.getUserAgent(); // $ExpectType string +client.getUserAgentLowerCase(); // $ExpectType string +client.getBrowser(); // $ExpectType string +client.getBrowserVersion(); // $ExpectType string +client.getBrowserMajorVersion(); // $ExpectType string +client.isIE(); // $ExpectType boolean +client.isChrome(); // $ExpectType boolean +client.isFirefox(); // $ExpectType boolean +client.isSafari(); // $ExpectType boolean +client.isOpera(); // $ExpectType boolean +client.isMobileSafari(); // $ExpectType boolean +client.getEngine(); // $ExpectType string +client.getEngineVersion(); // $ExpectType string +client.getOS(); // $ExpectType string +client.getOSVersion(); // $ExpectType string +client.isWindows(); // $ExpectType boolean +client.isMac(); // $ExpectType boolean +client.isLinux(); // $ExpectType boolean +client.isUbuntu(); // $ExpectType boolean +client.isSolaris(); // $ExpectType boolean +client.getDevice(); // $ExpectType string +client.getDeviceType(); // $ExpectType string +client.getDeviceVendor(); // $ExpectType string +client.getCPU(); // $ExpectType string +client.isMobile(); // $ExpectType boolean +client.isMobileMajor(); // $ExpectType boolean +client.isMobileAndroid(); // $ExpectType boolean +client.isMobileOpera(); // $ExpectType boolean +client.isMobileWindows(); // $ExpectType boolean +client.isMobileBlackBerry(); // $ExpectType boolean +client.isMobileIOS(); // $ExpectType boolean +client.isIphone(); // $ExpectType boolean +client.isIpad(); // $ExpectType boolean +client.isIpod(); // $ExpectType boolean +client.getScreenPrint(); // $ExpectType string +client.getColorDepth(); // $ExpectType string +client.getCurrentResolution(); // $ExpectType string +client.getAvailableResolution(); // $ExpectType string +client.getDeviceXDPI(); // $ExpectType string +client.getDeviceYDPI(); // $ExpectType string +client.getPlugins(); // $ExpectType string +client.isJava(); // $ExpectType boolean +client.getJavaVersion(); // $ExpectType string +client.isFlash(); // $ExpectType boolean +client.getFlashVersion(); // $ExpectType string +client.isSilverlight(); // $ExpectType boolean +client.getSilverlightVersion(); // $ExpectType string +client.isMimeTypes(); // $ExpectType boolean +client.getMimeTypes(); // $ExpectType string +client.isFont('Times New Roman'); // $ExpectType boolean +client.isFont('Nonexistent Random Font'); // $ExpectType boolean +client.getFonts(); // $ExpectType string +client.isLocalStorage(); // $ExpectType boolean +client.isSessionStorage(); // $ExpectType boolean +client.isCookie(); // $ExpectType boolean +client.getTimeZone(); // $ExpectType string +client.getLanguage(); // $ExpectType string +client.getSystemLanguage(); // $ExpectType string +client.isCanvas(); // $ExpectType boolean +client.getCanvasPrint(); // $ExpectType string diff --git a/types/clientjs/index.d.ts b/types/clientjs/index.d.ts new file mode 100644 index 0000000000..db46d41dab --- /dev/null +++ b/types/clientjs/index.d.ts @@ -0,0 +1,191 @@ +// Type definitions for clientjs 0.1 +// Project: https://clientjs.org +// Definitions by: icopp +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class ClientJS { + constructor(); + + /** @return A string containing this software version number. */ + getSoftwareVersion(): string; + + // Fingerprint methods + + /** @return A 32-bit integer representing the browser's fingerprint. */ + getFingerprint(): number; + /** + * @param datapoints Any number of datapoints that are (or can be coerced to + * be) strings. + * @return A 32-bit integer representing the cumulative fingerprint. + */ + getCustomFingerprint(...datapoints: Array): number; + + // User agent methods + + /** @return A string containing unparsed user agent. */ + getUserAgent(): string; + /** @return A lowercase string containing the user agent. */ + getUserAgentLowerCase(): string; + + // Browser methods + + /** @return A string containing the browser name */ + getBrowser(): string; + /** @return A string containing the browser version. */ + getBrowserVersion(): string; + /** @return A string containing the major browser version. */ + getBrowserMajorVersion(): string; + /** Check if the browser is IE. */ + isIE(): boolean; + /** Check if the browser is Chrome. */ + isChrome(): boolean; + /** Check if the browser is Firefox. */ + isFirefox(): boolean; + /** Check if the browser is Safari. */ + isSafari(): boolean; + /** Check if the browser is Opera. */ + isOpera(): boolean; + /** Check if the browser is mobile Safari. */ + isMobileSafari(): boolean; + + // Engine methods + + /** @return A string containing the browser engine. */ + getEngine(): string; + /** @return A string containing the browser engine version. */ + getEngineVersion(): string; + + // OS methods + + /** @return A string containing the OS. */ + getOS(): string; + /** @return A string containing the OS version. */ + getOSVersion(): string; + /** Check if the OS is Windows. */ + isWindows(): boolean; + /** Check if the OS is Mac. */ + isMac(): boolean; + /** Check if the OS is Linux. */ + isLinux(): boolean; + /** Check if the OS is Ubuntu. */ + isUbuntu(): boolean; + /** Check if the OS is Solaris. */ + isSolaris(): boolean; + + // Device methods + + /** @return A string containing the device. */ + getDevice(): string; + /** @return A string containing the device type. */ + getDeviceType(): string; + /** @return A string containing the device vendor. */ + getDeviceVendor(): string; + + // CPU methods + + /** @return A string containing the CPU architecture. */ + getCPU(): string; + + // Mobile methods + + /** Check if the browser is on a mobile device. */ + isMobile(): boolean; + /** Check if the browser is on a major mobile device. */ + isMobileMajor(): boolean; + /** Check if the browser is on an Android mobile device. */ + isMobileAndroid(): boolean; + /** Check if the browser is on an Opera mobile device. */ + isMobileOpera(): boolean; + /** Check if the browser is on a Windows mobile device. */ + isMobileWindows(): boolean; + /** Check if the browser is on a Blackberry mobile device. */ + isMobileBlackBerry(): boolean; + + // iOS methods + + /** Check if the browser is on an Apple iOS device. */ + isMobileIOS(): boolean; + /** Check if the browser is on an Apple iPhone. */ + isIphone(): boolean; + /** Check if the browser is on an Apple iPad. */ + isIpad(): boolean; + /** Check if the browser is on an Apple iPod. */ + isIpod(): boolean; + + // Screen methods + + /** @return A string containing screen information. */ + getScreenPrint(): string; + /** @return A string containing the color depth. */ + getColorDepth(): string; + /** @return A string containing the current resolution. */ + getCurrentResolution(): string; + /** @return A string containing the available resolution. */ + getAvailableResolution(): string; + /** @return A string containing the device horizontal DPI. */ + getDeviceXDPI(): string; + /** @return A string containing the device vertical DPI. */ + getDeviceYDPI(): string; + + // Plugin methods + + /** @return A string containing a list of installed plugins. */ + getPlugins(): string; + /** Check if Java is installed. */ + isJava(): boolean; + /** @return A string containing the Java Version. */ + getJavaVersion(): string; + /** Check if Flash is installed. */ + isFlash(): boolean; + /** @return A string containing the Flash Version. */ + getFlashVersion(): string; + /** Check if Silverlight is installed. */ + isSilverlight(): boolean; + /** @return A string containing the Silverlight Version. */ + getSilverlightVersion(): string; + + // MIME type methods + + /** Check if MIME types are installed. */ + isMimeTypes(): boolean; + /** A string containing a list of installed MIME types. */ + getMimeTypes(): string; + + // Font methods + + /** Check if `font` is installed. */ + isFont(font: string): boolean; + /** A string containing a comma-separated list of installed fonts. */ + getFonts(): string; + + // Storage methods + + /** Check if local storage is avaliable. */ + isLocalStorage(): boolean; + /** Check if session storage is avaliable. */ + isSessionStorage(): boolean; + /** Check if cookies are avaliable. */ + isCookie(): boolean; + + // Time methods + + /** A lowercase string containing the time zone. */ + getTimeZone(): string; + + // Language methods + + /** A lowercase string containing the user language. */ + getLanguage(): string; + /** A lowercase string containing the system language. */ + getSystemLanguage(): string; + + // Canvas methods + + /** Check if the canvas element is available. */ + isCanvas(): boolean; + /** @return A string containing canvas image information */ + getCanvasPrint(): string; +} + +export = ClientJS; +export as namespace ClientJS; diff --git a/types/clientjs/tsconfig.json b/types/clientjs/tsconfig.json new file mode 100644 index 0000000000..2d02f6ec55 --- /dev/null +++ b/types/clientjs/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clientjs-tests.ts" + ] +} diff --git a/types/clientjs/tslint.json b/types/clientjs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/clientjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cloneable-readable/cloneable-readable-tests.ts b/types/cloneable-readable/cloneable-readable-tests.ts new file mode 100644 index 0000000000..d6cf68f33d --- /dev/null +++ b/types/cloneable-readable/cloneable-readable-tests.ts @@ -0,0 +1,11 @@ +import { PassThrough } from 'stream'; +import cloneable = require('cloneable-readable'); + +const ps = new PassThrough(); // $ExpectType PassThrough +const cl = cloneable(ps); // $ExpectType Cloneable + +process.stdin.pipe(cl.clone()).pipe(process.stderr); +process.stdin.pipe(cl).pipe(process.stdout); + +cloneable.isCloneable(ps); // $ExpectType boolean +cloneable.isCloneable(cl); // $ExpectType boolean diff --git a/types/cloneable-readable/index.d.ts b/types/cloneable-readable/index.d.ts new file mode 100644 index 0000000000..49f7c89ffd --- /dev/null +++ b/types/cloneable-readable/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for cloneable-readable 1.1 +// Project: https://github.com/mcollina/cloneable-readable#readme +// Definitions by: Nikita Volodin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +import { Readable } from 'stream'; + +type Cloneable = T & { clone(): Cloneable }; +interface CloneableFn { + (x: T): Cloneable; + isCloneable(x: Readable): boolean; +} +declare const cloneable: CloneableFn; +export = cloneable; diff --git a/types/cloneable-readable/tsconfig.json b/types/cloneable-readable/tsconfig.json new file mode 100644 index 0000000000..86b9886f7d --- /dev/null +++ b/types/cloneable-readable/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cloneable-readable-tests.ts" + ] +} diff --git a/types/cloneable-readable/tslint.json b/types/cloneable-readable/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cloneable-readable/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cloner/cloner-tests.ts b/types/cloner/cloner-tests.ts new file mode 100644 index 0000000000..63baf4b950 --- /dev/null +++ b/types/cloner/cloner-tests.ts @@ -0,0 +1,43 @@ +import cloner = require("cloner"); + +interface A { + test: string; + nest: { + test: string; + num: number; + }; +} + +interface B { + somethingElse: string; + nest: { + somethingElse: string; + notNaN: number; + }; +} + +let aO: A; +let aN: A; +let bO: B; +let bN: B; + +aO = { + test: "test", + nest: { + test: "nestTest", + num: 1 + } +}; +bO = { + somethingElse: "se", + nest: { + somethingElse: "nestSe", + notNaN: 0 + } +}; + +aN = cloner.deep.copy(aO); +bN = cloner.shallow.copy(bO); + +aN = cloner.deep.merge(aO, bO); +bN = cloner.shallow.merge(aO, bO); diff --git a/types/cloner/index.d.ts b/types/cloner/index.d.ts new file mode 100644 index 0000000000..6021c9a716 --- /dev/null +++ b/types/cloner/index.d.ts @@ -0,0 +1,45 @@ +// Type definitions for cloner 0.4 +// Project: https://github.com/WebReflection/cloner +// Definitions by: matrumz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Deep-style methods that will perform operations by value, instead of reference. + */ +export namespace deep { + /** + * Will loop over all own keys and deeply copy (copy by value) them to a new object. + * + * Preserves inheritance and is recursion aware, meaning it shouldn't fail with recursive properties. + * @param [obj] The object to copy. + */ + function copy(obj: T): T; + /** + * Preserves what's already in the target and merges all own keys found in one or more passed sources. + * + * Properties are merged by value. + * @param [target] Destination object for merged properties. + * @param [sources] Source object(s) for properties to merge. + */ + function merge(target: any, ...sources: any[]): any; +} +/** + * Shallow-style methods that will perform operations by reference, instead of value. + */ +export namespace shallow { + /** + * Will loop over all own keys and shallow copy (copy by reference) them to a new object. + * + * Preserves inheritance and is recursion aware, meaning it shouldn't fail with recursive properties. + * @param [obj] The object to copy. + */ + function copy(obj: T): T; + /** + * Preserves what's already in the target and merges all own keys found in one or more passed sources. + * + * Properties are merged by reference. + * @param [target] Destination object for merged properties. + * @param [sources] Source object(s) for properties to merge. + */ + function merge(target: any, ...sources: any[]): any; +} diff --git a/types/cloner/tsconfig.json b/types/cloner/tsconfig.json new file mode 100644 index 0000000000..9619614ce4 --- /dev/null +++ b/types/cloner/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cloner-tests.ts" + ] +} diff --git a/types/cloner/tslint.json b/types/cloner/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cloner/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/command-line-args/command-line-args-tests.ts b/types/command-line-args/command-line-args-tests.ts index 11848ee202..89d310cb14 100644 --- a/types/command-line-args/command-line-args-tests.ts +++ b/types/command-line-args/command-line-args-tests.ts @@ -1,10 +1,24 @@ import commandLineArgs = require('command-line-args'); -const optionDefinitions = [ - { name: 'verbose', alias: 'v', type: Boolean }, - { name: 'src', type: String, multiple: true, defaultOption: true }, - { name: 'timeout', alias: 't', type: Number } +const optionDefinitions: commandLineArgs.OptionDefinition[] = [ + { + name: 'something', + alias: 's', + type: String, + defaultValue: '1', + multiple: true, + lazyMultiple: true, + defaultOption: true, + group: 'one' + } ]; -const options = commandLineArgs(optionDefinitions); +const options = commandLineArgs(optionDefinitions, { + argv: [ '--one', '1' ], + partial: true, + stopAtFirstUnknown: true, + camelCase: true +}); +const unknown = options._unknown; +const something = options.something; diff --git a/types/command-line-args/index.d.ts b/types/command-line-args/index.d.ts index 332368d827..5172a2f74a 100644 --- a/types/command-line-args/index.d.ts +++ b/types/command-line-args/index.d.ts @@ -1,87 +1,90 @@ -// Type definitions for command-line-args 4.0.7 +// Type definitions for command-line-args 5.0 // Project: https://github.com/75lb/command-line-args -// Definitions by: CzBuCHi +// Definitions by: Lloyd Brookes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /** - * Returns an object containing all options set on the command line. By default it parses the global [`process.argv`](https://nodejs.org/api/process.html#process_process_argv) array. - * - * By default, an exception is thrown if the user sets an unknown option (one without a valid [definition](#exp_module_definition--OptionDefinition)). To enable __partial parsing__, invoke `commandLineArgs` with the `partial` option - all unknown arguments will be returned in the `_unknown` property. - * - * - * @param {module:definition[]} - An array of [OptionDefinition](#exp_module_definition--OptionDefinition) objects - * @param [options] {object} - Options. - * @param [options.argv] {string[]} - An array of strings, which if passed will be parsed instead of `process.argv`. - * @param [options.partial] {boolean} - If `true`, an array of unknown arguments is returned in the `_unknown` property of the output. - * @returns {object} - * @throws `UNKNOWN_OPTION` if `options.partial` is false and the user set an undefined option - * @throws `NAME_MISSING` if an option definition is missing the required `name` property - * @throws `INVALID_TYPE` if an option definition has a `type` value that's not a function - * @throws `INVALID_ALIAS` if an alias is numeric, a hyphen or a length other than 1 - * @throws `DUPLICATE_NAME` if an option definition name was used more than once - * @throws `DUPLICATE_ALIAS` if an option definition alias was used more than once - * @throws `DUPLICATE_DEFAULT_OPTION` if more than one option definition has `defaultOption: true` - * @alias module:command-line-args + * Returns an object containing option values parsed from the command line. By default it parses the global `process.argv` array. + * Parsing is strict by default. To be more permissive, enable `partial` or `stopAtFirstUnknown` modes. */ -declare function commandLineArgs(optionDefinitions: commandLineArgs.OptionDefinition[], options?: commandLineArgs.Options): any; +declare function commandLineArgs(optionDefinitions: commandLineArgs.OptionDefinition[], options?: commandLineArgs.ParseOptions): commandLineArgs.CommandLineOptions; -declare module commandLineArgs { +declare namespace commandLineArgs { + interface CommandLineOptions { + /** + * Command-line arguments not parsed by `commandLineArgs`. + */ + _unknown?: string[]; + [propName: string]: any; + } - export interface OptionDefinition { - /** - * The only required definition property is name, the value of each option will be either a Boolean or string. - */ - name: string, - /** - * The type value is a setter function (you receive the output from this), - * enabling you to be specific about the type and value received. - */ - type?: (arg: string) => any, - /** - * getopt-style short option names. Can be any single character (unicode included) except a digit or hypen. - */ - alias?: string, - /** - * Set this flag if the option takes a list of values. You will receive an array of values, each passed - * through the type function (if specified). - */ - multiple?: boolean, - /** - * Any unclaimed command-line args will be set on this option. This flag is typically set on - * the most commonly-used option to make for more concise usage - * (i.e. $ myapp *.js instead of $ myapp --files *.js). - */ - defaultOption?: boolean, - /** - * An initial value for the option. - */ - defaultValue?: any, - /** - * When your app has a large amount of options it makes sense to organise them in groups. - * There are two automatic groups: _all (contains all options) and _none (contains options - * without a group specified in their definition). - */ - group?: string | string[], - /** - * Describes the option. - */ - description?: string, - /** - * A label for the type, e.g. . - */ - typeLabel?: string; - } + interface ParseOptions { + /** + * An array of strings which if present will be parsed instead of `process.argv`. + */ + argv?: string[]; - export interface Options { - /** - * An array of strings, which if passed will be parsed instead of `process.argv`. - */ - argv?: string[]; - /** - * If `true`, an array of unknown arguments is returned in the `_unknown` property of the output. - */ - partial?: boolean; - } + /** + * If `true`, `commandLineArgs` will not throw on unknown options or values, instead returning them in the `_unknown` property of the output. + */ + partial?: boolean; + + /** + * If `true`, `commandLineArgs` will not throw on unknown options or values. Instead, parsing will stop at the first unknown argument + * and the remaining arguments returned in the `_unknown` property of the output. If set, `partial: true` is implied. + */ + stopAtFirstUnknown?: boolean; + + /** + * If `true`, options with hypenated names (e.g. `move-to`) will be returned in camel-case (e.g. `moveTo`). + */ + camelCase?: boolean; + } + + interface OptionDefinition { + /** + * The long option name. + */ + name: string; + + /** + * A setter function (you receive the output from this) enabling you to be specific about the type and value received. Typical values + * are `String` (the default), `Number` and `Boolean` but you can use a custom function. If no option value was set you will receive `null`. + */ + type?: (input: string) => any; + + /** + * A getopt-style short option name. Can be any single character except a digit or hyphen. + */ + alias?: string; + + /** + * Set this flag if the option accepts multiple values. In the output, you will receive an array of values each passed through the `type` function. + */ + multiple?: boolean; + + /** + * Identical to `multiple` but with greedy parsing disabled. + */ + lazyMultiple?: boolean; + + /** + * Any values unaccounted for by an option definition will be set on the `defaultOption`. This flag is typically set + * on the most commonly-used option to enable more concise usage. + */ + defaultOption?: boolean; + + /** + * An initial value for the option. + */ + defaultValue?: any; + + /** + * One or more group names the option belongs to. + */ + group?: string | string[]; + } } export = commandLineArgs; diff --git a/types/command-line-args/tslint.json b/types/command-line-args/tslint.json index a41bf5d19a..495d29983d 100644 --- a/types/command-line-args/tslint.json +++ b/types/command-line-args/tslint.json @@ -1,79 +1,5 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false } } diff --git a/types/command-line-args/v4/command-line-args-tests.ts b/types/command-line-args/v4/command-line-args-tests.ts new file mode 100644 index 0000000000..c99d64b1a2 --- /dev/null +++ b/types/command-line-args/v4/command-line-args-tests.ts @@ -0,0 +1,21 @@ +import commandLineArgs = require('command-line-args'); + +const optionDefinitions: commandLineArgs.OptionDefinition[] = [ + { + name: 'something', + alias: 's', + type: String, + defaultValue: '1', + multiple: true, + defaultOption: true, + group: 'one' + } +]; + +const options = commandLineArgs(optionDefinitions, { + argv: [ '--one', '1' ], + partial: true +}); + +const unknown = options._unknown; +const something = options.something; diff --git a/types/command-line-args/v4/index.d.ts b/types/command-line-args/v4/index.d.ts new file mode 100644 index 0000000000..a5c8250827 --- /dev/null +++ b/types/command-line-args/v4/index.d.ts @@ -0,0 +1,73 @@ +// Type definitions for command-line-args 4.0 +// Project: https://github.com/75lb/command-line-args +// Definitions by: CzBuCHi , Lloyd Brookes +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/** + * Returns an object containing option values parsed from the command line. By default it parses the global `process.argv` array. + */ +declare function commandLineArgs(optionDefinitions: commandLineArgs.OptionDefinition[], options?: commandLineArgs.ParseOptions): commandLineArgs.CommandLineOptions; + +declare namespace commandLineArgs { + interface CommandLineOptions { + /** + * Command-line arguments not parsed by `commandLineArgs`. + */ + _unknown?: string[]; + [propName: string]: any; + } + + interface ParseOptions { + /** + * An array of strings which if present will be parsed instead of `process.argv`. + */ + argv?: string[]; + + /** + * If `true`, `commandLineArgs` will not throw on unknown options or values, instead returning them in the `_unknown` property of the output. + */ + partial?: boolean; + } + + interface OptionDefinition { + /** + * The long option name. + */ + name: string; + + /** + * A setter function (you receive the output from this) enabling you to be specific about the type and value received. Typical values + * are `String` (the default), `Number` and `Boolean` but you can use a custom function. If no option value was set you will receive `null`. + */ + type?: (input: string) => any; + + /** + * A getopt-style short option name. Can be any single character except a digit or hyphen. + */ + alias?: string; + + /** + * Set this flag if the option accepts multiple values. In the output, you will receive an array of values each passed through the `type` function. + */ + multiple?: boolean; + + /** + * Any values unaccounted for by an option definition will be set on the `defaultOption`. This flag is typically set + * on the most commonly-used option to enable more concise usage. + */ + defaultOption?: boolean; + + /** + * An initial value for the option. + */ + defaultValue?: any; + + /** + * One or more group names the option belongs to. + */ + group?: string | string[]; + } +} + +export = commandLineArgs; diff --git a/types/command-line-args/v4/tsconfig.json b/types/command-line-args/v4/tsconfig.json new file mode 100644 index 0000000000..3517f0823e --- /dev/null +++ b/types/command-line-args/v4/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "command-line-args": [ "command-line-args/v4" ] + } + }, + "files": [ + "index.d.ts", + "command-line-args-tests.ts" + ] +} diff --git a/types/command-line-args/v4/tslint.json b/types/command-line-args/v4/tslint.json new file mode 100644 index 0000000000..495d29983d --- /dev/null +++ b/types/command-line-args/v4/tslint.json @@ -0,0 +1,5 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + } +} diff --git a/types/command-line-usage/command-line-usage-tests.ts b/types/command-line-usage/command-line-usage-tests.ts index 05dfadc7f3..23e2284d83 100644 --- a/types/command-line-usage/command-line-usage-tests.ts +++ b/types/command-line-usage/command-line-usage-tests.ts @@ -1,24 +1,397 @@ -import commandLineUsage = require("command-line-usage"); +import getUsage = require('command-line-usage'); -const sections = [ +let usage: string; +let sections: getUsage.Section[]; +let optionDefinitions: getUsage.OptionDefinition[] = []; + +// chalk-escaping.js +usage = getUsage([ { - header: 'A typical app', - content: 'Generates something {italic very} important.' + header: 'A typical app', + content: 'Generates something \\{very important\\}, also retaining `backticks`.' }, { - header: 'Options', - optionList: [ - { - name: 'input', - typeLabel: '{underline file}', - description: 'The input to process.' - }, - { - name: 'help', - description: 'Print this usage guide.' - } - ] + header: 'Options', + optionList: [ + { name: 'files', typeLabel: '\\{something\\}', description: 'This is not \\{red red\\}.'} + ] } -]; + ]); -const usage = commandLineUsage(sections); +// chalk-formatting.js +usage = getUsage([ + { + header: 'A typical app', + content: 'Generates something {italic.keyword("orange") very {rgb(255,231,0).bold important}}. This is a rather long, but {hex("#1ef").underline ultimately} inconsequential ' + + 'description intended {yellow.bgRed.bold solely {bgBlue to}} demonstrate description appearance. ' + }, + { + header: 'Options', + optionList: [ + { name: 'files', typeLabel: '{magenta {underline files}}', description: 'This is {red red}.'} + ] + }, + { + content: 'Project home: {underline https://github.com/me/example}' + } + ]); + +// command-list.js +sections = [ + { + header: 'Example App', + content: 'Generates something {italic very} important. This is a rather long, but ultimately inconsequential description intended solely to demonstrate description appearance. ' + }, + { + header: 'Synopsis', + content: '$ app ' + }, + { + header: 'Command List', + content: [ + { name: 'help', summary: 'Display help information about Git.' }, + { name: 'commit', summary: 'Record changes to the repository.' }, + { name: 'Version', summary: 'Print the version.' }, + { name: 'etc', summary: 'Etc.' } + ] + } + ]; +usage = getUsage(sections); + +// description-columns.js +sections = [ + { + header: 'Soviet Union', + content: { + options: { + columns: [ + { name: 'one', maxWidth: 40 }, + { name: 'two', width: 40, noWrap: true } + ] + }, + data: [ + { + one: "this was waaaay too long", + two: null + } + ] + } + }, + { + header: 'Synopsis', + content: [ + '$ example [{bold --timeout} {underline ms}] {bold --src} {underline file} ...', + '$ example {bold --help}' + ] + }, + { + header: 'Options', + optionList: optionDefinitions + } + ]; +getUsage(sections); + +// examples.js +sections = [ + { + header: 'A typical app', + content: 'Generates something {italic very} important.' + }, + { + header: 'Synopsis', + content: [ + '$ example [{bold --timeout} {underline ms}] {bold --src} {underline file} ...', + '$ example {bold --help}' + ] + }, + { + header: 'Options', + optionList: optionDefinitions + }, + { + header: 'Examples', + content: [ + { + desc: '1. A concise example. ', + example: '$ example -t 100 lib/*.js' + }, + { + desc: '2. A long example. ', + example: '$ example --timeout 100 --src lib/*.js' + }, + { + desc: '3. This example will scan space for unknown things. Take cure when scanning space, it could take some time. ', + example: '$ example --src galaxy1.facts galaxy1.facts galaxy2.facts galaxy3.facts galaxy4.facts galaxy5.facts' + } + ] + }, + { + content: 'Project home: {underline https://github.com/me/example}' + } + ]; +getUsage(sections); + +// footer.js +sections = [ + { + header: 'A typical app', + content: 'Generates something {italic very} important.' + }, + { + header: 'Synopsis', + content: [ + '$ example [{bold --timeout} {underline ms}] {bold --src} {underline file} ...', + '$ example {bold --help}' + ] + }, + { + header: 'Options', + optionList: optionDefinitions + }, + { + content: [ + '{italic This app was tested by dragons in Wales.}', + '', + null + ], + raw: true + } +]; +getUsage(sections); + +// groups.js +optionDefinitions = [ + { + name: 'help', + description: 'Display this usage guide.', + alias: 'h', + type: Boolean, + group: 'main' + }, + { + name: 'src', + description: 'The input files to process', + multiple: true, + defaultOption: true, + typeLabel: '{underline file} ...', + group: 'input' + }, + { + name: 'timeout', + description: 'Timeout value in ms', + alias: 't', + typeLabel: '{underline ms}', + group: 'main' + }, + { + name: 'plugin', + description: 'A plugin path', + type: String + } + ]; + +sections = [ + { + header: 'A typical app', + content: 'Generates something {italic very} important.' + }, + { + header: 'Main options', + optionList: optionDefinitions, + group: [ 'main', 'input' ] + }, + { + header: 'Misc', + optionList: optionDefinitions, + group: '_none' + } + ]; + +getUsage(sections); + +// header-only.js +sections = [ + { + header: 'a header only' + }, + { + content: 'content only' + } + ]; +getUsage(sections); + +// header.js +sections = [ + { + content: "", + raw: true + }, + { + header: 'Synopsis', + content: [ + '$ example [{bold --timeout} {underline ms}] {bold --src} {underline file} ...', + '$ example {bold --help}' + ] + } +]; +getUsage(sections); + +// hide.js +usage = getUsage([ + { + header: 'A typical app', + content: 'Generates something {italic very} important. This is a rather long, but ultimately inconsequential description intended solely to demonstrate description appearance. ' + }, + { + header: 'Options', + optionList: optionDefinitions, + hide: 'src' + }, + { + content: 'Project home: {underline https://github.com/me/example}' + } +]); + +// option-list-options.js +sections = [ + { + header: 'A typical app', + content: 'Generates something {italic very} important.' + }, + { + header: 'Options', + optionList: optionDefinitions, + tableOptions: { + columns: [ + { + name: 'option', + noWrap: true, + padding: { left: '🔥 ', right: '' }, + width: 30 + }, + { + name: 'description', + width: 50, + padding: { left: '', right: ' 🔥' } + } + ] + } + } +]; +getUsage(sections); + +// simple-reverse-name-order.js +usage = getUsage([ + { + header: 'A typical app', + content: 'Generates something {italic very} important. This is a rather long, but ultimately inconsequential description intended solely to demonstrate description appearance. ' + }, + { + header: 'Options', + optionList: optionDefinitions, + reverseNameOrder: true + }, + { + content: 'Project home: {underline https://github.com/me/example}' + } + ]); + +// simple-width.js +usage = getUsage([ + { + header: 'A typical app', + content: { + options: { maxWidth: 40 }, + data: [ + { col: 'Generates something {italic very} important. This is a rather long, but ultimately inconsequential description intended solely to demonstrate description appearance. ' } + ] + } + } + ]); + +// synopsis.js +sections = [ + { + header: 'A typical app', + content: 'Generates something {italic very} important.' + }, + { + header: 'Options', + optionList: [ + { + name: 'input', + typeLabel: '{underline file}', + description: 'The input to process.' + }, + { + name: 'help', + description: 'Print this usage guide.' + } + ] + } + ]; +usage = getUsage(sections); + +// whitespace.js +/* When using default options, the whitespace before the bullets is trimmed */ +sections = [ + { + header: 'Example app', + content: [ + 'Generates something {italic very} important. This description is:', + '', + ' • rather long', + ' • inconsequential', + ' • demonstrative', + '', + 'And the text continues underneath as this {cyan might} be required in cases where text is required underneath.' + ] + } + ]; +usage = getUsage(sections); +/* Solution 1: Use `raw` option and supply your own whitespace */ +sections = [ + { + header: 'Example app', + content: [ + ' Generates something {italic very} important. This description is:', + ' ', + ' • rather long', + ' • inconsequential', + ' • demonstrative', + ' ', + ' And the text continues underneath as this {cyan might} be required in cases where', + ' text is required underneath.' + ], + raw: true + } +]; +usage = getUsage(sections); + +/* Section 2: use separate sections with the `noTrim` option on the bullets */ +sections = [ + { + header: 'Example app', + content: [ + 'Generates something {italic very} important. This description is:' + ] + }, + { + content: { + options: { + noTrim: true + }, + data: [ + { col: ' • rather long' }, + { col: ' • inconsequential' }, + { col: ' • demonstrative' } + ] + } + }, + { + content: [ + 'And the text continues underneath as this {cyan might} be required in cases where text is required underneath.' + ] + } +]; +usage = getUsage(sections); diff --git a/types/command-line-usage/index.d.ts b/types/command-line-usage/index.d.ts index ac4f1d7606..0beb4ef2d8 100644 --- a/types/command-line-usage/index.d.ts +++ b/types/command-line-usage/index.d.ts @@ -1,48 +1,82 @@ // Type definitions for command-line-usage 5.0 // Project: https://github.com/75lb/command-line-usage#readme -// Definitions by: Andrija Dvorski +// Definitions by: matrumz +// Andrija Dvorski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 +/** + * Generates a usage guide suitable for a command-line app. + * @param sections One or more Section objects + * @alias module:command-line-usage + */ +declare function commandLineUsage(sections: commandLineUsage.Section | commandLineUsage.Section[]): string; +export = commandLineUsage; + declare namespace commandLineUsage { - interface Section { - list: string[]; + /** Section object. */ + type Section = Content | OptionList; - add(content: object): void; - emptyLine(): void; - header(text: string): void; - toString(): string; - } - - interface SectionData { - optionList?: OptionListData[]; - hide?: string[]; - group?: string[]; + /** A Content section comprises a header and one or more lines of content. */ + interface Content { + /** The section header, always bold and underlined. */ header?: string; - reverseNameOrder?: boolean; - tableOptions?: any; - } - - interface OptionListData extends SectionData { - name: string; - typeLabel?: string; - description?: string; - } - - interface ContentSectionData extends SectionData { - content: string; + /** + * Overloaded property, accepting data in one of four formats. + * 1. A single string (one line of text). + * 2. An array of strings (multiple lines of text). + * 3. An array of objects (recordset-style data). In this case, the data will be rendered in table format. The property names of each object are not important, so long as they are + * consistent throughout the array. + * 4. An object with two properties - data and options. In this case, the data and options will be passed directly to the underlying table layout module for rendering. + */ + content?: string | string[] | any[] | { data: any; options: any }; + /** Set to true to avoid indentation and wrapping. Useful for banners. */ raw?: boolean; } - type CommandLineUsageInput = - SectionData - | SectionData[] - | OptionListData - | OptionListData[] - | ContentSectionData - | ContentSectionData[]; + /** Describes a command-line option. Additionally, if generating a usage guide with command-line-usage you could optionally add description and typeLabel properties to each definition. */ + interface OptionDefinition { + name: string; + /** + * The type value is a setter function (you receive the output from this), enabling you to be specific about the type and value received. + * + * The most common values used are String (the default), Number and Boolean but you can use a custom function. + */ + type?: any; + /** getopt-style short option names. Can be any single character (unicode included) except a digit or hyphen. */ + alias?: string; + /** Set this flag if the option takes a list of values. You will receive an array of values, each passed through the type function (if specified). */ + multiple?: boolean; + /** Identical to multiple but with greedy parsing disabled. */ + lazyMultiple?: boolean; + /** Any values unaccounted for by an option definition will be set on the defaultOption. This flag is typically set on the most commonly-used option to make for more concise usage. */ + defaultOption?: boolean; + /** An initial value for the option. */ + defaultValue?: any; + /** + * When your app has a large amount of options it makes sense to organise them in groups. + * + * There are two automatic groups: _all (contains all options) and _none (contains options without a group specified in their definition). + */ + group?: string | string[]; + /** A string describing the option. */ + description?: string; + /** A string to replace the default type string (e.g. ). It's often more useful to set a more descriptive type label, like , , , etc.. */ + typeLabel?: string; + } + + /** A OptionList section adds a table displaying details of the available options. */ + interface OptionList { + header?: string; + /** An array of option definition objects. */ + optionList?: OptionDefinition[]; + /** If specified, only options from this particular group will be printed. */ + group?: string | string[]; + /** The names of one of more option definitions to hide from the option list. */ + hide?: string | string[]; + /** If true, the option alias will be displayed after the name, i.e. --verbose, -v instead of -v, --verbose). */ + reverseNameOrder?: boolean; + /** An options object suitable for passing into table-layout. */ + tableOptions?: any; + } } - -declare function commandLineUsage(sections: commandLineUsage.CommandLineUsageInput): string | undefined | commandLineUsage.Section; - -export = commandLineUsage; diff --git a/types/node-common-errors/node-common-errors-tests.ts b/types/common-errors/common-errors-tests.ts similarity index 98% rename from types/node-common-errors/node-common-errors-tests.ts rename to types/common-errors/common-errors-tests.ts index 9554c31dff..ed2c1cdf15 100644 --- a/types/node-common-errors/node-common-errors-tests.ts +++ b/types/common-errors/common-errors-tests.ts @@ -1,4 +1,4 @@ -import * as errors from 'node-common-errors'; +import * as errors from 'common-errors'; errors.log(new Error()); // $ExpectType Error errors.log(new Error(), ''); // $ExpectType Error diff --git a/types/node-common-errors/index.d.ts b/types/common-errors/index.d.ts similarity index 99% rename from types/node-common-errors/index.d.ts rename to types/common-errors/index.d.ts index 06bcb9e754..da0230b084 100644 --- a/types/node-common-errors/index.d.ts +++ b/types/common-errors/index.d.ts @@ -1,5 +1,5 @@ -// Type definitions for node-common-errors 0.4 -// Project: https://github.com/shutterstock/node-errors +// Type definitions for common-errors 1.0 +// Project: https://github.com/shutterstock/node-common-errors // Definitions by: Ian Copp // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/common-errors/tsconfig.json b/types/common-errors/tsconfig.json new file mode 100644 index 0000000000..a4c4800e39 --- /dev/null +++ b/types/common-errors/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "common-errors-tests.ts" + ] +} diff --git a/types/common-errors/tslint.json b/types/common-errors/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/common-errors/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/convict/convict-tests.ts b/types/convict/convict-tests.ts index 98a107d8e8..de35b17578 100644 --- a/types/convict/convict-tests.ts +++ b/types/convict/convict-tests.ts @@ -1,108 +1,122 @@ -import convict = require('convict'); -import validator = require('validator'); +import * as convict from 'convict'; +import * as validator from 'validator'; +import { safeLoad } from 'js-yaml'; // define a schema // straight from the convict tests const format: convict.Format = { - name: 'float-percent', - validate(val) { - if (val !== 0 && (!val || val > 1 || val < 0)) { - throw new Error('must be a float between 0 and 1, inclusive'); + name: 'float-percent', + validate(val) { + if (val !== 0 && (!val || val > 1 || val < 0)) { + throw new Error('must be a float between 0 and 1, inclusive'); + } + }, + coerce(val) { + return parseFloat(val); } - }, - coerce(val) { - return parseFloat(val); - } }; convict.addFormat(format); convict.addFormats({ - prime: { - validate(val) { - function isPrime(n: number) { - if (n <= 1) return false; // zero and one are not prime - for (let i = 2; i * i <= n; i++) { - if (n % i === 0) return false; + prime: { + validate(val) { + function isPrime(n: number) { + if (n <= 1) return false; // zero and one are not prime + for (let i = 2; i * i <= n; i++) { + if (n % i === 0) return false; + } + return true; + } + if (!isPrime(val)) throw new Error('must be a prime number'); + }, + coerce(val) { + return parseInt(val, 10); } - return true; - } - if (!isPrime(val)) throw new Error('must be a prime number'); - }, - coerce(val) { - return parseInt(val, 10); } - } }); +convict.addParser({ extension: 'json', parse: JSON.parse }); +convict.addParser([ + { extension: 'json', parse: JSON.parse }, + { extension: ['yml', 'yaml'], parse: safeLoad } +]); + const conf = convict({ - env: { - doc: 'The applicaton environment.', - format: ['production', 'development', 'test'], - default: 'development', - env: 'NODE_ENV', - arg: 'node-env', - }, - ip: { - doc: 'The IP address to bind.', - format: 'ipaddress', - default: '127.0.0.1', - env: 'IP_ADDRESS', - }, - port: { - doc: 'The port to bind.', - format: 'port', - default: 0, - env: 'PORT', - arg: 'port', - }, - key: { - doc: "API key", - format: (val: string) => { - if (!validator.isUUID(val)) { - throw new Error('must be a valid UUID'); - } + env: { + doc: 'The applicaton environment.', + format: ['production', 'development', 'test'], + default: 'development', + env: 'NODE_ENV', + arg: 'node-env', }, - default: '01527E56-8431-11E4-AF91-47B661C210CA' - }, - db: { ip: { - doc: 'The IP address to bind.', - format: 'ipaddress', - default: '127.0.0.1', - env: 'IP_ADDRESS', + doc: 'The IP address to bind.', + format: 'ipaddress', + default: '127.0.0.1', + env: 'IP_ADDRESS', }, port: { - doc: 'The port to bind.', - format: 'port', - default: 0, - env: 'PORT', - arg: 'port', + doc: 'The port to bind.', + format: 'port', + default: 0, + env: 'PORT', + arg: 'port', }, - password: { - doc: 'The database password.', - default: 'secret', - format: String, - sensitive: true, + key: { + doc: "API key", + format: (val: string) => { + if (!validator.isUUID(val)) { + throw new Error('must be a valid UUID'); + } + }, + default: '01527E56-8431-11E4-AF91-47B661C210CA' + }, + db: { + ip: { + doc: 'The IP address to bind.', + format: 'ipaddress', + default: '127.0.0.1', + env: 'IP_ADDRESS', + }, + port: { + doc: 'The port to bind.', + format: 'port', + default: 0, + env: 'PORT', + arg: 'port', + }, + password: { + doc: 'The database password.', + default: 'secret', + format: String, + sensitive: true, + }, + }, + primeNumber: { + format: 'prime', + default: 17 + }, + percentNumber: { + format: 'float-percent', + default: 0.5 }, - }, - primeNumber: { - format: 'prime', - default: 17 - }, - percentNumber: { - format: 'float-percent', - default: 0.5 - }, }); // load environment dependent configuration +interface LoadType { + primeNumber: number; + isPrime: boolean; +} + const env = conf.get('env'); -const dbip = conf.get('db.ip'); conf.loadFile(`./config/${env}.json`); conf.loadFile(['./configs/always.json', './configs/sometimes.json']); +// tslint:disable-next-line:no-invalid-template-strings +conf.loadFile('./config/${env}.yaml'); + // perform validation conf.validate({ strict: true }); @@ -112,25 +126,39 @@ conf.validate({ allowed: 'warn' }); // Chaining conf - .loadFile(['./configs/always.json', './configs/sometimes.json']) - .loadFile(`./config/${env}.json`) - .load({ jsonKey: 'jsonValue' }) - .set('key', 'value') - .validate({ allowed: 'warn' }) - .toString(); + .loadFile(['./configs/always.json', './configs/sometimes.json']) + .loadFile<{ envVar: any }>(`./config/${env}.json`) + .load({ jsonKey: 'jsonValue' }) + .set('key', 'value') + .validate({ allowed: 'warn' }) + .toString(); -const port: number = conf.default('port'); +const port = conf.default('port'); if (conf.has('key')) { - conf.set('the.awesome', true); - conf.load({ - thing: { - a: 'b' - } - }); + conf.set('the.awesome', true); + conf.load({ + thing: { + a: 'b' + } + }); } +conf.has('unknow.key'); +conf.has<'db', 'ip'>('db.ip'); + +const schema = conf.getSchema(); + +const schemaVal = conf.getSchema().properties.db.properties.port.default; + conf.get(); +conf.get('unknownkey'); +conf.get('db'); +conf.get('db.ip'); +conf.get<'db', 'ip'>('db.ip'); +conf.default('env'); +conf.default('db.ip'); +conf.default<'db', 'ip'>('db.ip'); conf.getSchema(); conf.getProperties(); conf.getSchemaString(); diff --git a/types/convict/index.d.ts b/types/convict/index.d.ts index 544cb9b3f3..2c3dbf0547 100644 --- a/types/convict/index.d.ts +++ b/types/convict/index.d.ts @@ -1,11 +1,16 @@ -// Type definitions for convict 4.1 +// Type definitions for convict 4.2 // Project: https://github.com/mozilla/node-convict // Definitions by: Wim Looman // Vesa Poikajärvi // Eli Young +// Suntharesan Mohan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 declare namespace convict { + // Taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-307871458 + type Overwrite = { [P in Exclude]: T[P] } & U; + type ValidationMethod = 'strict' | 'warn'; interface ValidateOptions { @@ -27,8 +32,13 @@ declare namespace convict { coerce?(val: any): any; } - interface SchemaObj { - default: any; + interface Parser { + extension: string | string[]; + parse: (content: string) => any; + } + + interface SchemaObj { + default: T; doc?: string; /** * From the implementation: @@ -48,57 +58,105 @@ declare namespace convict { sensitive?: boolean; } - interface Schema { - [name: string]: Schema | SchemaObj; + type Schema = { + [P in keyof T]: Schema | SchemaObj; + }; + + interface InternalSchema { + properties: { + [K in keyof T]: T[K] extends object ? InternalSchema : { default: T[K] } + }; } - interface InternalSchema { - properties: Schema; - } - - interface Config { + interface Config { /** * @returns the current value of the name property. name can use dot * notation to reference nested values */ - get(name?: string): any; + get(name?: K): + K extends null | undefined ? T : + K extends keyof T ? T[K] : + any; + get(name: string): T[K][K2]; + get(name: K): T[K][K2][K3]; + get< + K extends keyof T, + K2 extends keyof T[K], + K3 extends keyof T[K][K2], + K4 extends keyof T[K][K2][K3] + >(name: string): T[K][K2][K3][K4]; /** * @returns the default value of the name property. name can use dot * notation to reference nested values */ - default(name: string): any; + default(name?: K): + K extends keyof T ? T[K] : + K extends null | undefined ? T : + any; + default(name?: K): T[K]; + default(name: string): T[K][K2]; + default(name: K): T[K][K2][K3]; + default< + K extends keyof T, + K2 extends keyof T[K], + K3 extends keyof T[K][K2], + K4 extends keyof T[K][K2][K3] + >(name: string): T[K][K2][K3][K4]; /** * @returns true if the property name is defined, or false otherwise */ - has(name: string): boolean; + has(name: K): boolean; + has(name: string): boolean; + has(name: K): boolean; + has< + K extends keyof T, + K2 extends keyof T[K], + K3 extends keyof T[K][K2], + K4 extends keyof T[K][K2][K3] + >(name: string): boolean; /** * Sets the value of name to value. name can use dot notation to reference * nested values, e.g. "database.port". If objects in the chain don't yet * exist, they will be initialized to empty objects */ - set(name: string, value: any): Config; + set(name: K, value: K extends keyof T ? T[K] : any): Config; + set< + K extends keyof T, + K2 extends keyof T[K] | string + >(name: K, value: K2 extends keyof T[K] ? T[K][K2] : any): Config; + set< + K extends keyof T, + K2 extends keyof T[K], + K3 extends keyof T[K][K2] | string + >(name: K, value: K3 extends keyof T[K][K2] ? T[K][K2][K3] : any): Config; + set< + K extends keyof T, + K2 extends keyof T[K], + K3 extends keyof T[K][K2], + K4 extends keyof T[K][K2][K3] | string + >(name: K, value: K4 extends keyof T[K][K2][K3] ? T[K][K2][K3][K4] : any): Config; /** * Loads and merges a JavaScript object into config */ - load(conf: Object): Config; + load(conf: U): Config>; /** * Loads and merges JSON configuration file(s) into config */ - loadFile(files: string | string[]): Config; + loadFile(files: string | string[]): Config>; /** * Validates config against the schema used to initialize it */ - validate(options?: ValidateOptions): Config; + validate(options?: ValidateOptions): Config; /** * Exports all the properties (that is the keys and their current values) as a {JSON} {Object} * @returns A {JSON} compliant {Object} */ - getProperties(): Object; + getProperties(): T; /** * Exports the schema as a {JSON} {Object} * @returns A {JSON} compliant {Object} */ - getSchema(): InternalSchema; + getSchema(): InternalSchema; /** * Exports all the properties (that is the keys and their current values) as a JSON string. @@ -113,10 +171,12 @@ declare namespace convict { getSchemaString(): string; } } + interface convict { addFormat(format: convict.Format): void; addFormats(formats: { [name: string]: convict.Format }): void; - (config: convict.Schema | string): convict.Config; + addParser(parsers: convict.Parser | convict.Parser[]): void; + (config: convict.Schema | string): convict.Config; } declare var convict: convict; export = convict; diff --git a/types/convict/tslint.json b/types/convict/tslint.json index 09f94cd344..3d215ace77 100644 --- a/types/convict/tslint.json +++ b/types/convict/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // ban-types needs to be disabled to support TypeScript <2.2 - "ban-types": false + "ban-types": false, + "no-unnecessary-generics": false } } diff --git a/types/core-js/core-js-tests.ts b/types/core-js/core-js-tests.ts index ab11eab409..476c97348f 100644 --- a/types/core-js/core-js-tests.ts +++ b/types/core-js/core-js-tests.ts @@ -418,7 +418,7 @@ log.disable(); // Non-standard point = dictOfPoint[s]; point = dictOfPoint[i]; -point = dictOfPoint[sym]; +// point = dictOfPoint[sym]; dictOfPoint = new Dict(dictOfPoint); dictOfAny = new Dict(point); dictOfPoint = Dict(dictOfPoint); diff --git a/types/correlation-id/correlation-id-tests.ts b/types/correlation-id/correlation-id-tests.ts new file mode 100644 index 0000000000..36bf65c27d --- /dev/null +++ b/types/correlation-id/correlation-id-tests.ts @@ -0,0 +1,21 @@ +import { withId, bindId, getId } from "correlation-id"; + +withId("my-id", () => { + const id: string = getId() || ""; +}); + +withId(() => { + const id: string = getId() || ""; +}); + +const x: string = bindId("my-id", (foo: string, bar: number): string => { + const id: string = getId() || ""; + + return foo + bar + id; +})("foo", 12); + +const y: string = bindId((foo: string, bar: number): string => { + const id: string = getId() || ""; + + return foo + bar + id; +})("foo", 12); diff --git a/types/correlation-id/index.d.ts b/types/correlation-id/index.d.ts new file mode 100644 index 0000000000..f765765409 --- /dev/null +++ b/types/correlation-id/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for correlation-id 2.1 +// Project: https://github.com/toboid/correlation-id#readme +// Definitions by: Nate +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function withId(id: string, work: () => void): void; +export function withId(work: () => void): void; + +export function bindId any>(id: string, work: T): T; +export function bindId any>(work: T): T; + +export function getId(): string | undefined; diff --git a/types/correlation-id/tsconfig.json b/types/correlation-id/tsconfig.json new file mode 100644 index 0000000000..eda38b5e28 --- /dev/null +++ b/types/correlation-id/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "correlation-id-tests.ts"] +} diff --git a/types/correlation-id/tslint.json b/types/correlation-id/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/correlation-id/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/cors/cors-tests.ts b/types/cors/cors-tests.ts index 83975549c7..ed4cd77213 100644 --- a/types/cors/cors-tests.ts +++ b/types/cors/cors-tests.ts @@ -47,4 +47,11 @@ app.use(cors({ } } })); +app.use(cors((req, cb) => { + if (req.query.trusted) { + cb(null, {origin: 'http://example.com', credentials: true}); + } else { + cb(new Error('Not trusted')); + } +})) diff --git a/types/cors/index.d.ts b/types/cors/index.d.ts index ab8ba2ed2d..bc7a567fc7 100644 --- a/types/cors/index.d.ts +++ b/types/cors/index.d.ts @@ -1,12 +1,9 @@ // Type definitions for cors 2.8 // Project: https://github.com/troygoode/node-cors/ -// Definitions by: Mihhail Lapushkin +// Definitions by: Alan Plum // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 - - - import express = require('express'); type CustomOrigin = ( @@ -25,7 +22,13 @@ declare namespace e { preflightContinue?: boolean; optionsSuccessStatus?: number; } + type CorsOptionsDelegate = ( + req: express.Request, + callback: (err: Error | null, options?: CorsOptions) => void + ) => void; } -declare function e(options?: e.CorsOptions): express.RequestHandler; +declare function e( + options?: e.CorsOptions | e.CorsOptionsDelegate +): express.RequestHandler; export = e; diff --git a/types/cosmiconfig/cosmiconfig-tests.ts b/types/cosmiconfig/cosmiconfig-tests.ts index 2676c58407..508ad00aa0 100644 --- a/types/cosmiconfig/cosmiconfig-tests.ts +++ b/types/cosmiconfig/cosmiconfig-tests.ts @@ -1,41 +1,27 @@ -import cosmiconfig = require("cosmiconfig"); +import cosmiconfig, { CosmiconfigResult } from "cosmiconfig"; +import * as path from "path"; -const asyncExplorer = cosmiconfig("yourModuleName", { - packageProp: "yourModuleName", - rc: ".yourModuleNamerc", - js: "yourModuleName.config.js", - rcStrictJson: false, - rcExtensions: false, - stopDir: "someDir", - cache: true, - sync: false, - transform: ({ config, filePath }) => ({ config, filePath }), - format: "js" +const explorer = cosmiconfig("yourModuleName", { + searchPlaces: [], + loaders: {}, + packageProp: "yourModuleName", + stopDir: "someDir", + cache: true, + transform: (result: CosmiconfigResult) => result, + ignoreEmptySearchPlaces: false, }); +const explorer2 = cosmiconfig("yourModuleName"); + Promise.all([ - asyncExplorer.load(), - asyncExplorer.load("start/search/here"), - asyncExplorer.load(null, "load/this/file.json") + explorer.search(), + explorer.search(path.join(__dirname)), + explorer.searchSync(), + explorer.searchSync(path.join(__dirname)), + explorer.load(path.join(__dirname, "sample-config.json")), + explorer.loadSync(path.join(__dirname, "sample-config.json")), ]).then(result => result); -asyncExplorer.load().then(({ config, filePath }) => ({ config, filePath })); - -asyncExplorer.clearFileCache(); -asyncExplorer.clearDirectoryCache(); -asyncExplorer.clearCaches(); - -const syncExplorer = cosmiconfig("yourModuleName", { - packageProp: "yourModuleName", - rc: ".yourModuleNamerc", - js: "yourModuleName.config.js", - rcStrictJson: false, - rcExtensions: false, - stopDir: "someDir", - cache: true, - sync: true, - transform: ({ config, filePath }) => ({ config, filePath }), - format: "js" -}); - -const { config, filePath } = syncExplorer.load(); +explorer.clearLoadCache(); +explorer.clearSearchCache(); +explorer.clearCaches(); diff --git a/types/cosmiconfig/index.d.ts b/types/cosmiconfig/index.d.ts index 032f570d6f..eb876b6ef2 100644 --- a/types/cosmiconfig/index.d.ts +++ b/types/cosmiconfig/index.d.ts @@ -1,63 +1,59 @@ -// Type definitions for cosmiconfig 4.0 +// Type definitions for cosmiconfig 5.0 // Project: https://github.com/davidtheclark/cosmiconfig // Definitions by: ozum +// szeck87 +// saadq // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -interface Result { - config: object; - filePath: string; +/// + +export interface Config { + [key: string]: any; } -interface Options { - packageProp?: string | false; - rc?: string | false; - js?: string | false; - rcStrictJson?: boolean; - rcExtensions?: boolean; - stopDir?: string; - cache?: boolean; - transform?: (result: Result) => Promise | Result; - configPath?: string; - format?: "json" | "yaml" | "js"; +export type CosmiconfigResult = { + config: Config; + filePath: string; + isEmpty?: boolean; +} | null; + +export interface LoaderResult { + config: Config | null; + filepath: string; } -// Default is false and makes load() method async -interface AsyncOptions extends Options { - sync?: false; +export type SyncLoader = (filepath: string, content: string) => Config | null; +export type AsyncLoader = (filepath: string, content: string) => Config | null | Promise; + +export interface LoaderEntry { + sync?: SyncLoader; + async?: AsyncLoader; } -// Makes load() method sync -interface SyncOptions extends Options { - sync: true; +export interface Loaders { + [key: string]: LoaderEntry; } -interface Explorer { - clearFileCache(): void; - clearDirectoryCache(): void; - clearCaches(): void; +export interface Explorer { + search(searchFrom?: string): Promise; + searchSync(searchFrom?: string): null | CosmiconfigResult; + load(loadPath: string): Promise; + loadSync(loadPath: string): CosmiconfigResult; + clearLoadCache(): void; + clearSearchCache(): void; + clearCaches(): void; } -interface AsyncExplorer extends Explorer { - // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. - load(searchPath?: string): Promise; - load(searchPath: null | undefined, configPath?: string): Promise; +// These are the user options with defaults applied. +export interface ExplorerOptions { + stopDir?: string; + cache?: boolean; + transform?: (result: CosmiconfigResult) => Promise | CosmiconfigResult; + packageProp?: string; + loaders?: Loaders; + searchPlaces?: string[]; + ignoreEmptySearchPlaces?: boolean; } -interface SyncExplorer extends Explorer { - // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. - load(searchPath?: string): Result; - load(searchPath: null | undefined, configPath?: string): Result; -} - -declare function cosmiconfig( - moduleName: string, - options: SyncOptions -): SyncExplorer; - -declare function cosmiconfig( - moduleName: string, - options?: AsyncOptions -): AsyncExplorer; - -export = cosmiconfig; +export default function cosmiconfig(moduleName: string, options?: ExplorerOptions): Explorer; diff --git a/types/cosmiconfig/v4/cosmiconfig-tests.ts b/types/cosmiconfig/v4/cosmiconfig-tests.ts new file mode 100644 index 0000000000..2676c58407 --- /dev/null +++ b/types/cosmiconfig/v4/cosmiconfig-tests.ts @@ -0,0 +1,41 @@ +import cosmiconfig = require("cosmiconfig"); + +const asyncExplorer = cosmiconfig("yourModuleName", { + packageProp: "yourModuleName", + rc: ".yourModuleNamerc", + js: "yourModuleName.config.js", + rcStrictJson: false, + rcExtensions: false, + stopDir: "someDir", + cache: true, + sync: false, + transform: ({ config, filePath }) => ({ config, filePath }), + format: "js" +}); + +Promise.all([ + asyncExplorer.load(), + asyncExplorer.load("start/search/here"), + asyncExplorer.load(null, "load/this/file.json") +]).then(result => result); + +asyncExplorer.load().then(({ config, filePath }) => ({ config, filePath })); + +asyncExplorer.clearFileCache(); +asyncExplorer.clearDirectoryCache(); +asyncExplorer.clearCaches(); + +const syncExplorer = cosmiconfig("yourModuleName", { + packageProp: "yourModuleName", + rc: ".yourModuleNamerc", + js: "yourModuleName.config.js", + rcStrictJson: false, + rcExtensions: false, + stopDir: "someDir", + cache: true, + sync: true, + transform: ({ config, filePath }) => ({ config, filePath }), + format: "js" +}); + +const { config, filePath } = syncExplorer.load(); diff --git a/types/cosmiconfig/v4/index.d.ts b/types/cosmiconfig/v4/index.d.ts new file mode 100644 index 0000000000..032f570d6f --- /dev/null +++ b/types/cosmiconfig/v4/index.d.ts @@ -0,0 +1,63 @@ +// Type definitions for cosmiconfig 4.0 +// Project: https://github.com/davidtheclark/cosmiconfig +// Definitions by: ozum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +interface Result { + config: object; + filePath: string; +} + +interface Options { + packageProp?: string | false; + rc?: string | false; + js?: string | false; + rcStrictJson?: boolean; + rcExtensions?: boolean; + stopDir?: string; + cache?: boolean; + transform?: (result: Result) => Promise | Result; + configPath?: string; + format?: "json" | "yaml" | "js"; +} + +// Default is false and makes load() method async +interface AsyncOptions extends Options { + sync?: false; +} + +// Makes load() method sync +interface SyncOptions extends Options { + sync: true; +} + +interface Explorer { + clearFileCache(): void; + clearDirectoryCache(): void; + clearCaches(): void; +} + +interface AsyncExplorer extends Explorer { + // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. + load(searchPath?: string): Promise; + load(searchPath: null | undefined, configPath?: string): Promise; +} + +interface SyncExplorer extends Explorer { + // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. + load(searchPath?: string): Result; + load(searchPath: null | undefined, configPath?: string): Result; +} + +declare function cosmiconfig( + moduleName: string, + options: SyncOptions +): SyncExplorer; + +declare function cosmiconfig( + moduleName: string, + options?: AsyncOptions +): AsyncExplorer; + +export = cosmiconfig; diff --git a/types/cosmiconfig/v4/tsconfig.json b/types/cosmiconfig/v4/tsconfig.json new file mode 100644 index 0000000000..f0c8707c16 --- /dev/null +++ b/types/cosmiconfig/v4/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": ["../../"], + "paths": { + "cosmiconfig": [ "cosmiconfig/v4" ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "cosmiconfig-tests.ts"] +} diff --git a/types/cosmiconfig/v4/tslint.json b/types/cosmiconfig/v4/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cosmiconfig/v4/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/countdown/index.d.ts b/types/countdown/index.d.ts index bcb0d07976..9b00293185 100644 --- a/types/countdown/index.d.ts +++ b/types/countdown/index.d.ts @@ -17,6 +17,7 @@ declare namespace countdown { decades?: number; years?: number; months?: number; + weeks?: number; days?: number; hours?: number; minutes?: number; diff --git a/types/croppie/croppie-tests.ts b/types/croppie/croppie-tests.ts index 581d01435d..a82b04fabb 100644 --- a/types/croppie/croppie-tests.ts +++ b/types/croppie/croppie-tests.ts @@ -22,4 +22,6 @@ c.result({ type: 'blob' }).then(blob => { x = blob; }); +c.get(); + c.destroy(); diff --git a/types/croppie/index.d.ts b/types/croppie/index.d.ts index 97f53f84c8..a8b53c54e5 100644 --- a/types/croppie/index.d.ts +++ b/types/croppie/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Connor Peet // dklmuc // Sarun Intaralawan +// Knut Erik Helgesen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export as namespace Croppie; @@ -26,6 +27,8 @@ declare class Croppie { result(options: Croppie.ResultOptions & { type: 'rawcanvas' }): Promise; result(options?: Croppie.ResultOptions): Promise; + get(): Croppie.CropData; + rotate(degrees: 90 | 180 | 270 | -90 | -180 | -270): void; setZoom(zoom: number): void; @@ -59,4 +62,10 @@ declare namespace Croppie { showZoomer?: boolean; viewport?: { width: number, height: number, type?: CropType }; } + + interface CropData { + points?: number[]; + orientation?: number; + zoom?: number; + } } diff --git a/types/css-font-loading-module/css-font-loading-module-tests.ts b/types/css-font-loading-module/css-font-loading-module-tests.ts index 52556a03a6..db894a5b57 100644 --- a/types/css-font-loading-module/css-font-loading-module-tests.ts +++ b/types/css-font-loading-module/css-font-loading-module-tests.ts @@ -6,6 +6,8 @@ font.load(); font.loaded.then((fontFace: FontFace) => { fontFace.status; fontFace.family; + fontFace.variationSettings; + fontFace.display; }, (fontFace: FontFace) => {}); const a: boolean = document.fonts.check("12px Example"); diff --git a/types/css-font-loading-module/index.d.ts b/types/css-font-loading-module/index.d.ts index 95d504f272..c710f2f653 100644 --- a/types/css-font-loading-module/index.d.ts +++ b/types/css-font-loading-module/index.d.ts @@ -49,6 +49,8 @@ declare global { unicodeRange: string; variant: string; featureSettings: string; + variationSettings: string; + display: string; readonly status: FontFaceLoadStatus; readonly loaded: Promise; } diff --git a/types/cucumber/cucumber-tests.ts b/types/cucumber/cucumber-tests.ts index b7fa675095..41a52c6d61 100644 --- a/types/cucumber/cucumber-tests.ts +++ b/types/cucumber/cucumber-tests.ts @@ -11,6 +11,7 @@ const Status = cucumber.Status; declare module "cucumber" { interface World { visit(url: string, callback: CallbackStepDefinition): void; + toInt(value: string): number; } } @@ -21,6 +22,7 @@ function StepSampleWithoutDefineSupportCode() { this.visit = (url: string, callback: Callback) => { callback(null, 'pending'); }; + this.toInt = parseInt; }); Before((scenarioResult: HookScenarioResult, callback: Callback) => { @@ -164,6 +166,24 @@ function StepSampleWithoutDefineSupportCode() { useForSnippets: false }); + defineParameterType({ + regexp: /(one) (two)/, + transformer: (x, y) => x + y, + name: 'param', + preferForRegexpMatch: false, + useForSnippets: false + }); + + defineParameterType({ + regexp: /123/, + transformer(val) { + return this.toInt(val); + }, + name: 'param', + preferForRegexpMatch: false, + useForSnippets: false + }); + Given('a {param} step', param => { assert.equal(param, 'PARTICULAR'); }); diff --git a/types/cucumber/index.d.ts b/types/cucumber/index.d.ts index d93ad4c7b2..8cfed3ef31 100644 --- a/types/cucumber/index.d.ts +++ b/types/cucumber/index.d.ts @@ -81,7 +81,7 @@ export interface HookScenarioResult { export interface SourceLocation { line: number; - url: string; + uri: string; } export interface ScenarioResult { @@ -129,7 +129,7 @@ export type GlobalHookCode = (callback?: CallbackStepDefinition) => void; export interface Transform { regexp: RegExp; - transformer(arg: string): any; + transformer(this: World, ...arg: string[]): any; useForSnippets?: boolean; preferForRegexpMatch?: boolean; name?: string; diff --git a/types/d3-axis/d3-axis-tests.ts b/types/d3-axis/d3-axis-tests.ts index f2b47beaa8..8edd1ab1c4 100644 --- a/types/d3-axis/d3-axis-tests.ts +++ b/types/d3-axis/d3-axis-tests.ts @@ -47,6 +47,7 @@ axisScaleNumber = scaleBand(); axisScaleNumber = scalePoint(); axisScaleString = scaleBand(); axisScaleString = scalePoint(); + // -------------------------------------------------------------------------- // Test AxisContainerElement // -------------------------------------------------------------------------- @@ -58,7 +59,8 @@ const canvas: HTMLCanvasElement = select('canvas').node( containerElement = svg; containerElement = g; -// containerElement = canvas; // fails, incompatible type +// $ExpectError +containerElement = canvas; // fails, incompatible type // -------------------------------------------------------------------------- // Test Axis Generators @@ -77,14 +79,13 @@ let leftAxis: d3Axis.Axis = d3Axis.axisLeft(scal leftAxis = leftAxis.scale(scalePow()); const powerScale: ScalePower = leftAxis.scale>(); -// powerScale = leftAxis.scale(); // fails, without casting as AxisScale is purposely generic bottomAxis = bottomAxis.scale(scaleOrdinal()); -// bottomAxis = bottomAxis.scale(scalePow()) // fails, domain of scale incompatible with domain of axis +// $ExpectError +bottomAxis = bottomAxis.scale(scalePow()); // fails, domain of scale incompatible with domain of axis const axisScale: d3Axis.AxisScale = bottomAxis.scale(); const ordinalScale: ScaleOrdinal = bottomAxis.scale>(); -// ordinalScale = bottomAxis.scale(); // fails, without casting as AxisScale is purposely generic // ticks(...) ---------------------------------------------------------------- @@ -119,6 +120,7 @@ const formatFn: ((domainValue: string, index: number) => string) | null = bottom bottomAxis.tickFormat((d, i) => '#' + i); bottomAxis.tickFormat(d => d + '!'); + // tickSize(...) ---------------------------------------------------------------- rightAxis = rightAxis.tickSize(5); @@ -149,14 +151,24 @@ const gTransition = gSelection.transition(); gSelection.call(topAxis); gTransition.call(topAxis); -const svgSelection: Selection = select('g'); +const svgSelection: Selection = select('svg'); const svgTransition = svgSelection.transition(); svgSelection.call(leftAxis); svgTransition.call(leftAxis); +const pathSelection: Selection = select('path'); +const pathTransition = svgSelection.transition(); + +// // $ExpectError +// pathSelection.call(bottomAxis); +// // $ExpectError +// pathSelection.call(bottomAxis); + const canvasSelection: Selection = select('canvas'); const canvasTransition = canvasSelection.transition(); -// canvasSelection.call(rightAxis); // fails, incompatible context container element -// canvasTransition.call(rightAxis); // fails, incompatible context container element +// $ExpectError +canvasSelection.call(rightAxis); // fails, incompatible context container element +// $ExpectError +canvasTransition.call(rightAxis); // fails, incompatible context container element diff --git a/types/d3-axis/index.d.ts b/types/d3-axis/index.d.ts index 1c7820c809..ea67b74209 100644 --- a/types/d3-axis/index.d.ts +++ b/types/d3-axis/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for D3JS d3-axis module 1.0 // Project: https://github.com/d3/d3-axis/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Last module patch version validated against: 1.0.8 @@ -11,6 +14,11 @@ import { Selection, TransitionLike } from 'd3-selection'; // Shared Types and Interfaces // -------------------------------------------------------------------------- +/** + * A helper type to alias elements which can serve as a domain for an axis. + */ +export type AxisDomain = number | string | Date | { valueOf(): number}; + /** * A helper interface to describe the minimal contract to be met by a time interval * which can be passed into the Axis.ticks(...) or Axis.tickArguments(...) methods when @@ -29,7 +37,7 @@ export interface AxisTimeInterval { /** * A helper interface to which a scale passed into axis must conform (at a minimum) - * for axis to use the scale without error + * for axis to use the scale without error. */ export interface AxisScale { (x: Domain): number | undefined; @@ -37,7 +45,7 @@ export interface AxisScale { range(): number[]; copy(): this; bandwidth?(): number; - // TODO: Reconsider the below, note that the compiler does not differentiate the overloads w.r.t. optionality + // TODO: Reconsider the below, note that the compiler does not differentiate the overloads w.r.t. optionality // ticks?(count?: number): Domain[]; // ticks?(count?: AxisTimeInterval): Date[]; // tickFormat?(count?: number, specifier?: string): ((d: number) => string); @@ -45,12 +53,12 @@ export interface AxisScale { } /** - * A helper type to alias elements which can serve as a container for an axis + * A helper type to alias elements which can serve as a container for an axis. */ export type AxisContainerElement = SVGSVGElement | SVGGElement; /** - * Interface defining an axis generator. The generic is the type of the axis domain + * Interface defining an axis generator. The generic is the type of the axis domain. */ export interface Axis { /** @@ -58,14 +66,14 @@ export interface Axis { * * @param context A selection of SVG containers (either SVG or G elements). */ - (context: Selection): void; + (context: Selection | Selection): void; /** * Render the axis to the given context. * * @param context A transition defined on SVG containers (either SVG or G elements). */ - (context: TransitionLike): void; + (context: TransitionLike | TransitionLike): void; /** * Gets the current scale underlying the axis. @@ -75,7 +83,7 @@ export interface Axis { /** * Sets the scale and returns the axis. * - * @param scale The scale to be used for axis generation + * @param scale The scale to be used for axis generation. */ scale(scale: AxisScale): this; @@ -86,7 +94,7 @@ export interface Axis { * * This method is also a convenience function for axis.tickArguments. * - * @param count Number of ticks that should be rendered + * @param count Number of ticks that should be rendered. * @param specifier An optional format specifier to customize how the tick values are formatted. */ ticks(count: number, specifier?: string): this; @@ -178,7 +186,7 @@ export interface Axis { * * See also axis.ticks. * - * @param args An array with arguments suitable for the scale to be used for tick generation + * @param args An array with arguments suitable for the scale to be used for tick generation. */ tickArguments(args: any[]): this; @@ -210,7 +218,7 @@ export interface Axis { tickFormat(): ((domainValue: Domain, index: number) => string) | null; /** - * Sets the tick format function and returns the axis. + * Sets the tick format function and returns the axis. * * @param format A function mapping a value from the axis Domain to a formatted string * for display purposes. When invoked, the format function is also passed a second argument representing the zero-based index @@ -287,7 +295,7 @@ export interface Axis { /** * Set the current padding and return the axis. * - * @param padding Padding in pixels (Default is 3). + * @param padding Padding in pixels (Default is 3). */ tickPadding(padding: number): this; } @@ -296,30 +304,30 @@ export interface Axis { * Constructs a new top-oriented axis generator for the given scale, with empty tick arguments, * a tick size of 6 and padding of 3. In this orientation, ticks are drawn above the horizontal domain path. * - * @param scale The scale to be used for axis generation + * @param scale The scale to be used for axis generation. */ -export function axisTop(scale: AxisScale): Axis; +export function axisTop(scale: AxisScale): Axis; /** * Constructs a new right-oriented axis generator for the given scale, with empty tick arguments, * a tick size of 6 and padding of 3. In this orientation, ticks are drawn to the right of the vertical domain path. * - * @param scale The scale to be used for axis generation + * @param scale The scale to be used for axis generation. */ -export function axisRight(scale: AxisScale): Axis; +export function axisRight(scale: AxisScale): Axis; /** * Constructs a new bottom-oriented axis generator for the given scale, with empty tick arguments, * a tick size of 6 and padding of 3. In this orientation, ticks are drawn below the horizontal domain path. * - * @param scale The scale to be used for axis generation + * @param scale The scale to be used for axis generation. */ -export function axisBottom(scale: AxisScale): Axis; +export function axisBottom(scale: AxisScale): Axis; /** * Constructs a new left-oriented axis generator for the given scale, with empty tick arguments, * a tick size of 6 and padding of 3. In this orientation, ticks are drawn to the left of the vertical domain path. * - * @param scale The scale to be used for axis generation + * @param scale The scale to be used for axis generation. */ -export function axisLeft(scale: AxisScale): Axis; +export function axisLeft(scale: AxisScale): Axis; diff --git a/types/d3-axis/tsconfig.json b/types/d3-axis/tsconfig.json index 5b54d1f622..0e15092e48 100644 --- a/types/d3-axis/tsconfig.json +++ b/types/d3-axis/tsconfig.json @@ -8,7 +8,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "strictFunctionTypes": false, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/d3-color/d3-color-tests.ts b/types/d3-color/d3-color-tests.ts index c001080d36..47f191073b 100644 --- a/types/d3-color/d3-color-tests.ts +++ b/types/d3-color/d3-color-tests.ts @@ -8,37 +8,21 @@ import * as d3Color from 'd3-color'; -// RGB and HSL Typeguards - -function isRGB(color: d3Color.RGBColor | d3Color.HSLColor): color is d3Color.RGBColor { - return (color instanceof d3Color.rgb); -} - -function isHSL(color: d3Color.RGBColor | d3Color.HSLColor): color is d3Color.HSLColor { - return (color instanceof d3Color.hsl); -} - // Signature tests for 'color', rgb and hsl -let c: d3Color.RGBColor | d3Color.HSLColor; +let c: d3Color.RGBColor | d3Color.HSLColor | null; let cRGB: d3Color.RGBColor; let cHSL: d3Color.HSLColor; let displayable: boolean; let cString: string; +let nil: null; -// string signature +c = d3Color.color('oops'); c = d3Color.color('steelblue'); - -if (isRGB(c)) { - cRGB = c; -} else { - cHSL = c; -} - c = d3Color.color('rgba(20, 100, 200, 0.5)'); -c = d3Color.color(cRGB); +c = d3Color.color(d3Color.rgb(0, 0, 0)); -cRGB = d3Color.color('hsl(60, 100%, 20%, 0.5)').rgb(); +cRGB = d3Color.color('hsl(60, 100%, 20%, 0.5)')!.rgb(); cRGB = d3Color.rgb(20, 100, 200); cRGB = d3Color.rgb(20, 100, 200, 0.5); @@ -126,3 +110,27 @@ displayable = cCubehelix.displayable(); cString = cCubehelix.toString(); console.log('Channels = (h : %d, s: %d, l: %d)', cCubehelix.h, cCubehelix.s, cCubehelix.l); console.log('Opacity = %d', cCubehelix.opacity); + +// Prototype, instanceof and typeguard + +declare let color: d3Color.RGBColor | d3Color.HSLColor | d3Color.LabColor | d3Color.HCLColor | d3Color.CubehelixColor | null; + +if (color instanceof d3Color.rgb) { + cRGB = color; +} else if (color instanceof d3Color.hsl) { + cHSL = color; +} else if (color instanceof d3Color.lab) { + cLab = color; +} else if (color instanceof d3Color.hcl) { + cHcl = color; +} else if (color instanceof d3Color.cubehelix) { + cCubehelix = color; +} else if (color === null) { + nil = color; +} + +if (color instanceof d3Color.color) { + console.log(color.toString(), color.darker()); +} else { + nil = color; +} diff --git a/types/d3-color/index.d.ts b/types/d3-color/index.d.ts index 96b24fd09e..825b82d9c4 100644 --- a/types/d3-color/index.d.ts +++ b/types/d3-color/index.d.ts @@ -1,9 +1,12 @@ // Type definitions for D3JS d3-color module 1.0 // Project: https://github.com/d3/d3-color/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.1 +// Last module patch version validated against: 1.0.3 // --------------------------------------------------------------------------- // Shared Type Definitions and Interfaces @@ -32,9 +35,9 @@ export interface Color { } export interface ColorFactory extends Function { - (cssColorSpecifier: string): RGBColor | HSLColor; + (cssColorSpecifier: string): RGBColor | HSLColor | null; (color: ColorSpaceObject | ColorCommonInstance): RGBColor | HSLColor; - // prototype: Color; + readonly prototype: Color; } export interface RGBColor extends Color { @@ -44,16 +47,14 @@ export interface RGBColor extends Color { opacity: number; brighter(k?: number): this; darker(k?: number): this; - displayable(): boolean; - rgb(): RGBColor; - toString(): string; + rgb(): this; } export interface RGBColorFactory extends Function { (r: number, g: number, b: number, opacity?: number): RGBColor; (cssColorSpecifier: string): RGBColor; (color: ColorSpaceObject | ColorCommonInstance): RGBColor; - // prototype: RGBColor; + readonly prototype: RGBColor; } export interface HSLColor extends Color { @@ -63,7 +64,6 @@ export interface HSLColor extends Color { opacity: number; brighter(k?: number): this; darker(k?: number): this; - displayable(): boolean; rgb(): RGBColor; } @@ -71,7 +71,7 @@ export interface HSLColorFactory extends Function { (h: number, s: number, l: number, opacity?: number): HSLColor; (cssColorSpecifier: string): HSLColor; (color: ColorSpaceObject | ColorCommonInstance): HSLColor; - // prototype: HSLColor; + readonly prototype: HSLColor; } export interface LabColor extends Color { @@ -88,7 +88,7 @@ export interface LabColorFactory extends Function { (l: number, a: number, b: number, opacity?: number): LabColor; (cssColorSpecifier: string): LabColor; (color: ColorSpaceObject | ColorCommonInstance): LabColor; - // prototype: LabColor; + readonly prototype: LabColor; } export interface HCLColor extends Color { @@ -105,7 +105,7 @@ export interface HCLColorFactory extends Function { (h: number, l: number, c: number, opacity?: number): HCLColor; (cssColorSpecifier: string): HCLColor; (color: ColorSpaceObject | ColorCommonInstance): HCLColor; - // prototype: HCLColor; + readonly prototype: HCLColor; } export interface CubehelixColor extends Color { @@ -122,7 +122,7 @@ export interface CubehelixColorFactory extends Function { (h: number, s: number, l: number, opacity?: number): CubehelixColor; (cssColorSpecifier: string): CubehelixColor; (color: ColorSpaceObject | ColorCommonInstance): CubehelixColor; - // prototype: CubehelixColor; + readonly prototype: CubehelixColor; } // -------------------------------------------------------------------------- diff --git a/types/d3-color/tsconfig.json b/types/d3-color/tsconfig.json index d783922755..f5229e4fd8 100644 --- a/types/d3-color/tsconfig.json +++ b/types/d3-color/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/d3-dispatch/d3-dispatch-tests.ts b/types/d3-dispatch/d3-dispatch-tests.ts index a9f29ef75d..4e8d2cfb31 100644 --- a/types/d3-dispatch/d3-dispatch-tests.ts +++ b/types/d3-dispatch/d3-dispatch-tests.ts @@ -16,6 +16,9 @@ interface Datum { } let dispatch: d3Dispatch.Dispatch; +let callback: (this: HTMLElement, ...args: any[]) => void; +let callbackOrUndef: ((this: HTMLElement, ...args: any[]) => void) | undefined; +let undef: undefined; // Signature Tests ---------------------------------------- @@ -33,9 +36,15 @@ function cbFn2(this: SVGElement, d: Datum, i: number) { } dispatch.on('foo', cbFn); -// dispatch.on('foo', cbFn2); // test fails as 'this' context type is mismatched between dispatch and callback function +// $ExpectError +dispatch.on('foo', cbFn2); // test fails as 'this' context type is mismatched between dispatch and callback function -dispatch.on('bar', dispatch.on('bar')); +callback = dispatch.on('bar')!; +callbackOrUndef = dispatch.on('bar'); +callbackOrUndef = dispatch.on('unknown'); +undef = dispatch.on('unknown') as undefined; + +dispatch.on('bar', dispatch.on('bar')!); dispatch.call('foo'); dispatch.call('foo', document.body); @@ -49,4 +58,5 @@ dispatch.on('bar', null); // Copy dispatch ----------------------------------------------- const copy: d3Dispatch.Dispatch = dispatch.copy(); -// const copy2: d3Dispatch.Dispatch = dispatch.copy(); // test fails type mismatch of underlying event target +// $ExpectError +const copy2: d3Dispatch.Dispatch = dispatch.copy(); // test fails type mismatch of underlying event target diff --git a/types/d3-dispatch/index.d.ts b/types/d3-dispatch/index.d.ts index 1e6e82e06f..c8beb28a5a 100644 --- a/types/d3-dispatch/index.d.ts +++ b/types/d3-dispatch/index.d.ts @@ -1,18 +1,74 @@ // Type definitions for D3JS d3-dispatch module 1.0 // Project: https://github.com/d3/d3-dispatch/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.1 +// Last module patch version validated against: 1.0.3 export interface Dispatch { + /** + * Like `function.apply`, invokes each registered callback for the specified type, + * passing the callback the specified arguments, with `that` as the `this` context. + * + * @param type A specified event type. + * @param that The `this` context for the callback. + * @param args Additional arguments to be passed to the callback. + * @throws "unknown type" on unknown event type. + */ apply(type: string, that?: T, args?: any[]): void; - call(type: string, that?: T, ...args: any[]): void; + + /** + * Like `function.call`, invokes each registered callback for the specified type, + * passing the callback the specified arguments, with `that` as the `this` context. + * See dispatch.apply for more information. + * + * @param type A specified event type. + * @param that The `this` context for the callback. + * @param args Additional arguments to be passed to the callback. + * @throws "unknown type" on unknown event type. + */ + call(type: string, that?: T, ...args: any[]): void; + + /** + * Returns a copy of this dispatch object. + * Changes to this dispatch do not affect the returned copy and vice versa. + */ copy(): Dispatch; - on(typenames: string): (this: T, ...args: any[]) => void; + /** + * Returns the callback for the specified typenames, if any. + * If multiple typenames are specified, the first matching callback is returned. + * + * @param types An event typename. + * @param callback A callback. + */ + on(typenames: string): ((this: T, ...args: any[]) => void) | undefined; + /** + * Removes the callback for the specified typenames. + * To remove all callbacks for a given name `foo`, say `dispatch.on(".foo", null).` + * + * @param types An event typename. + */ on(typenames: string, callback: null): this; + /** + * Adds the callback for the specified typenames. + * The callback is registered for the specified (fully-qualified) typenames. + * If a callback was already registered for the given typenames, + * the existing callback is removed before the new callback is added. + * + * @param types An event typename. + * @param callback A callback. + */ on(typenames: string, callback: (this: T, ...args: any[]) => void): this; } +/** + * Creates a new dispatch for the specified event types. Each type is a string, such as "start" or "end". + * + * @param types The event types. + * @throws "illegal type" on empty string or duplicated event types. + */ export function dispatch(...types: string[]): Dispatch; diff --git a/types/d3-dispatch/tsconfig.json b/types/d3-dispatch/tsconfig.json index b270a9c1a0..88000f85e4 100644 --- a/types/d3-dispatch/tsconfig.json +++ b/types/d3-dispatch/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/d3-format/d3-format-tests.ts b/types/d3-format/d3-format-tests.ts index 5ab53a45a7..5702870640 100644 --- a/types/d3-format/d3-format-tests.ts +++ b/types/d3-format/d3-format-tests.ts @@ -64,6 +64,7 @@ const zero: boolean = specifier.zero; const width: number | undefined = specifier.width; const comma: boolean = specifier.comma; const precision: number | undefined = specifier.precision; +const trim: boolean = specifier.trim; const type: 'e' | 'f' | 'g' | 'r' | 's' | '%' | 'p' | 'b' | 'o' | 'd' | 'x' | 'X' | 'c' | '' | 'n' = specifier.type; const formatString: string = specifier.toString(); diff --git a/types/d3-format/index.d.ts b/types/d3-format/index.d.ts index bb0473a4fb..0508606148 100644 --- a/types/d3-format/index.d.ts +++ b/types/d3-format/index.d.ts @@ -1,12 +1,12 @@ -// Type definitions for D3JS d3-format module 1.2 +// Type definitions for D3JS d3-format module 1.3 // Project: https://github.com/d3/d3-format/ // Definitions by: Tom Wanzek -// Alex Ford -// Boris Yankov -// denisname +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.2.0 +// Last module patch version validated against: 1.3.0 /** * Specification of locale to use when creating a new FormatLocaleObject @@ -124,6 +124,11 @@ export interface FormatSpecifier { * See precisionFixed and precisionRound for help picking an appropriate precision. */ precision: number | undefined; + /** + * The '~' option trims insignificant trailing zeros across all format types. + * This is most commonly used in conjunction with types 'r', 'e', 's' and '%'. + */ + trim: boolean; /** * The available type values are: * @@ -140,9 +145,9 @@ export interface FormatSpecifier { * 'x' - hexadecimal notation, using lower-case letters, rounded to integer. * 'X' - hexadecimal notation, using upper-case letters, rounded to integer. * 'c' - converts the integer to the corresponding unicode character before printing. - * '' (none) - like g, but trim insignificant trailing zeros. * - * The type 'n' is also supported as shorthand for ',g'. For the 'g', 'n' and '' (none) types, + * The type '' (none) is also supported as shorthand for '~g' (with a default precision of 12 instead of 6), and + * the type 'n' is shorthand for ',g'. For the 'g', 'n' and '' (none) types, * decimal notation is used if the resulting string would have precision or fewer digits; otherwise, exponent notation is used. */ type: 'e' | 'f' | 'g' | 'r' | 's' | '%' | 'p' | 'b' | 'o' | 'd' | 'x' | 'X' | 'c' | '' | 'n'; @@ -175,7 +180,7 @@ export function formatDefaultLocale(defaultLocale: FormatLocaleDefinition): Form * * Uses the current default locale. * - * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][type]. + * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type]. * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. * * @param specifier A Specifier string. @@ -191,7 +196,7 @@ export function format(specifier: string): (n: number | { valueOf(): number }) = * * Uses the current default locale. * - * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][type]. + * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type]. * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. * * @param specifier A Specifier string. @@ -204,7 +209,7 @@ export function formatPrefix(specifier: string, value: number): (n: number | { v * Parses the specified specifier, returning an object with exposed fields that correspond to the * format specification mini-language and a toString method that reconstructs the specifier. * - * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][type]. + * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type]. * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. * * @param specifier A specifier string. diff --git a/types/d3-hexbin/d3-hexbin-tests.ts b/types/d3-hexbin/d3-hexbin-tests.ts index 4dce0d1ce1..0082ae075d 100644 --- a/types/d3-hexbin/d3-hexbin-tests.ts +++ b/types/d3-hexbin/d3-hexbin-tests.ts @@ -22,22 +22,21 @@ interface Point { b.y()([41, 42]); // === 42; b.radius(); // === 1; - // hexbin(points) bins the specified points into hexagonal bins const bins = d3Hexbin.hexbin()([ [0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2] - ]) + ]); - bins.map((bin: any) => {}) + bins.map((bin: any) => {}); } { // hexbin(points) observes the current x- and y-accessors - const x = function(d: any) { return d.x; }, - y = function(d: any) { return d.y; }, - bins = d3Hexbin.hexbin().x(x).y(y)([ + const x = (d: any) => d.x; + const y = (d: any) => d.y; + const bins = d3Hexbin.hexbin().x(x).y(y)([ {x0: 0, y0: 0}, {x0: 0, y0: 1}, {x0: 0, y0: 2}, {x0: 1, y0: 0}, {x0: 1, y0: 1}, {x0: 1, y0: 2}, {x0: 2, y0: 0}, {x0: 2, y0: 1}, {x0: 2, y0: 2} @@ -52,7 +51,7 @@ interface Point { [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2] ]); - bins.map((bin: any)=> {}); + bins.map((bin: any) => {}); } { @@ -62,15 +61,15 @@ interface Point { } // hexbin.x(x) sets the x-coordinate accessor - const x = function(d: PointX) { return d.x; }, - b = d3Hexbin.hexbin().x(x), - bins = b([{x: 1, 1: 2}]); + const x = (d: PointX) => d.x; + const b = d3Hexbin.hexbin().x(x); + const bins = b([{x: 1, 1: 2}]); b.x(); // should be x; bins.length; // should be 1; bins[0].x; // should be 0.8660254037844386; bins[0].y; // should be 1.5; - bins[0].length // should be 1; + bins[0].length; // should be 1; } { @@ -79,9 +78,9 @@ interface Point { [key: number]: number; } // hexbin.y(y) sets the y-coordinate accessor - const y = function(d: PointY) { return d.y; }, - b = d3Hexbin.hexbin().y(y), - bins = b([{0: 1, y: 2}]); + const y = (d: PointY) => d.y; + const b = d3Hexbin.hexbin().y(y); + const bins = b([{0: 1, y: 2}]); bins.length; // should be 1; bins[0].x; // should be 0.8660254037844386; @@ -148,9 +147,8 @@ interface Point { } { - let hb: d3Hexbin.Hexbin; - let bins: d3Hexbin.HexbinBin[]; + let bins: Array>; // Create generator ======================================= @@ -160,8 +158,8 @@ interface Point { // x Accessor ---------------------------------------------- - let x: (d:Point) => number; - x = function (d: Point) { return d.x0; }; + let x: (d: Point) => number; + x = (d: Point) => d.x0; // test setter hb = hb.x(x); @@ -171,8 +169,8 @@ interface Point { // y Accessor ---------------------------------------------- - let y: (d:Point) => number; - y = function (d: Point) { return d.y0; }; + let y: (d: Point) => number; + y = (d: Point) => d.y0; // test setter hb = hb.y(y); @@ -193,7 +191,7 @@ interface Point { points: Point[]; } - let remappedBins: Array; + let remappedBins: RemappedBin[]; remappedBins = bins.map(bin => { const x: number = bin.x; // x-coordinate of bin diff --git a/types/d3-hexbin/index.d.ts b/types/d3-hexbin/index.d.ts index dba33cb292..5fa53e6145 100644 --- a/types/d3-hexbin/index.d.ts +++ b/types/d3-hexbin/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for D3JS d3-hexbin module v0.2.1 +// Type definitions for D3JS d3-hexbin module 0.2 // Project: https://github.com/d3/d3-hexbin/ // Definitions by: UNCOVER TRUTH Inc. , Tom Wanzek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 0.2.1 + export interface HexbinBin extends Array { x: number; y: number; @@ -17,7 +19,7 @@ export interface Hexbin { * If either the x- or y-coordinate is NaN, the point is ignored and will * not be in any of the returned bins. */ - (points: T[]): HexbinBin[]; + (points: T[]): Array>; /** * Returns the SVG path string for the hexagon centered at the origin ⟨0,0⟩. @@ -27,7 +29,7 @@ export interface Hexbin { * If radius is specified, a hexagon with the specified radius is returned; * this is useful for area-encoded bivariate hexbins. * - * @param {number} radius Radius number + * @param radius Radius number */ hexagon(radius?: number): string; @@ -78,7 +80,7 @@ export interface Hexbin { * of each point. The default value assumes each point is specified as * a two-element array of numbers [x, y]. */ - y(y: (d: T) => number): Hexbin + y(y: (d: T) => number): Hexbin; /** * If y is not specified, returns the current y-coordinate accessor, diff --git a/types/d3-hexbin/tslint.json b/types/d3-hexbin/tslint.json index a41bf5d19a..71ee04c4e1 100644 --- a/types/d3-hexbin/tslint.json +++ b/types/d3-hexbin/tslint.json @@ -1,79 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false + "no-unnecessary-generics": false } } diff --git a/types/d3-hierarchy/d3-hierarchy-tests.ts b/types/d3-hierarchy/d3-hierarchy-tests.ts index 7079fae827..4e35f02ff9 100644 --- a/types/d3-hierarchy/d3-hierarchy-tests.ts +++ b/types/d3-hierarchy/d3-hierarchy-tests.ts @@ -8,7 +8,6 @@ import * as d3Hierarchy from 'd3-hierarchy'; - // ----------------------------------------------------------------------- // Preparatory Steps // ----------------------------------------------------------------------- @@ -24,11 +23,9 @@ let idString: string; interface HierarchyDatum { name: string; val: number; - children?: Array; + children?: HierarchyDatum[]; } - - let hierarchyRootDatum: HierarchyDatum = { name: 'n0', val: 10, @@ -68,7 +65,7 @@ let hierarchyRootNode: d3Hierarchy.HierarchyNode; hierarchyRootNode = d3Hierarchy.hierarchy(hierarchyRootDatum); -hierarchyRootNode = d3Hierarchy.hierarchy(hierarchyRootDatum, function (d) { +hierarchyRootNode = d3Hierarchy.hierarchy(hierarchyRootDatum, (d) => { return d.children || null; }); @@ -82,7 +79,6 @@ num = hierarchyRootNode.height; // children, parent ------------------------------------------------------ - hierarchyNodeArray = hierarchyRootNode.children; let parentNode: d3Hierarchy.HierarchyNode; @@ -94,8 +90,8 @@ idString = hierarchyRootNode.id; // ancestors(), descendants() -------------------------------------------- -let ancestors: Array> = hierarchyRootNode.ancestors(); -let descendants: Array> = hierarchyRootNode.descendants(); +const ancestors: Array> = hierarchyRootNode.ancestors(); +const descendants: Array> = hierarchyRootNode.descendants(); // leaves() --------------------------------------------------------------- @@ -105,7 +101,7 @@ hierarchyNodeArray = hierarchyRootNode.leaves(); hierarchyNode = descendants[descendants.length - 1]; -let path: Array> = hierarchyRootNode.path(hierarchyNode); +const path: Array> = hierarchyRootNode.path(hierarchyNode); // links() and HierarchyLink<...> ------------------------------------------ @@ -121,7 +117,7 @@ hierarchyNode = link.target; // sum() and value ---------------------------------------------------------- -hierarchyRootNode = hierarchyRootNode.sum(function (d) { return d.val; }); +hierarchyRootNode = hierarchyRootNode.sum((d) => d.val); num = hierarchyRootNode.value; @@ -131,29 +127,28 @@ hierarchyRootNode = hierarchyRootNode.count(); num = hierarchyRootNode.value; - // sort --------------------------------------------------------------------- -hierarchyRootNode = hierarchyRootNode.sort(function (a, b) { - console.log(' Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyNode +hierarchyRootNode = hierarchyRootNode.sort((a, b) => { + console.log('Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyNode return b.height - a.height || b.value - a.value; }); // each(), eachAfter(), eachBefore() ---------------------------------------- -hierarchyRootNode = hierarchyRootNode.each(function (node) { - console.log(' Raw value of node:', node.data.val); // node type is HierarchyNode - console.log(' Aggregated value of node:', node.value); // node type is HierarchyNode +hierarchyRootNode = hierarchyRootNode.each((node) => { + console.log('Raw value of node:', node.data.val); // node type is HierarchyNode + console.log('Aggregated value of node:', node.value); // node type is HierarchyNode }); -hierarchyRootNode = hierarchyRootNode.eachAfter(function (node) { - console.log(' Raw value of node:', node.data.val); // node type is HierarchyNode - console.log(' Aggregated value of node:', node.value); // node type is HierarchyNode +hierarchyRootNode = hierarchyRootNode.eachAfter((node) => { + console.log('Raw value of node:', node.data.val); // node type is HierarchyNode + console.log('Aggregated value of node:', node.value); // node type is HierarchyNode }); -hierarchyRootNode = hierarchyRootNode.eachBefore(function (node) { - console.log(' Raw value of node:', node.data.val); // node type is HierarchyNode - console.log(' Aggregated value of node:', node.value); // node type is HierarchyNode +hierarchyRootNode = hierarchyRootNode.eachBefore((node) => { + console.log('Raw value of node:', node.data.val); // node type is HierarchyNode + console.log('Aggregated value of node:', node.value); // node type is HierarchyNode }); // copy() -------------------------------------------------------------------- @@ -175,7 +170,7 @@ interface TabularHierarchyDatum { val: number; } -let tabularData: Array; +let tabularData: TabularHierarchyDatum[]; tabularData = [ { name: 'n0', parentId: null, val: 10 }, { name: 'n11', parentId: 'n0', val: 5 }, @@ -183,7 +178,7 @@ tabularData = [ { name: 'n121', parentId: 'n12', val: 30 } ]; -let idStringAccessor: (d: TabularHierarchyDatum, i?: number, data?: Array) => (string | null | '' | undefined); +let idStringAccessor: (d: TabularHierarchyDatum, i?: number, data?: TabularHierarchyDatum[]) => (string | null | '' | undefined); // Create Stratify Operator --------------------------------------------- @@ -194,7 +189,7 @@ stratificatorizer = d3Hierarchy.stratify(); // id(...) -stratificatorizer = stratificatorizer.id(function (d, i, data) { +stratificatorizer = stratificatorizer.id((d, i, data) => { console.log('Length of tabular array: ', data.length); console.log('Name of first entry in tabular array: ', data[0].name); // data of type Array return d.name; // d is of type TabularHierarchyDatum @@ -204,7 +199,7 @@ idStringAccessor = stratificatorizer.id(); // parentId(...) -stratificatorizer = stratificatorizer.parentId(function (d, i, data) { +stratificatorizer = stratificatorizer.parentId((d, i, data) => { console.log('Length of tabular array: ', data.length); console.log('Name of first entry in tabular array: ', data[0].name); // data of type Array return d.parentId; // d is of type TabularHierarchyDatum @@ -214,7 +209,7 @@ idStringAccessor = stratificatorizer.parentId(); // Use Stratify Operator ------------------------------------------------ -let stratifiedRootNode: d3Hierarchy.HierarchyNode = stratificatorizer(tabularData); +const stratifiedRootNode: d3Hierarchy.HierarchyNode = stratificatorizer(tabularData); // ----------------------------------------------------------------------- // Cluster @@ -265,13 +260,12 @@ num = clusterRootNode.y; // data, depth, height --------------------------------------------------- -let clusterDatum: HierarchyDatumWithParentId = clusterRootNode.data; +const clusterDatum: HierarchyDatumWithParentId = clusterRootNode.data; num = clusterRootNode.depth; num = clusterRootNode.height; // children, parent ------------------------------------------------------ - hierarchyPointNodeArray = clusterRootNode.children; let parentPointNode: d3Hierarchy.HierarchyPointNode; @@ -283,8 +277,8 @@ idString = clusterRootNode.id; // ancestors(), descendants() -------------------------------------------- -let pointNodeAncestors: Array> = clusterRootNode.ancestors(); -let pointNodeDescendants: Array> = clusterRootNode.descendants(); +const pointNodeAncestors: Array> = clusterRootNode.ancestors(); +const pointNodeDescendants: Array> = clusterRootNode.descendants(); // leaves() --------------------------------------------------------------- @@ -294,7 +288,7 @@ hierarchyPointNodeArray = clusterRootNode.leaves(); hierarchyPointNode = pointNodeDescendants[pointNodeDescendants.length - 1]; -let clusterPath: Array> = clusterRootNode.path(hierarchyPointNode); +const clusterPath: Array> = clusterRootNode.path(hierarchyPointNode); // links() and HierarchyPointLink<...> ------------------------------------------ @@ -310,7 +304,7 @@ hierarchyPointNode = pointLink.target; // sum() and value ---------------------------------------------------------- -clusterRootNode = clusterRootNode.sum(function (d) { return d.val; }); +clusterRootNode = clusterRootNode.sum((d) => d.val); num = clusterRootNode.value; @@ -322,25 +316,25 @@ num = clusterRootNode.value; // sort --------------------------------------------------------------------- -clusterRootNode = clusterRootNode.sort(function (a, b) { - console.log(' x-coordinates of a:', a.x, ' and b:', b.x); // a and b are of type HierarchyPointNode - console.log(' Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyPointNode +clusterRootNode = clusterRootNode.sort((a, b) => { + console.log('x-coordinates of a:', a.x, ' and b:', b.x); // a and b are of type HierarchyPointNode + console.log('Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyPointNode return b.height - a.height || b.value - a.value; }); // each(), eachAfter(), eachBefore() ---------------------------------------- -clusterRootNode = clusterRootNode.each(function (node) { +clusterRootNode = clusterRootNode.each((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyPointNode console.log('X-coordinate of node:', node.x); // node type is HierarchyPointNode }); -clusterRootNode = clusterRootNode.eachAfter(function (node) { +clusterRootNode = clusterRootNode.eachAfter((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyPointNode console.log('X-coordinate of node:', node.x); // node type is HierarchyPointNode }); -clusterRootNode = clusterRootNode.eachBefore(function (node) { +clusterRootNode = clusterRootNode.eachBefore((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyPointNode console.log('X-coordinate of node:', node.x); // node type is HierarchyPointNode }); @@ -405,8 +399,7 @@ treemapLayout = d3Hierarchy.treemap(); // tile() ---------------------------------------------------------------- -treemapLayout = treemapLayout.tile(function (node, x0, y0, x1, y1) { - let n: number; +treemapLayout = treemapLayout.tile((node, x0, y0, x1, y1) => { console.log('x0 coordinate of node: ', node.x0); console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode num = x0; // number @@ -437,7 +430,7 @@ let roundFlag: boolean = treemapLayout.round(); // padding() ---------------------------------------------------------------- treemapLayout = treemapLayout.padding(1); -treemapLayout = treemapLayout.padding(function (node) { +treemapLayout = treemapLayout.padding((node) => { console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode return node.x0 > 10 ? 2 : 1; }); @@ -447,7 +440,7 @@ numberRectangularNodeAccessor = treemapLayout.padding(); // paddingInner() ---------------------------------------------------------------- treemapLayout = treemapLayout.paddingInner(1); -treemapLayout = treemapLayout.paddingInner(function (node) { +treemapLayout = treemapLayout.paddingInner((node) => { console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode return node.x0 > 10 ? 2 : 1; }); @@ -457,7 +450,7 @@ numberRectangularNodeAccessor = treemapLayout.paddingInner(); // paddingOuter() ---------------------------------------------------------------- treemapLayout = treemapLayout.paddingOuter(1); -treemapLayout = treemapLayout.paddingOuter(function (node) { +treemapLayout = treemapLayout.paddingOuter((node) => { console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode return node.x0 > 10 ? 2 : 1; }); @@ -467,7 +460,7 @@ numberRectangularNodeAccessor = treemapLayout.paddingOuter(); // paddingTop() ---------------------------------------------------------------- treemapLayout = treemapLayout.paddingTop(1); -treemapLayout = treemapLayout.paddingTop(function (node) { +treemapLayout = treemapLayout.paddingTop((node) => { console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode return node.x0 > 10 ? 2 : 1; }); @@ -477,7 +470,7 @@ numberRectangularNodeAccessor = treemapLayout.paddingTop(); // paddingRight() ---------------------------------------------------------------- treemapLayout = treemapLayout.paddingRight(1); -treemapLayout = treemapLayout.paddingRight(function (node) { +treemapLayout = treemapLayout.paddingRight((node) => { console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode return node.x0 > 10 ? 2 : 1; }); @@ -487,7 +480,7 @@ numberRectangularNodeAccessor = treemapLayout.paddingRight(); // paddingBottom() ---------------------------------------------------------------- treemapLayout = treemapLayout.paddingBottom(1); -treemapLayout = treemapLayout.paddingBottom(function (node) { +treemapLayout = treemapLayout.paddingBottom((node) => { console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode return node.x0 > 10 ? 2 : 1; }); @@ -497,21 +490,19 @@ numberRectangularNodeAccessor = treemapLayout.paddingBottom(); // paddingLeft() ---------------------------------------------------------------- treemapLayout = treemapLayout.paddingLeft(1); -treemapLayout = treemapLayout.paddingLeft(function (node) { +treemapLayout = treemapLayout.paddingLeft((node) => { console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode return node.x0 > 10 ? 2 : 1; }); numberRectangularNodeAccessor = treemapLayout.paddingLeft(); - // Use treemap layout generator ========================================== let treemapRootNode: d3Hierarchy.HierarchyRectangularNode; treemapRootNode = treemapLayout(stratifiedRootNode); - // Tiling functions ====================================================== tilingFn = d3Hierarchy.treemapBinary; @@ -536,7 +527,6 @@ tilingFactoryFn = d3Hierarchy.treemapResquarify.ratio(2); treemapLayout.tile(d3Hierarchy.treemapResquarify.ratio(2)); - // Use HierarchyRectangularNode ================================================ // x and y coordinates --------------------------------------------------- @@ -548,13 +538,12 @@ num = treemapRootNode.y1; // data, depth, height --------------------------------------------------- -let treemapDatum: HierarchyDatumWithParentId = treemapRootNode.data; +const treemapDatum: HierarchyDatumWithParentId = treemapRootNode.data; num = treemapRootNode.depth; num = treemapRootNode.height; // children, parent ------------------------------------------------------ - hierarchyRectangularNodeArray = treemapRootNode.children; let parentRectangularNode: d3Hierarchy.HierarchyRectangularNode; @@ -566,8 +555,8 @@ idString = treemapRootNode.id; // ancestors(), descendants() -------------------------------------------- -let rectangularNodeAncestors: Array> = treemapRootNode.ancestors(); -let rectangularNodeDescendants: Array> = treemapRootNode.descendants(); +const rectangularNodeAncestors: Array> = treemapRootNode.ancestors(); +const rectangularNodeDescendants: Array> = treemapRootNode.descendants(); // leaves() --------------------------------------------------------------- @@ -577,7 +566,7 @@ hierarchyRectangularNodeArray = treemapRootNode.leaves(); hierarchyRectangularNode = rectangularNodeDescendants[rectangularNodeDescendants.length - 1]; -let treemapPath: Array> = treemapRootNode.path(hierarchyRectangularNode); +const treemapPath: Array> = treemapRootNode.path(hierarchyRectangularNode); // links() and HierarchyRectangulerLink<...> ------------------------------------------ @@ -593,7 +582,7 @@ hierarchyRectangularNode = rectangularLink.target; // sum() and value ---------------------------------------------------------- -treemapRootNode = treemapRootNode.sum(function (d) { return d.val; }); +treemapRootNode = treemapRootNode.sum((d) => d.val); num = treemapRootNode.value; @@ -604,25 +593,25 @@ treemapRootNode = treemapRootNode.count(); num = treemapRootNode.value; // sort --------------------------------------------------------------------- -treemapRootNode = treemapRootNode.sort(function (a, b) { - console.log(' x0-coordinates of a:', a.x0, ' and b:', b.x0); // a and b are of type HierarchyRectangularNode - console.log(' Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyRectangularNode +treemapRootNode = treemapRootNode.sort((a, b) => { + console.log('x0-coordinates of a:', a.x0, ' and b:', b.x0); // a and b are of type HierarchyRectangularNode + console.log('Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyRectangularNode return b.height - a.height || b.value - a.value; }); // each(), eachAfter(), eachBefore() ---------------------------------------- -treemapRootNode = treemapRootNode.each(function (node) { +treemapRootNode = treemapRootNode.each((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyRectangularNode console.log('X0-coordinate of node:', node.x0); // node type is HierarchyRectangularNode }); -treemapRootNode = treemapRootNode.eachAfter(function (node) { +treemapRootNode = treemapRootNode.eachAfter((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyRectangularNode console.log('X0-coordinate of node:', node.x0); // node type is HierarchyRectangularNode }); -treemapRootNode = treemapRootNode.eachBefore(function (node) { +treemapRootNode = treemapRootNode.eachBefore((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyRectangularNode console.log('X0-coordinate of node:', node.x0); // node type is HierarchyRectangularNode }); @@ -632,8 +621,6 @@ treemapRootNode = treemapRootNode.eachBefore(function (node) { let copiedTreemapNode: d3Hierarchy.HierarchyRectangularNode; copiedTreemapNode = treemapRootNode.copy(); - - // ----------------------------------------------------------------------- // Partition // ----------------------------------------------------------------------- @@ -646,7 +633,6 @@ partitionLayout = d3Hierarchy.partition(); // Configure partition layout generator ==================================== - // size() ---------------------------------------------------------------- partitionLayout = partitionLayout.size(null); @@ -666,7 +652,6 @@ partitionLayout = partitionLayout.padding(1); num = partitionLayout.padding(); - // Use partition layout generator ========================================== let partitionRootNode: d3Hierarchy.HierarchyRectangularNode; @@ -687,7 +672,6 @@ packLayout = d3Hierarchy.pack(); // Configure pack layout generator ==================================== - // size() ---------------------------------------------------------------- packLayout = packLayout.size(null); @@ -697,7 +681,7 @@ size = packLayout.size(); // radius() ------------------------------------------------------------ -packLayout = packLayout.radius(function (node) { +packLayout = packLayout.radius((node) => { console.log('Radius property of node before completing accessor: ', node.r); // node is of type HierarchyCircularNode console.log('Parent id of node: ', node.data.parentId); // node is of type HierarchyCircularNode return node.value; @@ -709,7 +693,7 @@ numberCircularNodeAccessor = packLayout.radius(); packLayout = packLayout.padding(1); -packLayout = packLayout.padding(function (node) { +packLayout = packLayout.padding((node) => { console.log('Radius property of node: ', node.r); // node is of type HierarchyCircularNode console.log('Parent id of node: ', node.data.parentId); // node is of type HierarchyCircularNode return node.value > 10 ? 2 : 1; @@ -717,14 +701,12 @@ packLayout = packLayout.padding(function (node) { numberCircularNodeAccessor = packLayout.padding(); - // Use partition layout generator ========================================== let packRootNode: d3Hierarchy.HierarchyCircularNode; packRootNode = packLayout(stratifiedRootNode); - // Use HierarchyCircularNode ================================================ // x and y coordinates and radius r ------------------------------------------ @@ -735,13 +717,12 @@ num = packRootNode.r; // data, depth, height --------------------------------------------------- -let packDatum: HierarchyDatumWithParentId = packRootNode.data; +const packDatum: HierarchyDatumWithParentId = packRootNode.data; num = packRootNode.depth; num = packRootNode.height; // children, parent ------------------------------------------------------ - hierarchyCircularNodeArray = packRootNode.children; let parentCircularNode: d3Hierarchy.HierarchyCircularNode; @@ -753,8 +734,8 @@ idString = packRootNode.id; // ancestors(), descendants() -------------------------------------------- -let circularNodeAncestors: Array> = packRootNode.ancestors(); -let circularNodeDescendants: Array> = packRootNode.descendants(); +const circularNodeAncestors: Array> = packRootNode.ancestors(); +const circularNodeDescendants: Array> = packRootNode.descendants(); // leaves() --------------------------------------------------------------- @@ -764,7 +745,7 @@ hierarchyCircularNodeArray = packRootNode.leaves(); hierarchyCircularNode = circularNodeDescendants[circularNodeDescendants.length - 1]; -let packPath: Array> = packRootNode.path(hierarchyCircularNode); +const packPath: Array> = packRootNode.path(hierarchyCircularNode); // links() and HierarchyRectangulerLink<...> ------------------------------------------ @@ -780,7 +761,7 @@ hierarchyCircularNode = circularLink.target; // sum() and value ---------------------------------------------------------- -packRootNode = packRootNode.sum(function (d) { return d.val; }); +packRootNode = packRootNode.sum((d) => d.val); num = packRootNode.value; @@ -791,25 +772,25 @@ packRootNode = packRootNode.count(); num = packRootNode.value; // sort --------------------------------------------------------------------- -packRootNode = packRootNode.sort(function (a, b) { +packRootNode = packRootNode.sort((a, b) => { console.log('radius of a:', a.r, ' and b:', b.r); // a and b are of type HierarchyCircularNode - console.log(' Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyCircularNode + console.log('Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyCircularNode return b.height - a.height || b.value - a.value; }); // each(), eachAfter(), eachBefore() ---------------------------------------- -packRootNode = packRootNode.each(function (node) { +packRootNode = packRootNode.each((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyCircularNode console.log('Radius of node:', node.r); // node type is HierarchyCircularNode }); -packRootNode = packRootNode.eachAfter(function (node) { +packRootNode = packRootNode.eachAfter((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyCircularNode console.log('Radius of node:', node.r); // node type is HierarchyCircularNode }); -packRootNode = packRootNode.eachBefore(function (node) { +packRootNode = packRootNode.eachBefore((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyCircularNode console.log('Radius of node:', node.r); // node type is HierarchyCircularNode }); @@ -819,7 +800,6 @@ packRootNode = packRootNode.eachBefore(function (node) { let copiedPackNode: d3Hierarchy.HierarchyCircularNode; copiedPackNode = packRootNode.copy(); - // ----------------------------------------------------------------------- // Pack Siblings and Enclosure // ----------------------------------------------------------------------- @@ -828,7 +808,7 @@ interface CircleData extends d3Hierarchy.PackCircle { v: string; } -let circles: Array = [ +let circles: CircleData[] = [ { r: 10, v: 'a' }, { r: 1, v: 'b' }, { r: 20, v: 'c' } diff --git a/types/d3-hierarchy/index.d.ts b/types/d3-hierarchy/index.d.ts index bfe750b31e..a72dfa0aba 100644 --- a/types/d3-hierarchy/index.d.ts +++ b/types/d3-hierarchy/index.d.ts @@ -9,7 +9,6 @@ // Hierarchy // ----------------------------------------------------------------------- - export interface HierarchyLink { source: HierarchyNode; target: HierarchyNode; @@ -45,7 +44,6 @@ export interface HierarchyNode { copy(): HierarchyNode; } - export function hierarchy(data: Datum, children?: (d: Datum) => (Datum[] | null)): HierarchyNode; // ----------------------------------------------------------------------- @@ -54,7 +52,6 @@ export function hierarchy(data: Datum, children?: (d: Datum) => (Datum[] // TODO: Review the comment in the API documentation related to 'reserved properties': id, parentId, children. If this is refering to the element on node, it should be 'parent'? - export interface StratifyOperator { (data: Datum[]): HierarchyNode; id(): (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined); @@ -212,7 +209,6 @@ export function treemap(): TreemapLayout; // Tiling functions --------------------------------------------------------------------------------- - export function treemapBinary(node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number): void; export function treemapDice(node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number): void; export function treemapSlice(node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number): void; @@ -224,9 +220,8 @@ export interface RatioSquarifyTilingFactory { ratio(ratio: number): RatioSquarifyTilingFactory; } -export var treemapSquarify: RatioSquarifyTilingFactory; -export var treemapResquarify: RatioSquarifyTilingFactory; - +export const treemapSquarify: RatioSquarifyTilingFactory; +export const treemapResquarify: RatioSquarifyTilingFactory; // ----------------------------------------------------------------------- // Partition @@ -286,7 +281,6 @@ export interface HierarchyCircularNode { copy(): HierarchyCircularNode; } - export interface PackLayout { (root: HierarchyNode): HierarchyCircularNode; radius(): null | ((node: HierarchyCircularNode) => number); @@ -300,7 +294,6 @@ export interface PackLayout { export function pack(): PackLayout; - // ----------------------------------------------------------------------- // Pack Siblings and Enclosure // ----------------------------------------------------------------------- diff --git a/types/d3-hierarchy/tslint.json b/types/d3-hierarchy/tslint.json index a41bf5d19a..71ee04c4e1 100644 --- a/types/d3-hierarchy/tslint.json +++ b/types/d3-hierarchy/tslint.json @@ -1,79 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false + "no-unnecessary-generics": false } } diff --git a/types/d3-hsv/d3-hsv-tests.ts b/types/d3-hsv/d3-hsv-tests.ts index 0d3e564360..7aa6fb7817 100644 --- a/types/d3-hsv/d3-hsv-tests.ts +++ b/types/d3-hsv/d3-hsv-tests.ts @@ -6,19 +6,23 @@ * are not intended as functional tests. */ -import { hsv, HSVColor } from 'd3-hsv'; -import { rgb, RGBColor } from 'd3-color'; +import { hsv, HSVColor, interpolateHsv, interpolateHsvLong } from 'd3-hsv'; +import { rgb, hcl, RGBColor } from 'd3-color'; -let c: RGBColor; +let cRGB: RGBColor; let cHSV: HSVColor; let displayable: boolean; let cString: string; +let iString: (t: number) => string; +let nil: null; + +// Hsv signature -// hsv signature cHSV = hsv(120, 0.4, 0.5); cHSV = hsv(120, 0.4, 0.5, 0.5); -// specifier signature +// Specifier signature + cHSV = hsv('rgb(255, 255, 255)'); cHSV = hsv('rgb(10%, 20%, 30%)'); cHSV = hsv('rgba(255, 255, 255, 0.4)'); @@ -28,13 +32,16 @@ cHSV = hsv('hsla(120, 50%, 20%, 0.4)'); cHSV = hsv('#ffeeaa'); cHSV = hsv('#fea'); cHSV = hsv('steelblue'); +cHSV = hsv(''); -// color signature -c = rgb('steelblue'); -cHSV = hsv(c); +// Color signature + +cRGB = rgb('steelblue'); +cHSV = hsv(cRGB); cHSV = hsv(cHSV); -// method signatures +// Method signatures + cHSV = cHSV.brighter(); cHSV = cHSV.brighter(0.2); cHSV = cHSV.darker(); @@ -43,3 +50,25 @@ displayable = cHSV.displayable(); cString = cHSV.toString(); console.log('Channels = (h : %d, s: %d, v: %d)', cHSV.h, cHSV.s, cHSV.v); console.log('Opacity = %d', cHSV.opacity); + +// Interpolater + +iString = interpolateHsv('seagreen', 'steelblue'); +iString = interpolateHsv(rgb('seagreen'), hcl('steelblue')); +iString = interpolateHsv(rgb('seagreen'), hsv('steelblue')); + +iString = interpolateHsvLong('seagreen', 'steelblue'); +iString = interpolateHsvLong(rgb('seagreen'), hcl('steelblue')); +iString = interpolateHsvLong(rgb('seagreen'), hsv('steelblue')); + +// Prototype, instanceof and typeguard + +declare let color: RGBColor | HSVColor | null; + +if (color instanceof rgb) { + cRGB = color; +} else if (color instanceof hsv) { + cHSV = color; +} else { + nil = color; +} diff --git a/types/d3-hsv/index.d.ts b/types/d3-hsv/index.d.ts index 6a7a2c8560..1728af0874 100644 --- a/types/d3-hsv/index.d.ts +++ b/types/d3-hsv/index.d.ts @@ -1,28 +1,89 @@ -// Type definitions for D3JS d3-hsv module 0.0 +// Type definitions for D3JS d3-hsv module 0.1 // Project: https://github.com/d3/d3-hsv/ -// Definitions by: Yuri Feldman +// Definitions by: Yuri Feldman , denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 0.0.3 +// Last module patch version validated against: 0.1.0 import { Color, RGBColor, ColorSpaceObject, ColorCommonInstance } from 'd3-color'; export type ColorSpaceObjectWithHSV = ColorSpaceObject | HSVColor; export interface HSVColorFactory extends Function { + /** + * Constructs a new HSV color. + * @param h The hue of the returned color. + * @param s The saturation of the returned color. + * @param v The value of the returned color. + * @param opacity The opacity of the returned color. + */ (h: number, s: number, v: number, opacity?: number): HSVColor; + /** + * Constructs a new HSV color. + * @param cssColorSpecifier A CSS Color Module Level 3 specifier string, + * it is parsed and then converted to the HSV color space. + */ (cssColorSpecifier: string): HSVColor; + /** + * Constructs a new HSV color. + * @param color A color instance, it will be converted to the RGB color space + * using `color.rgb` and then converted to HSV. + */ (color: HSVColor | ColorSpaceObject | ColorCommonInstance): HSVColor; + + readonly prototype: HSVColor; } export interface HSVColor extends Color { + /** + * The color hue. + */ h: number; + /** + * The color saturation. + */ s: number; + /** + * The color value. + */ v: number; + /** + * The color opacity. + */ opacity: number; + + /** + * Returns a brighter copy of this color. + * @param k Controls how much brighter the returned color should be (defaults to 1). + */ brighter(k?: number): this; + + /** + * Returns a darker copy of this color. + * @param k Controls how much darker the returned color should be (defaults to 1). + */ darker(k?: number): this; + + /** + * Returns the RGB equivalent of this color. + */ rgb(): RGBColor; } export const hsv: HSVColorFactory; + +/** + * Returns an HSV color space interpolator between the two colors a and b. + * If either color’s hue or chroma is NaN, the opposing color’s channel value is used. + * The shortest path between hues is used. The return value of the interpolator is an RGB string. + * @param a The starting color; it will be converted to HSV using `d3.hsv`. + * @param b The ending color; it will be converted to HSV using `d3.hsv`. + */ +export function interpolateHsv(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string; + +/** + * Like `interpolateHsv`, but does not use the shortest path between hues. + * @param a The starting color; it will be converted to HSV using `d3.hsv`. + * @param b The ending color; it will be converted to HSV using `d3.hsv`. + */ +export function interpolateHsvLong(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string; diff --git a/types/d3-hsv/tsconfig.json b/types/d3-hsv/tsconfig.json index c92ce346b2..0f7de85da1 100644 --- a/types/d3-hsv/tsconfig.json +++ b/types/d3-hsv/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/d3-polygon/d3-polygon-tests.ts b/types/d3-polygon/d3-polygon-tests.ts index 28e1e464e1..c4aac0b900 100644 --- a/types/d3-polygon/d3-polygon-tests.ts +++ b/types/d3-polygon/d3-polygon-tests.ts @@ -17,7 +17,7 @@ let containsFlag: boolean; let point: [number, number] = [15, 15]; const polygon: Array<[number, number]> = [[10, 10], [20, 20], [10, 30]]; const pointArray: Array<[number, number]> = [[10, 10], [20, 20], [10, 30], [15, 15]]; -let hull: Array<[number, number]>; +let hullOrNothing: Array<[number, number]> | null; // ----------------------------------------------------------------------------- // Tests @@ -27,7 +27,7 @@ num = d3Polygon.polygonArea(polygon); point = d3Polygon.polygonCentroid(polygon); -hull = d3Polygon.polygonHull(pointArray); +hullOrNothing = d3Polygon.polygonHull(pointArray); containsFlag = d3Polygon.polygonContains(polygon, point); diff --git a/types/d3-polygon/index.d.ts b/types/d3-polygon/index.d.ts index 64e1d2c9b9..b9f8711335 100644 --- a/types/d3-polygon/index.d.ts +++ b/types/d3-polygon/index.d.ts @@ -3,11 +3,11 @@ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.1 +// Last module patch version validated against: 1.0.3 /** - * Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order ( - * assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner), the returned area is positive; + * Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order + * (assuming a coordinate system where the origin <0,0> is in the top-left corner), the returned area is positive; * otherwise it is negative, or zero. * * @param polygon Array of coordinates , and so on. @@ -34,7 +34,7 @@ export function polygonHull(points: Array<[number, number]>): Array<[number, num * Returns true if and only if the specified point is inside the specified polygon. * * @param polygon Array of coordinates , and so on. - * @param point Coordinates of point + * @param point Coordinates of point . */ export function polygonContains(polygon: Array<[number, number]>, point: [number, number]): boolean; diff --git a/types/d3-polygon/tsconfig.json b/types/d3-polygon/tsconfig.json index 79bd8a43b8..1444a903df 100644 --- a/types/d3-polygon/tsconfig.json +++ b/types/d3-polygon/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/d3-polygon/tslint.json b/types/d3-polygon/tslint.json index 604d5950cf..f93cf8562a 100644 --- a/types/d3-polygon/tslint.json +++ b/types/d3-polygon/tslint.json @@ -1,7 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "unified-signatures": false, - "callable-types": false - } + "extends": "dtslint/dt.json" } diff --git a/types/dat.gui/index.d.ts b/types/dat.gui/index.d.ts index 3cf4883fd8..967b5ae13b 100644 --- a/types/dat.gui/index.d.ts +++ b/types/dat.gui/index.d.ts @@ -1,10 +1,49 @@ -// Type definitions for dat.GUI 0.6 +// Type definitions for dat.GUI 0.7 // Project: https://github.com/dataarts/dat.gui // Definitions by: Satoru Kimura , ZongJing Lu , Richard Roylance // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export as namespace dat; +export interface GUIParams { + /** + * Handles GUI's element placement for you. + * @default true + */ + autoPlace?: boolean; + /** + * If true, starts closed. + * @default false + */ + closed?: boolean; + /** + * If true, close/open button shows on top of the GUI. + * @default false + */ + closeOnTop?: boolean; + /** + * If true, GUI is closed by the "h" keypress. + * @default false + */ + hideable?: boolean; + /** + * JSON object representing the saved state of this GUI. + */ + load?: any; + /** + * The name of this GUI. + */ + name?: string; + /** + * The identifier for a set of saved values. + */ + preset?: string; + /** + * The width of GUI element. + */ + width?: number; +} + export class GUI { constructor(option?: GUIParams); @@ -20,9 +59,6 @@ export class GUI { add(target: Object, propName:string, items:Object): GUIController; addColor(target: Object, propName:string): GUIController; - addColor(target: Object, propName:string, color: string): GUIController; - addColor(target: Object, propName:string, rgba: number[]): GUIController; // rgb or rgba - addColor(target: Object, propName:string, hsv:{h:number; s:number; v:number}): GUIController; remove(controller: GUIController): void; destroy(): void; @@ -55,16 +91,6 @@ export class GUI { useLocalStorage: boolean; } -export interface GUIParams{ - autoPlace?: boolean; - closed?: boolean; - closeOnTop?: boolean; - load?: any; - name?: string; - preset?: string; - width?: number; -} - export class GUIController { destroy(): void; diff --git a/types/daterangepicker/daterangepicker-tests.ts b/types/daterangepicker/daterangepicker-tests.ts index db79671721..2f8ab867e4 100644 --- a/types/daterangepicker/daterangepicker-tests.ts +++ b/types/daterangepicker/daterangepicker-tests.ts @@ -1,80 +1,116 @@ -import moment = require("moment") -import daterangepicker = require("daterangepicker"); +import moment = require('moment'); +import daterangepicker = require('daterangepicker'); function tests_simple() { $('#daterange').daterangepicker(); - $('input[name="daterange"]').daterangepicker({ - timePicker: true, - timePickerIncrement: 30, - locale: { - format: 'MM/DD/YYYY h:mm A' - } - }); + $('input[name="daterange"]') + .daterangepicker({ + timePicker: true, + timePickerIncrement: 30, + locale: { + format: 'MM/DD/YYYY h:mm A' + }, + maxSpan: { days: 10 }, + applyButtonClasses: 'my-apply-class', + cancelButtonClasses: 'my-cancel-class', + showDropdowns: true, + maxYear: 3000, + minYear: 2000 + }) + .data('daterangepicker') + .remove(); $('#reportrange').daterangepicker({ ranges: { - 'Today': [moment(), moment()], - 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + Today: [moment(), moment()], + Yesterday: [moment().subtract(1, 'days'), moment().subtract(1, 'days')], 'Last 7 Days': [moment().subtract(6, 'days'), moment()], 'Last 30 Days': [moment().subtract(29, 'days'), moment()], 'This Month': [moment().startOf('month'), moment().endOf('month')], - 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] + 'Last Month': [ + moment() + .subtract(1, 'month') + .startOf('month'), + moment() + .subtract(1, 'month') + .endOf('month') + ] } }); - $('input[name="datefilter"]').on('apply.daterangepicker', function (ev, picker) { - $(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY')); + $('input[name="datefilter"]').on('apply.daterangepicker', function(ev, picker) { + $(this).val( + `${picker.startDate.format('MM/DD/YYYY')} - ${picker.endDate.format('MM/DD/YYYY')}` + ); }); - - $('input[name="datefilter"]').on('cancel.daterangepicker', function (ev, picker) { + $('input[name="datefilter"]').on('cancel.daterangepicker', function(ev, picker) { $(this).val(''); }); - $('#demo').daterangepicker({ - "startDate": "05/06/2016", - "endDate": "05/12/2016" - }, function (start: moment.Moment, end: moment.Moment, label: string) { - console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')"); - }); - - $(function() { - - function cb(start: moment.Moment, end: moment.Moment) { - $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); - } - cb(moment().subtract(29, 'days'), moment()); - - $('#reportrange').daterangepicker({ - ranges: { - 'Today': [moment(), moment()], - 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], - 'Last 7 Days': [moment().subtract(6, 'days'), moment()], - 'Last 30 Days': [moment().subtract(29, 'days'), moment()], - 'This Month': [moment().startOf('month'), moment().endOf('month')], - 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] - } - }, cb); - - $('#reportrange').daterangepicker({ - ranges: { - 'Today': [moment(), moment()], - 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], - 'Last 7 Days': [moment().subtract(6, 'days'), moment()], - 'Last 30 Days': [moment().subtract(29, 'days'), moment()] + $('#demo').daterangepicker( + { + startDate: '05/06/2016', + endDate: '05/12/2016' }, - showCustomRangeLabel: false - }, cb); + (start: moment.Moment, end: moment.Moment, label: string) => { + console.log( + "New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')" + ); + } + ); - $('#endDate').daterangepicker({ - singleDatePicker: true, - startDate: moment() + $(() => { + function cb(start: moment.Moment, end: moment.Moment) { + $('#reportrange span').html( + `${start.format('MMMM D, YYYY')} - ${end.format('MMMM D, YYYY')}` + ); + } + cb(moment().subtract(29, 'days'), moment()); + + $('#reportrange').daterangepicker( + { + ranges: { + Today: [moment(), moment()], + Yesterday: [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + 'Last 7 Days': [moment().subtract(6, 'days'), moment()], + 'Last 30 Days': [moment().subtract(29, 'days'), moment()], + 'This Month': [moment().startOf('month'), moment().endOf('month')], + 'Last Month': [ + moment() + .subtract(1, 'month') + .startOf('month'), + moment() + .subtract(1, 'month') + .endOf('month') + ] + } + }, + cb + ); + + $('#reportrange').daterangepicker( + { + ranges: { + Today: [moment(), moment()], + Yesterday: [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + 'Last 7 Days': [moment().subtract(6, 'days'), moment()], + 'Last 30 Days': [moment().subtract(29, 'days'), moment()] + }, + showCustomRangeLabel: false + }, + cb + ); + + $('#endDate').daterangepicker({ + singleDatePicker: true, + startDate: moment() + }); }); -}); } declare const host: HTMLElement; function test_from_amd() { - var picker = new daterangepicker(host); - console.log(picker.startDate.format("YYYY-MM-DD")); + const picker = new daterangepicker(host); + console.log(picker.startDate.format('YYYY-MM-DD')); } diff --git a/types/daterangepicker/index.d.ts b/types/daterangepicker/index.d.ts index 5a82950ca9..9267a801b2 100644 --- a/types/daterangepicker/index.d.ts +++ b/types/daterangepicker/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Date Range Picker v2.1.30 +// Type definitions for Date Range Picker 3.0 // Project: http://www.daterangepicker.com/ // Definitions by: SirMartin // Steven Masala @@ -7,62 +7,81 @@ // TypeScript Version: 2.3 /// -import moment = require("moment"); +import moment = require('moment'); declare global { interface JQuery { - daterangepicker(settings?: daterangepicker.Settings): JQuery; - daterangepicker(settings?: daterangepicker.Settings, callback?: daterangepicker.DataRangePickerCallback): JQuery; + daterangepicker: (( + options?: daterangepicker.Options, + callback?: daterangepicker.DataRangePickerCallback + ) => JQuery) & { defaultOptions?: daterangepicker.Options }; + data(key: 'daterangepicker'): daterangepicker | undefined; } } -declare const daterangepicker: daterangepicker.DateRangePicker; +declare class daterangepicker { + constructor( + element: HTMLElement, + options?: daterangepicker.Options, + callback?: daterangepicker.DataRangePickerCallback + ); + + startDate: moment.Moment; + endDate: moment.Moment; + container: JQuery; + + setStartDate(date: daterangepicker.DateOrString): void; + setEndDate(date: daterangepicker.DateOrString): void; + remove(): void; +} declare namespace daterangepicker { - type DataRangePickerCallback = (start: moment.Moment, end: moment.Moment, label: string | null) => any; + type DataRangePickerCallback = ( + start: moment.Moment, + end: moment.Moment, + label: string | null + ) => void; - interface DateRangePicker { - new (element: HTMLElement, settings?: daterangepicker.Settings, callback?: DataRangePickerCallback): DateRangePicker; - - startDate: moment.Moment; - endDate: moment.Moment; - container: JQuery; - - setStartDate(date: Date | moment.Moment | string): void; - setEndDate(date: Date | moment.Moment | string): void; - remove(): void; - } + type DateOrString = string | moment.Moment | Date; interface DatepickerEventObject extends JQueryEventObject { date: Date; format(format?: string): string; } - interface Settings { + interface Options { /** * The start of the initially selected date range */ - startDate?: string | moment.Moment | Date; + startDate?: DateOrString; /** * The end of the initially selected date range */ - endDate?: string | moment.Moment | Date; + endDate?: DateOrString; /** - * The earliest date a user may select + * The earliest date a user may select */ - minDate?: string | moment.Moment | Date; + minDate?: DateOrString; /** * The latest date a user may select */ - maxDate?: string | moment.Moment | Date; + maxDate?: DateOrString; /** * The maximum span between the selected start and end dates. Can have any property you can add to a moment object (i.e. days, months) */ - dateLimit?: any; + maxSpan?: moment.MomentInput | moment.Duration; /** * Show year and month select boxes above calendars to jump to a specific month and year */ showDropdowns?: boolean; + /** + * The minimum year shown in the dropdowns when `showDropdowns` is set to true. + */ + minYear?: number; + /** + * The maximum year shown in the dropdowns when `showDropdowns` is set to true. + */ + maxYear?: number; /** * Show localized week numbers at the start of each week on the calendars */ @@ -90,15 +109,25 @@ declare namespace daterangepicker { /** * Set predefined date ranges the user can select from.Each key is the label for the range, and its value an array with two dates representing the bounds of the range. */ - ranges?: any; + ranges?: { [name: string]: [DateOrString, DateOrString] }; /** - * (string: 'left'/'right'/'center') Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to + * Whether to show the 'Custom Range' label or just pre-defined ranges */ - opens?: string; + showCustomRangeLabel?: boolean; /** - * (string: 'down' or 'up') Whether the picker appears below (default) or above the HTML element it's attached to + * Normally, if you use the `ranges` option to specify pre-defined date ranges, calendars + * for choosing a custom date range are not shown until the user clicks "Custom Range". + * When this option is set to true, the calendars for choosing a custom date range are always shown instead. */ - drops?: string; + alwaysShowCalendars?: boolean; + /** + * Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to + */ + opens?: 'left' | 'right' | 'center'; + /** + * Whether the picker appears below (default) or above the HTML element it's attached to + */ + drops?: 'down' | 'up'; /** * CSS class names that will be added to all buttons in the picker */ @@ -106,11 +135,11 @@ declare namespace daterangepicker { /** * CSS class string that will be added to the apply button */ - applyClass?: string; + applyButtonClasses?: string; /** - * CSS class string that will be added to the cancel button - */ - cancelClass?: string; + * CSS class string that will be added to the cancel button + */ + cancelButtonClasses?: string; /** * Allows you to provide localized strings for buttons and labels, customize the date display format, and change the first day of week for the calendars. */ @@ -124,33 +153,28 @@ declare namespace daterangepicker { */ autoApply?: boolean; /** - * When enabled, the two calendars displayed will always be for two sequential months (i.e.January and February), and both will be advanced when clicking the left or right arrows above the calendars.When disabled, the two calendars can be individually advanced and display any month/ year. + * When enabled, the two calendars displayed will always be for two sequential months (i.e. + * January and February), and both will be advanced when clicking the left or right arrows + * above the calendars.When disabled, the two calendars can be individually advanced and + * display any month/ year. */ linkedCalendars?: boolean; - /** - * jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body' - */ - parentEl?: string; /** * A function that is passed each date in the two calendars before they are displayed, and may return true or false to indicate whether that date should be available for selection or not. */ - isInvalidDate?(startDate: string | moment.Moment | Date, endDate?: string | moment.Moment | Date): boolean; + isInvalidDate?(startDate: DateOrString, endDate?: DateOrString): boolean; /** * A function that is passed each date in the two calendars before they are displayed, and may return a string or array of CSS class names to apply to that date's calendar cell. */ - isCustomDate?(date: string | moment.Moment | Date): string | string[] | undefined; + isCustomDate?(date: DateOrString): string | string[] | undefined; /** * Indicates whether the date range picker should automatically update the value of an < input > element it's attached to at initialization and when the selected dates change. */ autoUpdateInput?: boolean; /** - * Normally, if you use the ranges option to specify pre- defined date ranges, calendars for choosing a custom date range are not shown until the user clicks "Custom Range".When this option is set to true, the calendars for choosing a custom date range are always shown instead. - */ - alwaysShowCalendars?: boolean; - /** - * Whether to show the 'Custom Range' label or just pre-defined ranges - */ - showCustomRangeLabel?: boolean; + * jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body' + */ + parentEl?: string; } interface Locale { diff --git a/types/daterangepicker/tslint.json b/types/daterangepicker/tslint.json index a41bf5d19a..3db14f85ea 100644 --- a/types/daterangepicker/tslint.json +++ b/types/daterangepicker/tslint.json @@ -1,79 +1 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} +{ "extends": "dtslint/dt.json" } diff --git a/types/deglob/deglob-tests.ts b/types/deglob/deglob-tests.ts new file mode 100644 index 0000000000..1f9990d345 --- /dev/null +++ b/types/deglob/deglob-tests.ts @@ -0,0 +1,21 @@ +/// + +import deglob = require('deglob'); + +deglob(['**/*.js'], (err, files) => { + files.forEach(file => { + console.log('found file ' + file); + }); +}); + +const opts = { + cwd: 'foo', + useGitIgnore: false, + usePackageJson: false +}; + +deglob(['**/*.js'], opts, (err, files) => { + files.forEach(file => { + console.log('found file ' + file); + }); +}); diff --git a/types/deglob/index.d.ts b/types/deglob/index.d.ts new file mode 100644 index 0000000000..6310201c11 --- /dev/null +++ b/types/deglob/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for deglob v 2.1 +// Project: https://github.com/standard/deglob +// Definitions by: Saad Quadri +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type Callback = (err: Error | null, files: string[]) => void; + +declare function deglob(patterns: string[], cb: Callback): void; +declare function deglob(patterns: string[], opts: deglob.Options, cb: Callback): void; + +declare namespace deglob { + interface Options { + useGitIgnore?: boolean; + usePackageJson?: boolean; + configKey?: string; + gitIgnoreFile?: string; + ignore?: string[]; + cwd?: string; + } +} + +export = deglob; diff --git a/types/deglob/tsconfig.json b/types/deglob/tsconfig.json new file mode 100644 index 0000000000..1d3064583a --- /dev/null +++ b/types/deglob/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "deglob-tests.ts" + ] +} diff --git a/types/deglob/tslint.json b/types/deglob/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/deglob/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/deline/deline-tests.ts b/types/deline/deline-tests.ts new file mode 100644 index 0000000000..35f1696484 --- /dev/null +++ b/types/deline/deline-tests.ts @@ -0,0 +1,13 @@ +import * as dl from "deline"; + +const moduleName = "deline"; + +dl.deline(`deline`); // $ExpectType string +dl.deline(`module name: ${moduleName}`); // $ExpectType string +dl.deline`deline`; // $ExpectType string +dl.deline`tagged template: ${moduleName}`; // $ExpectType string +dl.deline` +tagged template: + +${moduleName} +`; diff --git a/types/deline/index.d.ts b/types/deline/index.d.ts new file mode 100644 index 0000000000..b65cd80d5e --- /dev/null +++ b/types/deline/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for deline 1.0 +// Project: https://github.com/airbnb/deline#readme +// Definitions by: Inaki Arroyo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function deline(strings: string | TemplateStringsArray, ...values: any[]): string; diff --git a/types/deline/tsconfig.json b/types/deline/tsconfig.json new file mode 100644 index 0000000000..ae8ad2e876 --- /dev/null +++ b/types/deline/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "deline-tests.ts" + ] +} diff --git a/types/deline/tslint.json b/types/deline/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/deline/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dependency-tree/dependency-tree-tests.ts b/types/dependency-tree/dependency-tree-tests.ts new file mode 100644 index 0000000000..67f8c3bb82 --- /dev/null +++ b/types/dependency-tree/dependency-tree-tests.ts @@ -0,0 +1,18 @@ +import dependencyTree = require('dependency-tree'); + +const tree = dependencyTree({ + filename: 'path/to/a/file', + directory: 'path/to/all/files', + requireConfig: 'path/to/requirejs/config', + webpackConfig: 'path/to/webpack/config', + nodeModulesConfig: { + entry: 'module' + }, + filter: path => path.indexOf('node_modules') === -1, + nonExistent: [] +}); + +const list = dependencyTree.toList({ + filename: 'path/to/a/file', + directory: 'path/to/all/files' +}); diff --git a/types/dependency-tree/index.d.ts b/types/dependency-tree/index.d.ts new file mode 100644 index 0000000000..be0a69676c --- /dev/null +++ b/types/dependency-tree/index.d.ts @@ -0,0 +1,29 @@ +// Type definitions for dependency-tree 6.1 +// Project: https://github.com/mrjoelkemp/node-dependency-tree +// Definitions by: Joscha Feth +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace dependencyTree { + interface DependencyObj { + [k: string]: DependencyObj; + } + + interface Options { + filename: string; + directory?: string; + requireConfig?: string; + webpackConfig?: string; + nodeModulesConfig?: any; + detective?: any; + visited?: DependencyObj; + filter?(path: string): boolean; + nonExistent?: string[]; + isListForm?: boolean; + } + + function toList(options: Options): string[]; +} + +declare function dependencyTree(options: dependencyTree.Options): dependencyTree.DependencyObj; + +export = dependencyTree; diff --git a/types/dependency-tree/tsconfig.json b/types/dependency-tree/tsconfig.json new file mode 100644 index 0000000000..5431546e97 --- /dev/null +++ b/types/dependency-tree/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dependency-tree-tests.ts" + ] +} diff --git a/types/dependency-tree/tslint.json b/types/dependency-tree/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dependency-tree/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dispatchr/addons/createStore.d.ts b/types/dispatchr/addons/createStore.d.ts index 86a1f24fbb..bf576156fc 100644 --- a/types/dispatchr/addons/createStore.d.ts +++ b/types/dispatchr/addons/createStore.d.ts @@ -1,7 +1,6 @@ import { StoreClass, Store } from '../index'; -type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; -type Omit = Pick>; +type Omit = Pick; interface StoreOptions { storeName: string; diff --git a/types/dom-to-image/index.d.ts b/types/dom-to-image/index.d.ts new file mode 100644 index 0000000000..b6e186f53b --- /dev/null +++ b/types/dom-to-image/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for dom-to-image 2.6 +// Project: https://github.com/tsayen/dom-to-image +// Definitions by: Jip Sterk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +export interface DomToImage { + toSvg(node: Node, options?: Options): Promise; + toPng(node: Node, options?: Options): Promise; + toJpeg(node: Node, options?: Options): Promise; + toBlob(node: Node, options?: Options): Promise; + toPixelData(node: Node, options?: Options): Promise; +} + +export interface Options { + filter?: (node: Node) => boolean; + bgcolor?: string; + width?: number; + height?: number; + style?: {}; + quality?: number; + imagePlaceholder?: string; + cachebust?: boolean; +} + +export const DomToImage: DomToImage; + +type DomToImage_ = DomToImage; +type Options_ = Options; + +export default DomToImage; + +declare global { + namespace DomToImage { + type Options = Options_; + type DomToImage = DomToImage_; + } + + const DomToImage: DomToImage.DomToImage; +} diff --git a/types/dom-to-image/test/dom-to-image-global-tests.ts b/types/dom-to-image/test/dom-to-image-global-tests.ts new file mode 100644 index 0000000000..a21be8bd01 --- /dev/null +++ b/types/dom-to-image/test/dom-to-image-global-tests.ts @@ -0,0 +1,38 @@ +const node = new Node(); + +const options: DomToImage.Options = { + filter, + bgcolor: '#24292e', + style: { + width: '100px' + }, + width: 100, + height: 100, + quality: 0.1, + imagePlaceholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAP', + cachebust: true +}; + +function filter(node: Node): boolean { + return true; +} + +async function testToSvg() { + const svg = await DomToImage.toSvg(node, { filter }); +} + +async function testToPng() { + const png = await DomToImage.toPng(node, { bgcolor: '#24292e', style: { width: '100px' } }); +} + +async function testToJpeg() { + const jpeg = await DomToImage.toJpeg(node, { width: 100, height: 100 }); +} + +async function testToBlob() { + const blob = await DomToImage.toBlob(node, { quality: 0.1, }); +} + +async function testToPixelData() { + const pixelData = await DomToImage.toPixelData(node, { imagePlaceholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAP', cachebust: true }); +} diff --git a/types/dom-to-image/test/dom-to-image-import-default-tests.ts b/types/dom-to-image/test/dom-to-image-import-default-tests.ts new file mode 100644 index 0000000000..0f300ffa38 --- /dev/null +++ b/types/dom-to-image/test/dom-to-image-import-default-tests.ts @@ -0,0 +1,40 @@ +import domToImage, { Options } from 'dom-to-image'; + +const node = new Node(); + +const options: Options = { + filter, + bgcolor: '#24292e', + style: { + width: '100px' + }, + width: 100, + height: 100, + quality: 0.1, + imagePlaceholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAP', + cachebust: true +}; + +function filter(node: Node): boolean { + return true; +} + +async function testToSvg() { + const svg = await domToImage.toSvg(node, { filter }); +} + +async function testToPng() { + const png = await domToImage.toPng(node, { bgcolor: '#24292e', style: { width: '100px' } }); +} + +async function testToJpeg() { + const jpeg = await domToImage.toJpeg(node, { width: 100, height: 100 }); +} + +async function testToBlob() { + const blob = await domToImage.toBlob(node, { quality: 0.1, }); +} + +async function testToPixelData() { + const pixelData = await domToImage.toPixelData(node, { imagePlaceholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAP', cachebust: true }); +} diff --git a/types/dom-to-image/test/dom-to-image-module-tests.ts b/types/dom-to-image/test/dom-to-image-module-tests.ts new file mode 100644 index 0000000000..571a28f5b6 --- /dev/null +++ b/types/dom-to-image/test/dom-to-image-module-tests.ts @@ -0,0 +1,40 @@ +import { Options, DomToImage } from 'dom-to-image'; + +const node = new Node(); + +const options: Options = { + filter, + bgcolor: '#24292e', + style: { + width: '100px' + }, + width: 100, + height: 100, + quality: 0.1, + imagePlaceholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAP', + cachebust: true +}; + +function filter(node: Node): boolean { + return true; +} + +async function testToSvg() { + const svg = await DomToImage.toSvg(node, { filter }); +} + +async function testToPng() { + const png = await DomToImage.toPng(node, { bgcolor: '#24292e', style: { width: '100px' } }); +} + +async function testToJpeg() { + const jpeg = await DomToImage.toJpeg(node, { width: 100, height: 100 }); +} + +async function testToBlob() { + const blob = await DomToImage.toBlob(node, { quality: 0.1, }); +} + +async function testToPixelData() { + const pixelData = await DomToImage.toPixelData(node, { imagePlaceholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAP', cachebust: true }); +} diff --git a/types/dom-to-image/tsconfig.json b/types/dom-to-image/tsconfig.json new file mode 100644 index 0000000000..10fc769913 --- /dev/null +++ b/types/dom-to-image/tsconfig.json @@ -0,0 +1,27 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/dom-to-image-module-tests.ts", + "test/dom-to-image-global-tests.ts", + "test/dom-to-image-import-default-tests.ts" + ] +} \ No newline at end of file diff --git a/types/dom-to-image/tslint.json b/types/dom-to-image/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/dom-to-image/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index e83de2b303..4064c9b8a0 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -610,6 +610,7 @@ declare namespace Draft { import DraftBlockType = Draft.Model.Constants.DraftBlockType; import DraftEntityMutability = Draft.Model.Constants.DraftEntityMutability; import DraftEntityType = Draft.Model.Constants.DraftEntityType; + import DraftEntityInstance = Draft.Model.Entity.DraftEntityInstance; import DraftDecoratorType = Draft.Model.Decorators.DraftDecoratorType; @@ -754,6 +755,8 @@ declare namespace Draft { getEntity(key: string): EntityInstance; getLastCreatedEntityKey(): string; mergeEntityData(key: string, toMerge: { [key: string]: any }): ContentState; + replaceEntityData(key: string, toMerge: { [key: string]: any }): ContentState; + addEntity(instance: DraftEntityInstance): ContentState; getBlockMap(): BlockMap; diff --git a/types/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts index e95fb94b2b..77332f6a6d 100644 --- a/types/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -8,7 +8,7 @@ /*! * filename: ej.web.all.d.ts -* version : 16.1.0.32 +* version : 16.1.0.37 * Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing @@ -7995,9 +7995,9 @@ declare namespace ej { */ footerTemplateId?: string; - /** This event is triggered before the dialog widgets gets open. + /** Triggered when the custom action button clicked. */ - beforeOpen?(e: BeforeOpenEventArgs): void; + actionButtonClick?(e: ActionButtonClickEventArgs): void; /** This event is triggered whenever the AJAX request fails to retrieve the dialog content. */ @@ -8007,6 +8007,10 @@ declare namespace ej { */ ajaxSuccess?(e: AjaxSuccessEventArgs): void; + /** This event is triggered before the dialog widgets gets open. + */ + beforeOpen?(e: BeforeOpenEventArgs): void; + /** This event is triggered before the dialog widgets get closed. */ beforeClose?(e: BeforeCloseEventArgs): void; @@ -8015,6 +8019,10 @@ declare namespace ej { */ close?(e: CloseEventArgs): void; + /** Triggered when the dialog content is collapsed. + */ + collapse?(e: CollapseEventArgs): void; + /** Triggered after the dialog content is loaded in DOM. */ contentLoad?(e: ContentLoadEventArgs): void; @@ -8039,6 +8047,10 @@ declare namespace ej { */ dragStop?(e: DragStopEventArgs): void; + /** Triggered when the dialog content is expanded. + */ + expand?(e: ExpandEventArgs): void; + /** Triggered after the dialog is opened. */ open?(e: OpenEventArgs): void; @@ -8054,33 +8066,33 @@ declare namespace ej { /** Triggered when the user stops resizing the dialog. */ resizeStop?(e: ResizeStopEventArgs): void; - - /** Triggered when the dialog content is expanded. - */ - expand?(e: ExpandEventArgs): void; - - /** Triggered when the dialog content is collapsed. - */ - collapse?(e: CollapseEventArgs): void; - - /** Triggered when the custom action button clicked. - */ - actionButtonClick?(e: ActionButtonClickEventArgs): void; } - export interface BeforeOpenEventArgs { + export interface ActionButtonClickEventArgs { /** Set this option to true to cancel the event. */ cancel?: boolean; + /** Name of the event target attribute. + */ + buttonID?: string; + + /** Name of the event. + */ + type?: string; + /** Instance of the dialog model object. */ model?: ej.Dialog.Model; - /** Name of the event + /** Name of the event current target title. */ - type?: string; + currentTarget?: string; + + /** Name of the event. + */ + event?: string; } export interface AjaxErrorEventArgs { @@ -8137,6 +8149,21 @@ declare namespace ej { data?: string; } + export interface BeforeOpenEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /** Name of the event + */ + type?: string; + } + export interface BeforeCloseEventArgs { /** Current event object. @@ -8154,6 +8181,10 @@ declare namespace ej { /** Name of the event. */ type?: string; + + /** returns true when the dialog activated by user interaction otherwise returns false + */ + isInteraction?: boolean; } export interface CloseEventArgs { @@ -8173,6 +8204,29 @@ declare namespace ej { /** Name of the event */ type?: string; + + /** returns true when the Dialog activated by user interaction otherwise returns false + */ + isInteraction?: boolean; + } + + export interface CollapseEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /** Name of the event. + */ + type?: string; + + /** returns true when the Dialog activated by user interaction otherwise returns false + */ + isInteraction?: boolean; } export interface ContentLoadEventArgs { @@ -8285,6 +8339,25 @@ declare namespace ej { event?: any; } + export interface ExpandEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /** Name of the event. + */ + type?: string; + + /** returns true when the Dialog activated by user interaction otherwise returns false + */ + isInteraction?: boolean; + } + export interface OpenEventArgs { /** Set this option to true to cancel the event. @@ -8357,59 +8430,6 @@ declare namespace ej { event?: any; } - export interface ExpandEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; - - /** Name of the event. - */ - type?: string; - } - - export interface CollapseEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; - - /** Name of the event. - */ - type?: string; - } - - export interface ActionButtonClickEventArgs { - - /** Set this option to true to cancel the event. - */ - cancel?: boolean; - - /** Name of the event target attribute. - */ - buttonID?: string; - - /** Name of the event. - */ - type?: string; - - /** Instance of the dialog model object. - */ - model?: ej.Dialog.Model; - - /** Name of the event current target title. - */ - currentTarget?: string; - } - export interface AjaxSettings { /** It specifies, whether to enable or disable asynchronous request. @@ -23206,9 +23226,10 @@ declare namespace ej { getCurrentViewData(): any[]; /** Get the data of given row index in grid. + * @param {number} Pass the index of the row to get the corresponding data * @returns {any} */ - getDataByIndex(): any; + getDataByIndex(rowIndex: number): any; /** Get the column field name from the given header text in grid. * @param {string} Pass header text of the column to get its corresponding field name @@ -35422,6 +35443,13 @@ declare namespace ej { */ filterColumn(fieldName: string, filterOperator: string, filterValue: string, predicate?: string, matchCase?: boolean): void; + /** To filter multiple columns with multiple conditions dynamically in Gantt. + * @param {Gantt.EjPredicate} Pass the filtering column details and conditions as ejPredicate instance. The ejPredicate object is defined as fieldName,filterOperator, filterValue and + * ignoreCase properties. + * @returns {void} + */ + filterContent(ejPredicate: Gantt.EjPredicate): void; + /** To hide the column by using header text * @param {string} you can pass a header text of a column to hide * @returns {void} @@ -35534,6 +35562,25 @@ declare namespace ej { } export namespace Gantt { + export interface EjPredicate { + + /** Pass the field name of the column. + */ + fieldName?: string; + + /** string/integer/date operator. + */ + filterOperator?: string; + + /** Pass the value to be filtered in a column. + */ + filterValue?: string; + + /** Optional - pass the ignore case value as true/false. + */ + ignoreCase?: boolean; + } + export interface Model { /** Specifies the fields to be included in the add dialog in Gantt @@ -38232,6 +38279,13 @@ declare namespace ej { */ filterColumn(fieldName: string, filterOperator: string, filterValue: string, predicate: string, matchcase: boolean, actualFilterValue: any): void; + /** To filter multiple columns with multiple conditions dynamically in TreeGrid. + * @param {TreeGrid.EjPredicate} Pass the filtering column details and conditions as ejPredicate instance. ejPredicate object is defined as fieldName,filterOperator, filterValue and + * ignoreCase properties + * @returns {void} + */ + filterContent(ejPredicate: TreeGrid.EjPredicate): void; + /** To change the index of the tree column in TreeGrid. * @param {number} Pass the column index to make the column as treeColumnIndex. * @returns {void} @@ -38275,6 +38329,25 @@ declare namespace ej { } export namespace TreeGrid { + export interface EjPredicate { + + /** Pass the field name of the column. + */ + fieldName?: string; + + /** string/integer/date operator. + */ + filterOperator?: string; + + /** Pass the value to be filtered in a column. + */ + filterValue?: string; + + /** Optional - pass the ignore case value as true/false. + */ + ignoreCase?: boolean; + } + export interface Model { /** Enables or disables the ability to resize the column width interactively. @@ -43129,6 +43202,14 @@ declare namespace ej { export interface XLFormat { + /** This method is used to add the custom Date & Time format and recognize it as a preferred pattern in spreadsheet. + * @param {string} Pass the name for custom format. + * @param {string} Pass the custom format string. + * @param {string} Pass the type for custom format. + * @returns {void} + */ + addCustomFormatSpecifier(name: string, formatSpecifier: string, type: string): void; + /** This method is used to add the font to the Ribbon font family dropdown. * @param {string} Font name which needs to add into the font family option. * @returns {void} diff --git a/types/elasticsearch/elasticsearch-tests.ts b/types/elasticsearch/elasticsearch-tests.ts index e21f84dc48..3236a181a1 100644 --- a/types/elasticsearch/elasticsearch-tests.ts +++ b/types/elasticsearch/elasticsearch-tests.ts @@ -1,10 +1,22 @@ import * as elasticsearch from "elasticsearch"; +import HttpConnector = require("elasticsearch/src/lib/connectors/http"); + +class MyHttpConnector extends HttpConnector { + constructor(host: any, config: any) { + super(host, config); + } +} let client = new elasticsearch.Client({ host: 'localhost:9200', log: 'trace' }); +client = new elasticsearch.Client({ + host: 'localhost:9200', + connectionClass: MyHttpConnector +}); + client = new elasticsearch.Client({ hosts: [ 'box1.server.org', diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index e60e8d86c3..7973b598ab 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -12,6 +12,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 +import HttpConnector = require("./src/lib/connectors/http"); + export class Client { constructor(params: ConfigOptions); cat: Cat; @@ -111,7 +113,7 @@ export interface ConfigOptions { keepAlive?: boolean; maxSockets?: number; suggestCompression?: boolean; - connectionClass?: string; + connectionClass?: string | typeof HttpConnector; sniffedNodesProtocol?: string; ssl?: object; selector?: any; diff --git a/types/elasticsearch/src/lib/connectors/http.d.ts b/types/elasticsearch/src/lib/connectors/http.d.ts new file mode 100644 index 0000000000..94d1e4e58c --- /dev/null +++ b/types/elasticsearch/src/lib/connectors/http.d.ts @@ -0,0 +1,13 @@ +// HttpConnector for elasticsearch + +export = HttpConnector; + +declare class HttpConnector { + constructor(host: any, config: any); + + // onStatusSet(handler: (status: any) => void): void; + createAgent(config: any): any; + makeAgentConfig(config: any): any; + makeReqParams(params: any): any; + request(params: any, callback: (error: any, response: any, status: any, headers: any) => void): void; +} diff --git a/types/ember-data/index.d.ts b/types/ember-data/index.d.ts index 5e4fa4eb60..b891bbe1d1 100644 --- a/types/ember-data/index.d.ts +++ b/types/ember-data/index.d.ts @@ -43,7 +43,7 @@ declare module 'ember-data' { isRelationship: true; } - namespace DS { + export namespace DS { /** * Convert an hash of errors into an array with errors in JSON-API format. */ @@ -52,25 +52,27 @@ declare module 'ember-data' { * Convert an array of errors in JSON-API format into an object. */ function errorsArrayToHash(errors: any[]): {}; + + interface RelationshipOptions { + async?: boolean; + inverse?: RelationshipsFor | null; + polymorphic?: boolean; + } + + interface Sync { async: false; } + interface Async { async?: true; } + /** * `DS.belongsTo` is used to define One-To-One and One-To-Many * relationships on a [DS.Model](/api/data/classes/DS.Model.html). */ function belongsTo( modelName: K, - options: { - async: false; - inverse?: string | null; - polymorphic?: boolean; - } + options: RelationshipOptions & Sync ): Ember.ComputedProperty; function belongsTo( modelName: K, - options?: { - async?: true; - inverse?: string | null; - polymorphic?: boolean; - } + options?: RelationshipOptions & Async ): Ember.ComputedProperty, ModelRegistry[K]>; /** * `DS.hasMany` is used to define One-To-Many and Many-To-Many @@ -78,19 +80,11 @@ declare module 'ember-data' { */ function hasMany( type: K, - options: { - async: false; - inverse?: string | null; - polymorphic?: boolean; - } + options: RelationshipOptions & Sync ): Ember.ComputedProperty>; function hasMany( type: K, - options?: { - async?: true; - inverse?: string | null; - polymorphic?: boolean; - } + options?: RelationshipOptions & Async ): Ember.ComputedProperty, Ember.Array>; /** * This method normalizes a modelName into the format Ember Data uses @@ -101,6 +95,7 @@ declare module 'ember-data' { interface AttrOptions { defaultValue?: T | (() => T); + allowNull?: boolean; // TODO: restrict to boolean transform (TS 2.8) } /** diff --git a/types/ember-data/test/model.ts b/types/ember-data/test/model.ts index 63bda2588e..2085daf90a 100644 --- a/types/ember-data/test/model.ts +++ b/types/ember-data/test/model.ts @@ -17,6 +17,7 @@ const User = DS.Model.extend({ username: DS.attr('string'), email: DS.attr('string'), verified: DS.attr('boolean', { defaultValue: false }), + canBeNull: DS.attr('boolean', { allowNull: true }), createdAt: DS.attr('date', { defaultValue() { return new Date(); } }) diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index 81d3bd69e6..a35ed40dec 100755 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -3461,7 +3461,7 @@ declare module '@ember/component/helper' { * }); * ``` */ - export function helper(helperFn: (params: any[], hash?: any) => string): any; + export function helper(helperFn: (params: any[], hash?: any) => any): any; } declare module '@ember/component/text-area' { diff --git a/types/ember/test/helper.ts b/types/ember/test/helper.ts index cba5709b10..2aa79a5ba1 100755 --- a/types/ember/test/helper.ts +++ b/types/ember/test/helper.ts @@ -33,3 +33,9 @@ function typedHelp(/*params, hash*/) { } export default helper(typedHelp); + +function arrayNumHelp(/*params, hash*/) { + return [1, 2, 3]; +} + +helper(arrayNumHelp); diff --git a/types/es6-shim/es6-shim-tests.ts b/types/es6-shim/es6-shim-tests.ts index 87f6fba0e5..7d7fdc6db2 100644 --- a/types/es6-shim/es6-shim-tests.ts +++ b/types/es6-shim/es6-shim-tests.ts @@ -17,7 +17,7 @@ let r: RegExp = /a/; let sym: symbol = {} as symbol; let e: Error = new Error(); let date: Date; -let key: PropertyKey; +let key: KeyOfProperty; let point: Point = { x: 1, y: 2 }; let point3d: Point3D = { x: 1, y: 2, z: 3 }; let point3dOrUndef: Point3D | undefined; @@ -25,7 +25,7 @@ let pointOrUndef: Point | undefined; let arrayOfPoint: Point[] = []; let arrayOfPoint3D: Point3D[]; let arrayOfSymbol: symbol[]; -let arrayOfPropertyKey: PropertyKey[]; +let arrayOfPropertyKey: KeyOfProperty[]; let arrayOfAny: any[]; let arrayOfStringAny: [string, any][]; let arrayLikeOfAny: ArrayLike = []; @@ -40,8 +40,8 @@ let iterableIteratorOfPointPoint: IterableIteratorShim<[Point, Point]>; let iterableIteratorOfNode: IterableIteratorShim; let iterableIteratorOfStringPoint: IterableIteratorShim<[string, Point]>; let iterableIteratorOfAny: IterableIteratorShim; -let iterableIteratorOfPropertyKey: IterableIteratorShim; -let iterableIteratorOfPropertyKeyPoint: IterableIteratorShim<[PropertyKey, Point]>; +let iterableIteratorOfPropertyKey: IterableIteratorShim; +let iterableIteratorOfPropertyKeyPoint: IterableIteratorShim<[KeyOfProperty, Point]>; let nodeList: NodeList; let pd: PropertyDescriptor = {}; let pdm: PropertyDescriptorMap = {}; diff --git a/types/es6-shim/index.d.ts b/types/es6-shim/index.d.ts index 2cf61a9362..e2c1a01f3d 100644 --- a/types/es6-shim/index.d.ts +++ b/types/es6-shim/index.d.ts @@ -4,7 +4,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -declare type PropertyKey = string | number | symbol; +// TODO: As of TypeScript@2.9 there is a global type PropertyKey that should be used instead of this. +declare type KeyOfProperty = string | number | symbol; interface IteratorResult { done: boolean; @@ -625,17 +626,17 @@ declare var WeakSet: WeakSetConstructor; declare namespace Reflect { function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; function construct(target: Function, argumentsList: ArrayLike): any; - function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - function deleteProperty(target: any, propertyKey: PropertyKey): boolean; + function defineProperty(target: any, propertyKey: KeyOfProperty, attributes: PropertyDescriptor): boolean; + function deleteProperty(target: any, propertyKey: KeyOfProperty): boolean; function enumerate(target: any): IterableIteratorShim; - function get(target: any, propertyKey: PropertyKey, receiver?: any): any; - function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; + function get(target: any, propertyKey: KeyOfProperty, receiver?: any): any; + function getOwnPropertyDescriptor(target: any, propertyKey: KeyOfProperty): PropertyDescriptor; function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: PropertyKey): boolean; + function has(target: any, propertyKey: KeyOfProperty): boolean; function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; + function ownKeys(target: any): Array; function preventExtensions(target: any): boolean; - function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; + function set(target: any, propertyKey: KeyOfProperty, value: any, receiver?: any): boolean; function setPrototypeOf(target: any, proto: any): boolean; } @@ -653,17 +654,17 @@ declare module "es6-shim" { namespace Reflect { function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; function construct(target: Function, argumentsList: ArrayLike): any; - function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - function deleteProperty(target: any, propertyKey: PropertyKey): boolean; + function defineProperty(target: any, propertyKey: KeyOfProperty, attributes: PropertyDescriptor): boolean; + function deleteProperty(target: any, propertyKey: KeyOfProperty): boolean; function enumerate(target: any): Iterator; - function get(target: any, propertyKey: PropertyKey, receiver?: any): any; - function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; + function get(target: any, propertyKey: KeyOfProperty, receiver?: any): any; + function getOwnPropertyDescriptor(target: any, propertyKey: KeyOfProperty): PropertyDescriptor; function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: PropertyKey): boolean; + function has(target: any, propertyKey: KeyOfProperty): boolean; function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; + function ownKeys(target: any): Array; function preventExtensions(target: any): boolean; - function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; + function set(target: any, propertyKey: KeyOfProperty, value: any, receiver?: any): boolean; function setPrototypeOf(target: any, proto: any): boolean; } } diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index 376cdf0a92..6a81d69c8a 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -336,6 +336,7 @@ rule = { onCodePathSegmentStart(segment, node) {}, onCodePathSegmentEnd(segment, node) {}, onCodePathSegmentLoop(fromSegment, toSegment, node) {}, + IfStatement(node) {}, 'Program:exit'() {}, }; }, @@ -456,6 +457,7 @@ cli = new CLIEngine({ globals: ['foo'] }); cli = new CLIEngine({ ignore: true }); cli = new CLIEngine({ ignorePath: 'foo' }); cli = new CLIEngine({ ignorePattern: 'foo' }); +cli = new CLIEngine({ ignorePattern: ['foo', 'bar'] }); cli = new CLIEngine({ useEslintrc: false }); cli = new CLIEngine({ parserOptions: {} }); cli = new CLIEngine({ plugins: ['foo'] }); diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index 9e0e68af0b..89067f97c8 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -2,6 +2,7 @@ // Project: https://eslint.org // Definitions by: Pierre-Marie Dartus // Jed Fox +// Saad Quadri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -240,7 +241,10 @@ export namespace Rule { meta?: RuleMetaData; } - interface RuleListener { + type NodeTypes = ESTree.Node['type']; + type NodeListener = { [T in NodeTypes]?: (node: ESTree.Node) => void }; + + interface RuleListener extends NodeListener { onCodePathStart?(codePath: CodePath, node: ESTree.Node): void; onCodePathEnd?(codePath: CodePath, node: ESTree.Node): void; @@ -491,7 +495,7 @@ export namespace CLIEngine { globals?: string[]; ignore?: boolean; ignorePath?: string; - ignorePattern?: string; + ignorePattern?: string | string[]; useEslintrc?: boolean; parser?: string; parserOptions?: Linter.ParserOptions; diff --git a/types/esprima/esprima-tests.ts b/types/esprima/esprima-tests.ts index 2032702979..08a3214a95 100644 --- a/types/esprima/esprima-tests.ts +++ b/types/esprima/esprima-tests.ts @@ -29,6 +29,7 @@ program = esprima.parseScript('answer = 42 // TODO: why', { comment: true, range // Tokenizing token = esprima.tokenize('code')[0]; token = esprima.tokenize('code', {range: true})[0]; +token = esprima.tokenize('/E\/\w*/.exec("e")', { tolerant: true })[0]; // Syntax Delegate esprima.parseScript('answer = 42', {}, (node) => { diff --git a/types/esprima/index.d.ts b/types/esprima/index.d.ts index 7817465742..cc612b12d1 100644 --- a/types/esprima/index.d.ts +++ b/types/esprima/index.d.ts @@ -30,6 +30,7 @@ export interface ParseOptions { } export interface TokenizeOptions { + tolerant?: boolean; range?: boolean; loc?: boolean; comment?: boolean; diff --git a/types/evaporate/evaporate-tests.ts b/types/evaporate/evaporate-tests.ts index ea4a4ac9bf..3140cd9ea9 100644 --- a/types/evaporate/evaporate-tests.ts +++ b/types/evaporate/evaporate-tests.ts @@ -1,7 +1,27 @@ -import Evaporate = require("evaporate"); +import Evaporate = require('evaporate'); -function test_upload() { - var evaporate = new Evaporate({}); - var uploadId = evaporate.add({}); - evaporate.cancel(uploadId); -} +const newEvaporate = new Evaporate({ + bucket: 'abc', +}); + +Evaporate.create({ + bucket: 'abc', +}) + .then((evaporate) => { + evaporate.add({ + name: 'gwejlf', + file: new File(['abcd'], 'efg'), + started: (file_key) => { + evaporate.pause(file_key); + }, + paused: (file_key) => { + evaporate.resume(file_key); + }, + resumed: (file_key) => { + evaporate.cancel(file_key); + } + }) + .then((awsS3ObjectKey) => { + console.log(awsS3ObjectKey + '!!!'); + }); + }); diff --git a/types/evaporate/index.d.ts b/types/evaporate/index.d.ts index bf4b52aae3..1c415769b8 100644 --- a/types/evaporate/index.d.ts +++ b/types/evaporate/index.d.ts @@ -1,12 +1,112 @@ -// Type definitions for EvaporateJS +// Type definitions for EvaporateJS 2.1 // Project: https://github.com/TTLabs/EvaporateJS -// Definitions by: Andrew Kuklewicz , Chris Rhoden +// Definitions by: Andrew Kuklewicz +// Chris Rhoden +// Junyoung Clare Jang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 export = Evaporate; declare class Evaporate { - cancel(id:string): boolean; - constructor(config:any); - add(config:any): string; + constructor(config: Evaporate.CreateConfig); + supported: boolean; + add(config: Evaporate.AddConfig, options?: Evaporate.AddOverrideOptions): Promise; + pause(file_key?: string, options?: object): Promise; + resume(file_key?: string): Promise; + cancel(file_key?: string): Promise; +} + +declare namespace Evaporate { + function create(config: CreateConfig): Promise; + + interface CreateConfig { + readableStreams?: boolean; + readableStreamPartMethod?: null | ((file: File, start: number, end: number) => ReadableStream); + bucket: string; + logging?: boolean; + maxConcurrentParts?: number; + partSize?: number; + retryBackoffPower?: number; + maxRetryBackoffSecs?: number; + progressIntervalMS?: number; + cloudfront?: boolean; + s3Acceleration?: boolean; + mockLocalStorage?: boolean; + encodeFilename?: boolean; + computeContentMd5?: false; + allowS3ExistenceOptimization?: boolean; + onlyRetryForSameFileName?: boolean; + timeUrl?: string; + cryptoMd5Method?: null | ((data: ArrayBuffer) => string); + cryptoHexEncodedHash256?: null | ((data: ArrayBuffer) => string); + aws_url?: string; + aws_key?: string; + awsRegion?: string; + awsSignatureVersion?: '2' | '4'; + signerUrl?: string; + sendCanonicalRequestToSignerUrl?: boolean; + s3FileCacheHoursAgo?: null | number; + signParams?: object; + signHeaders?: object; + customAuthMethod?: null | (( + signParams: string, + signHeaders: string, + stringToSign: () => string | undefined, + signatureDateTime: string, + canonicalRequest: string + ) => Promise); + maxFileSize?: number; + signResponseHandler?: null | ((response: any, stringToSign: string, signatureDateTime: string) => Promise); + xhrWithCredentials?: boolean; + localTimeOffset?: number; + evaporateChanged?: (evaporate: Evaporate, evaporatingCount: number) => void; + abortCompletionThrottlingMs?: number; + } + + interface TransferStats { + speed: number; + readableSpeed: string; + loaded: number; + totalUploaded: number; + remainingSize: number; + secondsLeft: number; + fileSize: number; + } + + interface AddConfig { + name: string; + file: File; + xAmzHeadersAtInitiate?: { [key: string]: string }; + notSignedHeadersAtInitiate?: { [key: string]: string }; + xAmzHeadersAtUpload?: { [key: string]: string }; + xAmzHeadersAtComplete?: { [key: string]: string }; + xAmzHeadersCommon?: { [key: string]: string }; + started?: (file_key: string) => void; + uploadInitiated?: (s3UploadId?: string) => void; + paused?: (file_key: string) => void; + resumed?: (file_key: string) => void; + pausing?: (file_key: string) => void; + cancelled?: () => void; + complete?: (xhr: XMLHttpRequest, awsObjectKey: string, stats: TransferStats) => void; + nameChanged?: (awsObjectKey: string) => void; + info?: (msg: string) => void; + warn?: (msg: string) => void; + error?: (msg: string) => void; + progress?: (p: number, stats: TransferStats) => void; + contentType?: string; + beforeSigner?: (xhr: XMLHttpRequest, url: string) => void; + } + + type ImmutableOptionKeys = + | 'maxConcurrentParts' | 'logging' | 'cloudfront' | 'encodeFilename' + | 'computeContentMd5' | 'allowS3ExistenceOptimization' | 'onlyRetryForSameFileName' + | 'timeUrl' | 'cryptoMd5Method' | 'cryptoHexEncodedHash256' | 'awsRegion' | 'awsSignatureVersion' + | 'evaporateChanged'; + type AddOverrideOptionKeys = Exclude; + interface AddOverrideOptions extends Pick {} + + interface PauseConfig { + force?: boolean; + } } diff --git a/types/evaporate/tsconfig.json b/types/evaporate/tsconfig.json index 9164730455..c932b3ca2f 100644 --- a/types/evaporate/tsconfig.json +++ b/types/evaporate/tsconfig.json @@ -1,23 +1,24 @@ { "compilerOptions": { - "module": "commonjs", + "baseUrl": "../", + "forceConsistentCasingInFileNames": true, "lib": [ - "es6" + "es6", + "dom" ], + "module": "commonjs", + "noEmit": true, "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, - "baseUrl": "../", "typeRoots": [ "../" ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true + "types": [] }, "files": [ "index.d.ts", "evaporate-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/evaporate/tslint.json b/types/evaporate/tslint.json index a41bf5d19a..f93cf8562a 100644 --- a/types/evaporate/tslint.json +++ b/types/evaporate/tslint.json @@ -1,79 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "extends": "dtslint/dt.json" } diff --git a/types/event-stream/index.d.ts b/types/event-stream/index.d.ts index f7b10b34a2..35fb2c8b4c 100644 --- a/types/event-stream/index.d.ts +++ b/types/event-stream/index.d.ts @@ -36,7 +36,7 @@ export declare function mapSync(syncFunction: Function): MapStream; * * @param matcher */ -export declare function split(matcher: string | RegExp): MapStream; +export declare function split(matcher?: string | RegExp): MapStream; /** * Create a through stream that emits separator between each chunk, just like Array#join diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index d1b543c591..fd0d7ad973 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -3,6 +3,10 @@ import { Text } from 'react-native'; import { Accelerometer, + AdMobAppEvent, + AdMobBanner, + AdMobInterstitial, + AdMobRewarded, Amplitude, Asset, AuthSession, @@ -26,13 +30,21 @@ import { KeepAwake, LinearGradient, Permissions, + PublisherBanner, registerRootComponent, ScreenOrientation, SQLite, Calendar, - MailComposer + MailComposer, + Location, + Updates } from 'expo'; +const reverseGeocode: Promise = Location.reverseGeocodeAsync({ + latitude: 0, + longitude: 0 +}); + Accelerometer.addListener((obj) => { obj.x; obj.y; @@ -41,6 +53,41 @@ Accelerometer.addListener((obj) => { Accelerometer.removeAllListeners(); Accelerometer.setUpdateInterval(1000); +() => ( + console.log(error)} + style={{ flex: 1 }} + /> +); + +() => ( + console.log(error)} + onAdMobDispatchAppEvent={(event: AdMobAppEvent) => console.log(event)} + style={{ flex: 1 }} + /> +); + +AdMobInterstitial.setAdUnitID('ca-app-pub-3940256099942544/1033173712'); // Test ID, Replace with your-admob-unit-id +AdMobInterstitial.setTestDeviceID('EMULATOR'); +async () => { + await AdMobInterstitial.requestAdAsync(); + await AdMobInterstitial.showAdAsync(); +}; + +AdMobRewarded.setAdUnitID('ca-app-pub-3940256099942544/1033173712'); // Test ID, Replace with your-admob-unit-id +AdMobRewarded.setTestDeviceID('EMULATOR'); +async () => { + await AdMobRewarded.requestAdAsync(); + await AdMobRewarded.showAdAsync(); +}; + Amplitude.initialize('key'); Amplitude.setUserId('userId'); Amplitude.setUserProperties({key: 1}); @@ -554,6 +601,8 @@ Permissions.CONTACTS === 'contacts'; Permissions.NOTIFICATIONS === 'remoteNotifications'; Permissions.REMOTE_NOTIFICATIONS === 'remoteNotifications'; Permissions.SYSTEM_BRIGHTNESS === 'systemBrightness'; +Permissions.USER_FACING_NOTIFICATIONS === 'userFacingNotifications'; +Permissions.REMINDERS === 'reminders'; async () => { const result = await Permissions.askAsync(Permissions.CAMERA); @@ -696,3 +745,36 @@ async () => { result.status === 'saved'; }; + +async () => { + const updateEventListener: Updates.UpdateEventListener = ({ type, manifest, message }) => { + switch (type) { + case Updates.EventType.DOWNLOAD_STARTED: + case Updates.EventType.DOWNLOAD_PROGRESS: + case Updates.EventType.DOWNLOAD_FINISHED: + case Updates.EventType.NO_UPDATE_AVAILABLE: + case Updates.EventType.ERROR: + return true; + } + }; + + Updates.reload(); + + Updates.reloadFromCache(); + + Updates.addListener(updateEventListener); + + const updateCheckResult = await Updates.checkForUpdateAsync(); + + if (updateCheckResult.isAvailable) { + console.log(updateCheckResult.manifest); + } + + Updates.fetchUpdateAsync(updateEventListener); + + const bundleFetchResult = await Updates.fetchUpdateAsync(); + + if (bundleFetchResult.isNew) { + console.log(bundleFetchResult.manifest); + } +}; diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 8e35cb8631..f51d2d13b6 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for expo 25.0 +// Type definitions for expo 26.0 // Project: https://github.com/expo/expo-sdk // Definitions by: Konstantin Kai // Martynas Kadiša @@ -16,9 +16,10 @@ import { ImageRequireSource, ImageURISource, NativeEventEmitter, - ViewProperties, + ViewProps, ViewStyle, - Permission + Permission, + StyleProp } from 'react-native'; export type Axis = number; @@ -59,6 +60,82 @@ export namespace Accelerometer { function setUpdateInterval(intervalMs: number): void; } +/** + * Admob + */ +export type AdMobBannerSize = + | 'banner' + | 'largeBanner' + | 'mediumRectangle' + | 'fullBanner' + | 'leaderboard' + | 'smartBannerPortrait' + | 'smartBannerLandscape'; +export interface AdMobBannerProperties extends ViewProps { + bannerSize?: AdMobBannerSize; + adUnitID?: string; + testDeviceID?: string; + didFailToReceiveAdWithError?(errorDescription: string): void; + adViewDidReceiveAd?(): void; + adViewWillPresentScreen?(): void; + adViewWillDismissScreen?(): void; + adViewDidDismissScreen?(): void; + adViewWillLeaveApplication?(): void; +} + +export class AdMobBanner extends Component { } +export interface AdMobAppEvent { + name: string; + info: string; +} +export interface PublisherBannerProperties extends AdMobBannerProperties { + onAdMobDispatchAppEvent?(event: AdMobAppEvent): void; +} +export class PublisherBanner extends Component { } + +export type AdMobInterstitialEmptyEvent = + | 'interstitialDidLoad' + | 'interstitialDidOpen' + | 'interstitialDidClose' + | 'interstitialWillLeaveApplication'; +export type AdMobInterstitialEvent = AdMobInterstitialEmptyEvent | 'interstitialDidFailToLoad'; +export namespace AdMobInterstitial { + function setAdUnitID(id: string): void; + function setTestDeviceID(id: string): void; + function requestAdAsync(): Promise; + function showAdAsync(): Promise; + function dismissAdAsync(): Promise; + function getIsReadyAsync(): Promise; + function addEventListener(event: 'interstitialDidFailToLoad', handler: (error: string) => void): void; + function addEventListener(event: AdMobInterstitialEmptyEvent, handler: () => void): void; + function removeEventListener(event: 'interstitialDidFailToLoad', handler: (error: string) => void): void; + function removeEventListener(event: AdMobInterstitialEmptyEvent, handler: () => void): void; + function removeAllListeners(): void; +} + +export type AdMobRewardedEmptyEvent = + | 'rewardedVideoDidLoad' + | 'rewardedVideoDidOpen' + | 'rewardedVideoDidStart' + | 'rewardedVideoDidClose' + | 'rewardedVideoWillLeaveApplication'; +export type AdMobRewardedEvent = AdMobRewardedEmptyEvent | 'rewardedVideoDidRewardUser' | 'rewardedVideoDidFailToLoad'; +export namespace AdMobRewarded { + function setAdUnitID(id: string): void; + function setTestDeviceID(id: string): void; + function requestAdAsync(): Promise; + function showAdAsync(): Promise; + function dismissAdAsync(): Promise; + function getIsReadyAsync(): Promise; + function addEventListener(event: 'rewardedVideoDidRewardUser', handler: (type: string, amount: number) => void): void; + function addEventListener(event: 'rewardedVideoDidFailToLoad', handler: (error: string) => void): void; + function addEventListener(event: AdMobRewardedEmptyEvent, handler: () => void): void; + function removeEventListener(event: 'rewardedVideoDidRewardUser', handler: (type: string, amount: number) => void): void; + function removeEventListener(event: 'rewardedVideoDidFailToLoad', handler: (error: string) => void): void; + function removeEventListener(event: AdMobRewardedEmptyEvent, handler: () => void): void; + function removeAllListeners(): void; +} + /** * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. * @@ -623,7 +700,7 @@ export class PlaybackObject { /** * BarCodeScanner */ -export interface BarCodeScannerProps extends ViewProperties { +export interface BarCodeScannerProps extends ViewProps { type?: 'front' | 'back'; torchMode?: 'on' | 'off'; barCodeTypes?: string[]; @@ -644,7 +721,7 @@ export class BarCodeScanner extends Component { /** * BlurView */ -export interface BlurViewProps extends ViewProperties { +export interface BlurViewProps extends ViewProps { tint: 'light' | 'default' | 'dark'; intensity: number; } @@ -690,7 +767,7 @@ export class CameraObject { getSupportedRatiosAsync(): Promise; // Android only } -export interface CameraProps extends ViewProperties { +export interface CameraProps extends ViewProps { zoom?: FloatFromZeroToOne; ratio?: string; focusDepth?: FloatFromZeroToOne; @@ -1315,7 +1392,7 @@ export namespace Font { /** * GLView */ -export interface GLViewProps extends ViewProperties { +export interface GLViewProps extends ViewProps { onContextCreate(): void; msaaSamples: number; } @@ -1554,11 +1631,12 @@ export class KeepAwake extends Component { /** * LinearGradient */ -export interface LinearGradientProps extends ViewProperties { +export interface LinearGradientProps { colors: string[]; start?: [number, number]; end?: [number, number]; locations?: number[]; + style?: StyleProp; } export class LinearGradient extends Component { } @@ -1622,7 +1700,7 @@ export namespace Location { function getHeadingAsync(): Promise; function watchHeadingAsync(callback: (status: HeadingStatus) => void): EventSubscription; function geocodeAsync(address: string): Promise; - function reverseGeocodeAsync(location: LocationProps): Promise; + function reverseGeocodeAsync(location: LocationProps): Promise; function setApiKey(key: string): void; } @@ -1700,8 +1778,9 @@ export namespace Pedometer { * Permissions */ export namespace Permissions { - type PermissionType = 'remoteNotifications' | 'location' | - 'camera' | 'contacts' | 'audioRecording' | 'calendar'; + type PermissionType = 'audioRecording' | 'calendar' | + 'cameraRoll' | 'camera' | 'contacts' | 'location' | 'reminders' | + 'remoteNotifications' | 'systemBrightness' | 'userFacingNotifications'; type PermissionStatus = 'undetermined' | 'granted' | 'denied'; type PermissionExpires = 'never'; @@ -1725,15 +1804,17 @@ export namespace Permissions { type RemoteNotificationPermission = 'remoteNotifications'; - const CAMERA: 'camera'; - const CAMERA_ROLL: 'cameraRoll'; const AUDIO_RECORDING: 'audioRecording'; - const LOCATION: 'location'; - const REMOTE_NOTIFICATIONS: RemoteNotificationPermission; - const NOTIFICATIONS: RemoteNotificationPermission; - const CONTACTS: 'contacts'; - const SYSTEM_BRIGHTNESS: 'systemBrightness'; const CALENDAR: 'calendar'; + const CAMERA_ROLL: 'cameraRoll'; + const CAMERA: 'camera'; + const CONTACTS: 'contacts'; + const LOCATION: 'location'; + const NOTIFICATIONS: RemoteNotificationPermission; + const REMINDERS = 'reminders'; + const REMOTE_NOTIFICATIONS: RemoteNotificationPermission; + const SYSTEM_BRIGHTNESS: 'systemBrightness'; + const USER_FACING_NOTIFICATIONS = 'userFacingNotifications'; } /** @@ -1874,6 +1955,7 @@ export interface SvgCommonProps { fill?: string; fillOpacity?: number | string; fillRule?: 'nonzero' | 'evenodd'; + opacity?: number | string; stroke?: string; strokeWidth?: number | string; strokeOpacity?: number | string; @@ -1984,7 +2066,7 @@ export interface SvgStopProps extends SvgCommonProps { stopOpacity?: string; } -export class Svg extends Component<{ width: number, height: number }> { +export class Svg extends Component<{ width: number, height: number, viewBox?: string }> { static Circle: ComponentClass; static ClipPath: ComponentClass; static Defs: ComponentClass; @@ -2682,3 +2764,91 @@ export namespace MailComposer { ): Promise<{ status: 'sent' | 'saved' | 'cancelled' }>; } // #endregion + +export namespace Updates { + namespace EventType { + /** A new update is available and has started downloading. */ + type DownloadStart = 'downloadStart'; + /** A new update is currently being downloaded and will be stored in the device's cache. */ + type DownloadProgress = 'downloadProgress'; + /** A new update has finished downloading and is now stored in the device's cache. */ + type DownloadFinished = 'downloadFinished'; + /** No updates are available, and the most up-to-date bundle of this experience is already running. */ + type NoUpdateAvailable = 'noUpdateAvailable'; + /** An error occurred trying to fetch the latest update. */ + type Error = 'error'; + + /** A new update is available and has started downloading. */ + const DOWNLOAD_STARTED: DownloadStart; + /** A new update is currently being downloaded and will be stored in the device's cache. */ + const DOWNLOAD_PROGRESS: DownloadProgress; + /** A new update has finished downloading and is now stored in the device's cache. */ + const DOWNLOAD_FINISHED: DownloadFinished; + /** No updates are available, and the most up-to-date bundle of this experience is already running. */ + const NO_UPDATE_AVAILABLE: NoUpdateAvailable; + /** An error occurred trying to fetch the latest update. */ + const ERROR: Error; + } + + interface UpdateCheck { + /** True if an update is available, false if you're already running the most up-to-date JS bundle. */ + isAvailable: boolean; + /** If `isAvailable` is true, the manifest of the available update. Undefined otherwise. */ + manifest?: Constants.Manifest; + } + + interface UpdateBundle { + /** True if the fetched bundle is new (i.e. a different version that the what's currently running). */ + isNew: boolean; + /** Manifest of the fetched update. */ + manifest: Constants.Manifest; + } + + /** An object that is passed into each event listener when a new version is available. */ + interface UpdateEvent { + /** Type of the event */ + type: EventType.DownloadStart + | EventType.DownloadProgress + | EventType.DownloadFinished + | EventType.NoUpdateAvailable + | EventType.Error; + /** If `type === Expo.Updates.EventType.DOWNLOAD_FINISHED`, the manifest of the newly downloaded update. Undefined otherwise. */ + manifest?: Constants.Manifest; + /** If `type === Expo.Updates.EventType.ERROR`, the error message. Undefined otherwise. */ + message?: string; + } + + type UpdateEventListener = (event: UpdateEvent) => any; + + /** + * Invokes a callback when updates-related events occur, + * either on the initial app load or as a result of a call to `Expo.Updates.fetchUpdateAsync`. + */ + function addListener(listener: UpdateEventListener): EventSubscription; + + /** + * Check if a new published version of your project is available. + * Does not actually download the update. + * Rejects if `updates.enabled` is `false` in app.json. + */ + function checkForUpdateAsync(): Promise; + + /** + * Downloads the most recent published version of your experience to the device's local cache. + * Rejects if `updates.enabled` is `false` in app.json. + */ + function fetchUpdateAsync(listener?: UpdateEventListener): Promise; + + /** + * Immediately reloads the current experience. + * This will use your app.json updates configuration to fetch and load the newest available JS supported by the device's Expo environment. + * This is useful for triggering an update of your experience if you have published a new version. + */ + function reload(): void; + + /** + * Immediately reloads the current experience using the most recent cached version. + * This is useful for triggering an update of your experience if you have published and already downloaded a new version. + */ + function reloadFromCache(): void; +} diff --git a/types/expo/v23/expo-tests.tsx b/types/expo/v23/expo-tests.tsx index 51b3f30d39..c076bbbce1 100644 --- a/types/expo/v23/expo-tests.tsx +++ b/types/expo/v23/expo-tests.tsx @@ -2,6 +2,10 @@ import * as React from 'react'; import { Accelerometer, + AdMobAppEvent, + AdMobBanner, + AdMobInterstitial, + AdMobRewarded, Amplitude, Asset, AuthSession, @@ -16,7 +20,8 @@ import { Facebook, FacebookAds, FileSystem, - ImagePicker + ImagePicker, + PublisherBanner } from 'expo'; Accelerometer.addListener((obj) => { @@ -27,6 +32,35 @@ Accelerometer.addListener((obj) => { Accelerometer.removeAllListeners(); Accelerometer.setUpdateInterval(1000); +() => ( + console.log(error)} + style={{ flex: 1 }} + /> +); + +() => ( + console.log(error)} + admobDispatchAppEvent={(event: AdMobAppEvent) => console.log(event)} + style={{ flex: 1 }} + /> +); + +AdMobInterstitial.setAdUnitID('ca-app-pub-3940256099942544/1033173712'); // Test ID, Replace with your-admob-unit-id +AdMobInterstitial.setTestDeviceID('EMULATOR'); +AdMobInterstitial.requestAd(() => AdMobInterstitial.showAd()); + +AdMobRewarded.setAdUnitID('ca-app-pub-3940256099942544/1033173712'); // Test ID, Replace with your-admob-unit-id +AdMobRewarded.setTestDeviceID('EMULATOR'); +AdMobRewarded.requestAd(() => AdMobRewarded.showAd()); + Amplitude.initialize('key'); Amplitude.setUserId('userId'); Amplitude.setUserProperties({key: 1}); diff --git a/types/expo/v23/index.d.ts b/types/expo/v23/index.d.ts index 78de7bf415..4c33d8b13f 100644 --- a/types/expo/v23/index.d.ts +++ b/types/expo/v23/index.d.ts @@ -8,7 +8,7 @@ import { EventSubscription } from 'fbemitter'; import { Component, Ref } from 'react'; import { ViewStyle, - ViewProperties, + ViewProps, ColorPropType, ImageURISource, NativeEventEmitter, @@ -42,6 +42,79 @@ export namespace Accelerometer { function setUpdateInterval(intervalMs: number): void; } +/** + * Admob + */ +export type AdMobBannerSize = + | 'banner' + | 'largeBanner' + | 'mediumRectangle' + | 'fullBanner' + | 'leaderboard' + | 'smartBannerPortrait' + | 'smartBannerLandscape'; +export interface AdMobBannerProperties extends ViewProps { + bannerSize?: AdMobBannerSize; + adUnitID?: string; + testDeviceID?: string; + didFailToReceiveAdWithError?(errorDescription: string): void; + adViewDidReceiveAd?(): void; + adViewWillPresentScreen?(): void; + adViewWillDismissScreen?(): void; + adViewDidDismissScreen?(): void; + adViewWillLeaveApplication?(): void; +} + +export class AdMobBanner extends Component { } + +export interface AdMobAppEvent { + name: string; + info: string; +} +export interface PublisherBannerProperties extends AdMobBannerProperties { + admobDispatchAppEvent?(event: AdMobAppEvent): void; +} +export class PublisherBanner extends Component { } + +export type AdMobInterstitialEmptyEvent = + | 'interstitialDidLoad' + | 'interstitialDidOpen' + | 'interstitialDidClose' + | 'interstitialWillLeaveApplication'; +export type AdMobInterstitialEvent = AdMobInterstitialEmptyEvent | 'interstitialVideoDidFailToLoad'; +export namespace AdMobInterstitial { + function setAdUnitID(id: string): void; + function setTestDeviceID(id: string): void; + function requestAd(callback?: () => void): void; + function showAd(callback?: (error: string) => void): void; + function isReady(callback: (isReady: boolean) => void): void; + function addEventListener(event: 'interstitialDidFailToLoad', handler: (error: string) => void): void; + function addEventListener(event: AdMobInterstitialEmptyEvent, handler: () => void): void; + function removeEventListener(event: 'interstitialDidFailToLoad', handler: (error: string) => void): void; + function removeEventListener(event: AdMobInterstitialEmptyEvent, handler: () => void): void; + function removeAllListeners(): void; +} + +export type AdMobRewardedEmptyEvent = + | 'rewardedVideoDidLoad' + | 'rewardedVideoDidOpen' + | 'rewardedVideoDidClose' + | 'rewardedVideoWillLeaveApplication'; +export type AdMobRewardedEvent = AdMobRewardedEmptyEvent | 'rewardedVideoDidRewardUser' | 'rewardedVideoDidFailToLoad'; +export namespace AdMobRewarded { + function setAdUnitID(id: string): void; + function setTestDeviceID(id: string): void; + function requestAd(callback?: () => void): void; + function showAd(callback?: (error: string) => void): void; + function addEventListener(event: 'rewardedVideoDidRewardUser', handler: (type: string, amount: number) => void): void; + function addEventListener(event: 'rewardedVideoDidFailToLoad', handler: (error: string) => void): void; + function addEventListener(event: AdMobRewardedEmptyEvent, handler: () => void): void; + function removeEventListener(event: 'rewardedVideoDidRewardUser', handler: (type: string, amount: number) => void): void; + function removeEventListener(event: 'rewardedVideoDidFailToLoad', handler: (error: string) => void): void; + function removeEventListener(event: AdMobRewardedEmptyEvent, handler: () => void): void; + function removeAllListeners(): void; +} + /** * Amplitude */ @@ -341,7 +414,7 @@ export class AppLoading extends Component { } /** * BarCodeScanner */ -export interface BarCodeScannerProps extends ViewProperties { +export interface BarCodeScannerProps extends ViewProps { type?: 'front' | 'back'; torchMode?: 'on' | 'off'; barCodeTypes?: string[]; @@ -353,7 +426,7 @@ export class BarCodeScanner extends Component { } /** * BlurView */ -export interface BlurViewProps extends ViewProperties { +export interface BlurViewProps extends ViewProps { tint: 'light' | 'default' | 'dark'; intensity: number; } @@ -396,7 +469,7 @@ export class CameraObject { stopRecording(): void; getSupportedRatiosAsync(): Promise; // Android only } -export interface CameraProperties extends ViewProperties { +export interface CameraProperties extends ViewProps { flashMode?: string | number; type?: string | number; ratio?: string; @@ -896,7 +969,7 @@ export namespace Font { /** * GLView */ -export interface GLViewProps extends ViewProperties { +export interface GLViewProps extends ViewProps { onContextCreate(): void; msaaSamples: number; } diff --git a/types/expo/v24/expo-tests.tsx b/types/expo/v24/expo-tests.tsx index 8749a5993c..308e2de089 100644 --- a/types/expo/v24/expo-tests.tsx +++ b/types/expo/v24/expo-tests.tsx @@ -3,6 +3,10 @@ import { Text } from 'react-native'; import { Accelerometer, + AdMobAppEvent, + AdMobBanner, + AdMobInterstitial, + AdMobRewarded, Amplitude, Asset, AuthSession, @@ -26,6 +30,7 @@ import { KeepAwake, LinearGradient, Permissions, + PublisherBanner, registerRootComponent, ScreenOrientation } from 'expo'; @@ -38,6 +43,35 @@ Accelerometer.addListener((obj) => { Accelerometer.removeAllListeners(); Accelerometer.setUpdateInterval(1000); +() => ( + console.log(error)} + style={{ flex: 1 }} + /> +); + +() => ( + console.log(error)} + admobDispatchAppEvent={(event: AdMobAppEvent) => console.log(event)} + style={{ flex: 1 }} + /> +); + +AdMobInterstitial.setAdUnitID('ca-app-pub-3940256099942544/1033173712'); // Test ID, Replace with your-admob-unit-id +AdMobInterstitial.setTestDeviceID('EMULATOR'); +AdMobInterstitial.requestAd(() => AdMobInterstitial.showAd()); + +AdMobRewarded.setAdUnitID('ca-app-pub-3940256099942544/1033173712'); // Test ID, Replace with your-admob-unit-id +AdMobRewarded.setTestDeviceID('EMULATOR'); +AdMobRewarded.requestAd(() => AdMobRewarded.showAd()); + Amplitude.initialize('key'); Amplitude.setUserId('userId'); Amplitude.setUserProperties({key: 1}); diff --git a/types/expo/v24/index.d.ts b/types/expo/v24/index.d.ts index 829e9730a7..803ecccf32 100644 --- a/types/expo/v24/index.d.ts +++ b/types/expo/v24/index.d.ts @@ -15,9 +15,10 @@ import { ImageRequireSource, ImageURISource, NativeEventEmitter, - ViewProperties, + ViewProps, ViewStyle, - Permission + Permission, + StyleProp } from 'react-native'; export type Axis = number; @@ -58,6 +59,79 @@ export namespace Accelerometer { function setUpdateInterval(intervalMs: number): void; } +/** + * Admob + */ +export type AdMobBannerSize = + | 'banner' + | 'largeBanner' + | 'mediumRectangle' + | 'fullBanner' + | 'leaderboard' + | 'smartBannerPortrait' + | 'smartBannerLandscape'; +export interface AdMobBannerProperties extends ViewProps { + bannerSize?: AdMobBannerSize; + adUnitID?: string; + testDeviceID?: string; + didFailToReceiveAdWithError?(errorDescription: string): void; + adViewDidReceiveAd?(): void; + adViewWillPresentScreen?(): void; + adViewWillDismissScreen?(): void; + adViewDidDismissScreen?(): void; + adViewWillLeaveApplication?(): void; +} + +export class AdMobBanner extends Component { } + +export interface AdMobAppEvent { + name: string; + info: string; +} +export interface PublisherBannerProperties extends AdMobBannerProperties { + admobDispatchAppEvent?(event: AdMobAppEvent): void; +} +export class PublisherBanner extends Component { } + +export type AdMobInterstitialEmptyEvent = + | 'interstitialDidLoad' + | 'interstitialDidOpen' + | 'interstitialDidClose' + | 'interstitialWillLeaveApplication'; +export type AdMobInterstitialEvent = AdMobInterstitialEmptyEvent | 'interstitialVideoDidFailToLoad'; +export namespace AdMobInterstitial { + function setAdUnitID(id: string): void; + function setTestDeviceID(id: string): void; + function requestAd(callback?: () => void): void; + function showAd(callback?: (error: string) => void): void; + function isReady(callback: (isReady: boolean) => void): void; + function addEventListener(event: 'interstitialDidFailToLoad', handler: (error: string) => void): void; + function addEventListener(event: AdMobInterstitialEmptyEvent, handler: () => void): void; + function removeEventListener(event: 'interstitialDidFailToLoad', handler: (error: string) => void): void; + function removeEventListener(event: AdMobInterstitialEmptyEvent, handler: () => void): void; + function removeAllListeners(): void; +} + +export type AdMobRewardedEmptyEvent = + | 'rewardedVideoDidLoad' + | 'rewardedVideoDidOpen' + | 'rewardedVideoDidClose' + | 'rewardedVideoWillLeaveApplication'; +export type AdMobRewardedEvent = AdMobRewardedEmptyEvent | 'rewardedVideoDidRewardUser' | 'rewardedVideoDidFailToLoad'; +export namespace AdMobRewarded { + function setAdUnitID(id: string): void; + function setTestDeviceID(id: string): void; + function requestAd(callback?: () => void): void; + function showAd(callback?: (error: string) => void): void; + function addEventListener(event: 'rewardedVideoDidRewardUser', handler: (type: string, amount: number) => void): void; + function addEventListener(event: 'rewardedVideoDidFailToLoad', handler: (error: string) => void): void; + function addEventListener(event: AdMobRewardedEmptyEvent, handler: () => void): void; + function removeEventListener(event: 'rewardedVideoDidRewardUser', handler: (type: string, amount: number) => void): void; + function removeEventListener(event: 'rewardedVideoDidFailToLoad', handler: (error: string) => void): void; + function removeEventListener(event: AdMobRewardedEmptyEvent, handler: () => void): void; + function removeAllListeners(): void; +} + /** * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. * @@ -622,7 +696,7 @@ export class PlaybackObject { /** * BarCodeScanner */ -export interface BarCodeScannerProps extends ViewProperties { +export interface BarCodeScannerProps extends ViewProps { type?: 'front' | 'back'; torchMode?: 'on' | 'off'; barCodeTypes?: string[]; @@ -643,7 +717,7 @@ export class BarCodeScanner extends Component { /** * BlurView */ -export interface BlurViewProps extends ViewProperties { +export interface BlurViewProps extends ViewProps { tint: 'light' | 'default' | 'dark'; intensity: number; } @@ -689,7 +763,7 @@ export class CameraObject { getSupportedRatiosAsync(): Promise; // Android only } -export interface CameraProps extends ViewProperties { +export interface CameraProps extends ViewProps { flashMode?: string | number; type?: string | number; ratio?: string; @@ -1301,7 +1375,7 @@ export namespace Font { /** * GLView */ -export interface GLViewProps extends ViewProperties { +export interface GLViewProps extends ViewProps { onContextCreate(): void; msaaSamples: number; } @@ -1534,11 +1608,12 @@ export class KeepAwake extends Component { /** * LinearGradient */ -export interface LinearGradientProps extends ViewProperties { +export interface LinearGradientProps { colors: string[]; start?: [number, number]; end?: [number, number]; locations?: number[]; + style?: StyleProp; } export class LinearGradient extends Component { } diff --git a/types/expo/v25/expo-tests.tsx b/types/expo/v25/expo-tests.tsx new file mode 100644 index 0000000000..afcb006949 --- /dev/null +++ b/types/expo/v25/expo-tests.tsx @@ -0,0 +1,732 @@ +import * as React from 'react'; +import { Text } from 'react-native'; + +import { + Accelerometer, + AdMobAppEvent, + AdMobBanner, + AdMobInterstitial, + AdMobRewarded, + Amplitude, + Asset, + AuthSession, + Audio, + AppLoading, + BarCodeScanner, + BlurViewProps, + BlurView, + Brightness, + Camera, + CameraObject, + DocumentPicker, + Facebook, + FacebookAds, + FileSystem, + ImagePicker, + ImageManipulator, + FaceDetector, + Svg, + IntentLauncherAndroid, + KeepAwake, + LinearGradient, + Permissions, + PublisherBanner, + registerRootComponent, + ScreenOrientation, + SQLite, + Calendar, + MailComposer +} from 'expo'; + +Accelerometer.addListener((obj) => { + obj.x; + obj.y; + obj.z; +}); +Accelerometer.removeAllListeners(); +Accelerometer.setUpdateInterval(1000); + +() => ( + console.log(error)} + style={{ flex: 1 }} + /> +); + +() => ( + console.log(error)} + admobDispatchAppEvent={(event: AdMobAppEvent) => console.log(event)} + style={{ flex: 1 }} + /> +); + +AdMobInterstitial.setAdUnitID('ca-app-pub-3940256099942544/1033173712'); // Test ID, Replace with your-admob-unit-id +AdMobInterstitial.setTestDeviceID('EMULATOR'); +AdMobInterstitial.requestAd(() => AdMobInterstitial.showAd()); + +AdMobRewarded.setAdUnitID('ca-app-pub-3940256099942544/1033173712'); // Test ID, Replace with your-admob-unit-id +AdMobRewarded.setTestDeviceID('EMULATOR'); +AdMobRewarded.requestAd(() => AdMobRewarded.showAd()); + +Amplitude.initialize('key'); +Amplitude.setUserId('userId'); +Amplitude.setUserProperties({key: 1}); +Amplitude.clearUserProperties(); +Amplitude.logEvent('name'); +Amplitude.logEventWithProperties('event', {key: 'value'}); +Amplitude.setGroup('type', ['value']); + +const asset = Asset.fromModule(1); +asset.downloadAsync(); +Asset.loadAsync(1); +Asset.loadAsync([1, 2, 3]); +const asset1 = new Asset({ + uri: 'uri', + type: 'type', + name: 'name', + hash: 'hash', + width: 122, + height: 122 +}); + +const url = AuthSession.getRedirectUrl(); +AuthSession.dismiss(); +AuthSession.startAsync({ + authUrl: 'url1', + returnUrl: 'url2' +}).then(result => { + switch (result.type) { + case 'success': + result.event; + result.params; + break; + case 'error': + result.errorCode; + result.params; + result.event; + break; + case 'dismissed': + case 'cancel': + result.type; + break; + } +}); +AuthSession.startAsync({ + authUrl: 'url1', + returnUrl: undefined +}); + +Audio.setAudioModeAsync({ + shouldDuckAndroid: false, + playsInSilentModeIOS: true, + interruptionModeIOS: 2, + interruptionModeAndroid: 1, + allowsRecordingIOS: true +}); +Audio.setIsEnabledAsync(true); + +Audio.INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS === 0; +Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX === 1; +Audio.INTERRUPTION_MODE_IOS_DUCK_OTHERS === 2; + +Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX === 1; +Audio.INTERRUPTION_MODE_ANDROID_DUCK_OTHERS === 2; + +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT === 0; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP === 1; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4 === 2; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB === 3; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB === 4; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF === 5; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS === 6; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP === 7; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS === 8; +Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM === 9; + +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT === 0; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB === 1; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB === 2; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC === 3; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC === 4; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD === 5; +Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS === 6; + +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM === 'lpcm'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3 === 'ac-3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3 === 'cac3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4 === 'ima4'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC === 'aac '; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP === 'celp'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC === 'hvxc'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ === 'twvq'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3 === 'MAC3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6 === 'MAC6'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW === 'ulaw'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW === 'alaw'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN === 'QDMC'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2 === 'QDM2'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM === 'Qclp'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1 === '.mp1'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2 === '.mp2'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3 === '.mp3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS === 'alac'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE === 'aach'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD === 'aacl'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD === 'aace'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR === 'aacf'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2 === 'aacg'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2 === 'aacp'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL === 'aacs'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR === 'samr'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB === 'sawb'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE === 'AUDB'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC === 'ilbc'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA === 0x6d730011; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM === 0x6d730031; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3 === 'aes3'; +Audio.RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3 === 'ec-3'; + +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN === 0; +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW === 0x20; +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM === 0x40; +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH === 0x60; +Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX === 0x7f; + +Audio.RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT === 0; +Audio.RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE === 1; +Audio.RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED === 2; +Audio.RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE === 3; + +Audio.RECORDING_OPTIONS_PRESET_HIGH_QUALITY; +Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY; +async () => { + const result = await Audio.Sound.create({uri: 'uri'}, { + volume: 0.5, + rate: 0.6 + }, null, true); + + const sound = result.sound; + const status = result.status; + + if (!status.isLoaded) { + status.error; + } else { + status.didJustFinish; + // etc. + } + + const _status = await sound.getStatusAsync(); + await sound.loadAsync({uri: 'uri'}); +}; + +() => ( + Promise.resolve()} + onFinish={() => {}} + onError={(error) => console.log(error)} /> +); +() => ( + +); + +const barcodeReadCallback = () => {}; +() => ( + +); + +() => ( + +); + +async () => { + await Brightness.setBrightnessAsync(.6); + await Brightness.setSystemBrightnessAsync(.7); + const br1 = await Brightness.getBrightnessAsync(); + const br2 = await Brightness.getSystemBrightnessAsync(); +}; + +Camera.Constants.AutoFocus; +Camera.Constants.Type; +Camera.Constants.FlashMode; +Camera.Constants.WhiteBalance; +Camera.Constants.VideoQuality; +Camera.Constants.BarCodeType; +() => { + return( { + if (component) { + component.recordAsync(); + } + }} />); +}; + +async () => { + const result = await DocumentPicker.getDocumentAsync(); + + if (result.type === 'success') { + result.name; + result.uri; + result.size; + } +}; + +async () => { + const { type, expires, token } = await Facebook.logInWithReadPermissionsAsync("appId"); +}; + +() => ( + {}} + onError={() => {}} /> +); + +async () => { + const info = await FileSystem.getInfoAsync('file'); + + info.exists; + info.isDirectory; + + if (info.exists) { + info.md5; + info.uri; + info.size; + info.modificationTime; + } + + const string: string = await FileSystem.readAsStringAsync('file'); + await FileSystem.writeAsStringAsync('file', 'content'); + await FileSystem.deleteAsync('file'); + await FileSystem.moveAsync({ from: 'from', to: 'to'}); + await FileSystem.copyAsync({ from: 'from', to: 'to' }); + await FileSystem.makeDirectoryAsync('dir'); + const dirs: string[] = await FileSystem.readDirectoryAsync('dir'); + const result = await FileSystem.downloadAsync('from', 'to'); + + result.headers; + result.status; + result.uri; + result.md5; +}; + +async () => { + // Video test + const result = await ImagePicker.launchImageLibraryAsync({ + mediaTypes: ImagePicker.MediaTypeOptions.Videos, + }); + + if (!result.cancelled) { + result.uri; + result.width; + result.height; + result.duration; + result.type; + } +}; + +async () => { + // Image test + const result = await ImagePicker.launchImageLibraryAsync({ + mediaTypes: ImagePicker.MediaTypeOptions.Images, + base64: true, + aspect: [4, 3], + quality: 1, + exif: true, + }); + + if (!result.cancelled) { + result.uri; + result.width; + result.height; + result.exif; + result.base64; + result.type; + } +}; + +async () => { + const result = await ImageManipulator.manipulate('url', { + rotate: 90 + }, { + compress: 0.5 + }); + + result.height; + result.uri; + result.width; +}; + +FaceDetector.Constants.Mode.fast; +FaceDetector.Constants.Mode.accurate; +FaceDetector.Constants.Landmarks.all; +FaceDetector.Constants.Landmarks.none; +FaceDetector.Constants.Classifications.all; +FaceDetector.Constants.Classifications.none; +async () => { + const result = await FaceDetector.detectFaces('url', { + mode: FaceDetector.Constants.Mode.fast, + detectLandmarks: FaceDetector.Constants.Landmarks.all, + runClassifications: FaceDetector.Constants.Classifications.none + }); + + result.faces[0]; +}; + +() => ( + + + + + + + + + STROKED TEXT + + + + + + + + We go up and down, + then up again + + + + + + + + + + + + + + + + + + + + + +); + +IntentLauncherAndroid.ACTION_ACCESSIBILITY_SETTINGS === 'android.settings.ACCESSIBILITY_SETTINGS'; +IntentLauncherAndroid.ACTION_APP_NOTIFICATION_REDACTION === 'android.settings.ACTION_APP_NOTIFICATION_REDACTION'; +IntentLauncherAndroid.ACTION_CONDITION_PROVIDER_SETTINGS === 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS'; +IntentLauncherAndroid.ACTION_NOTIFICATION_LISTENER_SETTINGS === 'android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS'; +IntentLauncherAndroid.ACTION_PRINT_SETTINGS === 'android.settings.ACTION_PRINT_SETTINGS'; +IntentLauncherAndroid.ACTION_ADD_ACCOUNT_SETTINGS === 'android.settings.ADD_ACCOUNT_SETTINGS'; +IntentLauncherAndroid.ACTION_AIRPLANE_MODE_SETTINGS === 'android.settings.AIRPLANE_MODE_SETTINGS'; +IntentLauncherAndroid.ACTION_APN_SETTINGS === 'android.settings.APN_SETTINGS'; +IntentLauncherAndroid.ACTION_APPLICATION_DETAILS_SETTINGS === 'android.settings.APPLICATION_DETAILS_SETTINGS'; +IntentLauncherAndroid.ACTION_APPLICATION_DEVELOPMENT_SETTINGS === 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS'; +IntentLauncherAndroid.ACTION_APPLICATION_SETTINGS === 'android.settings.APPLICATION_SETTINGS'; +IntentLauncherAndroid.ACTION_APP_NOTIFICATION_SETTINGS === 'android.settings.APP_NOTIFICATION_SETTINGS'; +IntentLauncherAndroid.ACTION_APP_OPS_SETTINGS === 'android.settings.APP_OPS_SETTINGS'; +IntentLauncherAndroid.ACTION_BATTERY_SAVER_SETTINGS === 'android.settings.BATTERY_SAVER_SETTINGS'; +IntentLauncherAndroid.ACTION_BLUETOOTH_SETTINGS === 'android.settings.BLUETOOTH_SETTINGS'; +IntentLauncherAndroid.ACTION_CAPTIONING_SETTINGS === 'android.settings.CAPTIONING_SETTINGS'; +IntentLauncherAndroid.ACTION_CAST_SETTINGS === 'android.settings.CAST_SETTINGS'; +IntentLauncherAndroid.ACTION_DATA_ROAMING_SETTINGS === 'android.settings.DATA_ROAMING_SETTINGS'; +IntentLauncherAndroid.ACTION_DATE_SETTINGS === 'android.settings.DATE_SETTINGS'; +IntentLauncherAndroid.ACTION_DEVICE_INFO_SETTINGS === 'android.settings.DEVICE_INFO_SETTINGS'; +IntentLauncherAndroid.ACTION_DEVICE_NAME === 'android.settings.DEVICE_NAME'; +IntentLauncherAndroid.ACTION_DISPLAY_SETTINGS === 'android.settings.DISPLAY_SETTINGS'; +IntentLauncherAndroid.ACTION_DREAM_SETTINGS === 'android.settings.DREAM_SETTINGS'; +IntentLauncherAndroid.ACTION_HARD_KEYBOARD_SETTINGS === 'android.settings.HARD_KEYBOARD_SETTINGS'; +IntentLauncherAndroid.ACTION_HOME_SETTINGS === 'android.settings.HOME_SETTINGS'; +IntentLauncherAndroid.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS === 'android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS'; +IntentLauncherAndroid.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS === 'android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS'; +IntentLauncherAndroid.ACTION_INPUT_METHOD_SETTINGS === 'android.settings.INPUT_METHOD_SETTINGS'; +IntentLauncherAndroid.ACTION_INPUT_METHOD_SUBTYPE_SETTINGS === 'android.settings.INPUT_METHOD_SUBTYPE_SETTINGS'; +IntentLauncherAndroid.ACTION_INTERNAL_STORAGE_SETTINGS === 'android.settings.INTERNAL_STORAGE_SETTINGS'; +IntentLauncherAndroid.ACTION_LOCALE_SETTINGS === 'android.settings.LOCALE_SETTINGS'; +IntentLauncherAndroid.ACTION_LOCATION_SOURCE_SETTINGS === 'android.settings.LOCATION_SOURCE_SETTINGS'; +IntentLauncherAndroid.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS === 'android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS'; +IntentLauncherAndroid.ACTION_MANAGE_APPLICATIONS_SETTINGS === 'android.settings.MANAGE_APPLICATIONS_SETTINGS'; +IntentLauncherAndroid.ACTION_MANAGE_DEFAULT_APPS_SETTINGS === 'android.settings.MANAGE_DEFAULT_APPS_SETTINGS'; +IntentLauncherAndroid.ACTION_MEMORY_CARD_SETTINGS === 'android.settings.MEMORY_CARD_SETTINGS'; +IntentLauncherAndroid.ACTION_MONITORING_CERT_INFO === 'android.settings.MONITORING_CERT_INFO'; +IntentLauncherAndroid.ACTION_NETWORK_OPERATOR_SETTINGS === 'android.settings.NETWORK_OPERATOR_SETTINGS'; +IntentLauncherAndroid.ACTION_NFCSHARING_SETTINGS === 'android.settings.NFCSHARING_SETTINGS'; +IntentLauncherAndroid.ACTION_NFC_PAYMENT_SETTINGS === 'android.settings.NFC_PAYMENT_SETTINGS'; +IntentLauncherAndroid.ACTION_NFC_SETTINGS === 'android.settings.NFC_SETTINGS'; +IntentLauncherAndroid.ACTION_NIGHT_DISPLAY_SETTINGS === 'android.settings.NIGHT_DISPLAY_SETTINGS'; +IntentLauncherAndroid.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS === 'android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS'; +IntentLauncherAndroid.ACTION_NOTIFICATION_SETTINGS === 'android.settings.NOTIFICATION_SETTINGS'; +IntentLauncherAndroid.ACTION_PAIRING_SETTINGS === 'android.settings.PAIRING_SETTINGS'; +IntentLauncherAndroid.ACTION_PRIVACY_SETTINGS === 'android.settings.PRIVACY_SETTINGS'; +IntentLauncherAndroid.ACTION_QUICK_LAUNCH_SETTINGS === 'android.settings.QUICK_LAUNCH_SETTINGS'; +IntentLauncherAndroid.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS === 'android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS'; +IntentLauncherAndroid.ACTION_SECURITY_SETTINGS === 'android.settings.SECURITY_SETTINGS'; +IntentLauncherAndroid.ACTION_SETTINGS === 'android.settings.SETTINGS'; +IntentLauncherAndroid.ACTION_SHOW_ADMIN_SUPPORT_DETAILS === 'android.settings.SHOW_ADMIN_SUPPORT_DETAILS'; +IntentLauncherAndroid.ACTION_SHOW_INPUT_METHOD_PICKER === 'android.settings.SHOW_INPUT_METHOD_PICKER'; +IntentLauncherAndroid.ACTION_SHOW_REGULATORY_INFO === 'android.settings.SHOW_REGULATORY_INFO'; +IntentLauncherAndroid.ACTION_SHOW_REMOTE_BUGREPORT_DIALOG === 'android.settings.SHOW_REMOTE_BUGREPORT_DIALOG'; +IntentLauncherAndroid.ACTION_SOUND_SETTINGS === 'android.settings.SOUND_SETTINGS'; +IntentLauncherAndroid.ACTION_STORAGE_MANAGER_SETTINGS === 'android.settings.STORAGE_MANAGER_SETTINGS'; +IntentLauncherAndroid.ACTION_SYNC_SETTINGS === 'android.settings.SYNC_SETTINGS'; +IntentLauncherAndroid.ACTION_SYSTEM_UPDATE_SETTINGS === 'android.settings.SYSTEM_UPDATE_SETTINGS'; +IntentLauncherAndroid.ACTION_TETHER_PROVISIONING_UI === 'android.settings.TETHER_PROVISIONING_UI'; +IntentLauncherAndroid.ACTION_TRUSTED_CREDENTIALS_USER === 'android.settings.TRUSTED_CREDENTIALS_USER'; +IntentLauncherAndroid.ACTION_USAGE_ACCESS_SETTINGS === 'android.settings.USAGE_ACCESS_SETTINGS'; +IntentLauncherAndroid.ACTION_USER_DICTIONARY_INSERT === 'android.settings.USER_DICTIONARY_INSERT'; +IntentLauncherAndroid.ACTION_USER_DICTIONARY_SETTINGS === 'android.settings.USER_DICTIONARY_SETTINGS'; +IntentLauncherAndroid.ACTION_USER_SETTINGS === 'android.settings.USER_SETTINGS'; +IntentLauncherAndroid.ACTION_VOICE_CONTROL_AIRPLANE_MODE === 'android.settings.VOICE_CONTROL_AIRPLANE_MODE'; +IntentLauncherAndroid.ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE === 'android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE'; +IntentLauncherAndroid.ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE === 'android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE'; +IntentLauncherAndroid.ACTION_VOICE_INPUT_SETTINGS === 'android.settings.VOICE_INPUT_SETTINGS'; +IntentLauncherAndroid.ACTION_VPN_SETTINGS === 'android.settings.VPN_SETTINGS'; +IntentLauncherAndroid.ACTION_VR_LISTENER_SETTINGS === 'android.settings.VR_LISTENER_SETTINGS'; +IntentLauncherAndroid.ACTION_WEBVIEW_SETTINGS === 'android.settings.WEBVIEW_SETTINGS'; +IntentLauncherAndroid.ACTION_WIFI_IP_SETTINGS === 'android.settings.WIFI_IP_SETTINGS'; +IntentLauncherAndroid.ACTION_WIFI_SETTINGS === 'android.settings.WIFI_SETTINGS'; +IntentLauncherAndroid.ACTION_WIRELESS_SETTINGS === 'android.settings.WIRELESS_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_AUTOMATION_SETTINGS === 'android.settings.ZEN_MODE_AUTOMATION_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_EVENT_RULE_SETTINGS === 'android.settings.ZEN_MODE_EVENT_RULE_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS === 'android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_PRIORITY_SETTINGS === 'android.settings.ZEN_MODE_PRIORITY_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS === 'android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS'; +IntentLauncherAndroid.ACTION_ZEN_MODE_SETTINGS === 'android.settings.ZEN_MODE_SETTINGS'; + +KeepAwake.activate(); +KeepAwake.deactivate(); + +() => ( + +); + +() => ( + +); + +Permissions.CAMERA === 'camera'; +Permissions.CAMERA_ROLL === 'cameraRoll'; +Permissions.AUDIO_RECORDING === 'audioRecording'; +Permissions.CONTACTS === 'contacts'; +Permissions.NOTIFICATIONS === 'remoteNotifications'; +Permissions.REMOTE_NOTIFICATIONS === 'remoteNotifications'; +Permissions.SYSTEM_BRIGHTNESS === 'systemBrightness'; +async () => { + const result = await Permissions.askAsync(Permissions.CAMERA); + + result.status === 'granted'; + result.status === 'denied'; + result.status === 'undetermined'; + + result.expires === 'never'; +}; + +ScreenOrientation.Orientation.ALL; +ScreenOrientation.allow(ScreenOrientation.Orientation.ALL); + +class __TestEntry__ extends React.Component { + render() { + return( + test + ); + } +} +registerRootComponent(__TestEntry__); + +Calendar.EntityTypes.EVENT === 'event'; +Calendar.EntityTypes.REMINDER === 'reminder'; + +Calendar.CalendarType.LOCAL === 'local'; +Calendar.CalendarType.CALDAV === 'caldav'; +Calendar.CalendarType.EXCHANGE === 'exchange'; +Calendar.CalendarType.SUBSCRIBED === 'subscribed'; +Calendar.CalendarType.BIRTHDAYS === 'birthdays'; + +async () => { + const result = await Calendar.getCalendarsAsync(Calendar.EntityTypes.EVENT); + result.length; + + const calendar = result[0]; + calendar.id === ''; + calendar.title === ''; + calendar.sourceId === ''; + calendar.type === Calendar.CalendarType.BIRTHDAYS; + calendar.color === ''; + calendar.entityType === Calendar.EntityTypes.EVENT; + calendar.allowsModifications === true; + calendar.allowedAvailabilities === ['']; + calendar.isPrimary === true; + calendar.name === ''; + calendar.ownerAccount === ''; + calendar.timeZone === ''; + calendar.allowedReminders === ['']; + calendar.allowedAttendeeTypes === ['']; + calendar.isVisible === false; + calendar.isSynced === false; + calendar.accessLevel === Calendar.CalendarAccessLevel.CONTRIBUTOR; + + if (calendar.source) { + calendar.source.id === ''; + calendar.source.type === ''; + calendar.source.name === ''; + calendar.source.isLocalAccount === false; + } + + const id1 = await Calendar.createCalendarAsync({ + accessLevel: Calendar.CalendarAccessLevel.EDITOR + }); + + id1 === ''; + + const id2 = await Calendar.updateCalendarAsync('1234', { + isVisible: false + }); + + id2 === ''; + + const id3 = await Calendar.updateCalendarAsync('1234', null); + + await Calendar.deleteCalendarAsync('1234'); + + const events = await Calendar.getEventsAsync( + ['123', '124'], + new Date(), + new Date() + ); + + const event1 = events[0]; + + event1.accessLevel === Calendar.EventAccessLevel.CONFIDENTIAL; + event1.alarms === []; + event1.allDay === true; + event1.availability === Calendar.Availability.FREE; + event1.calendarId === ''; + event1.creationDate === ''; + event1.endDate === ''; + event1.endTimeZone === ''; + event1.guestsCanInviteOthers === true; + event1.guestsCanModify === true; + event1.guestsCanSeeGuests === false; + event1.id === ''; + event1.instanceId === ''; + event1.isDetached === false; + + const event2 = await Calendar.getEventAsync('123', { + futureEvents: true + }); + + const eventId1 = await Calendar.createEventAsync('123'); + + const eventId2 = await Calendar.updateEventAsync('1234'); + + await Calendar.deleteEventAsync('1234'); + + const attendees = await Calendar.getAttendeesForEventAsync('123'); + + const aId1 = await Calendar.createAttendeeAsync('123'); + + const aId2 = await Calendar.updateAttendeeAsync('123'); + + await Calendar.deleteAttendeeAsync('123'); + + const reminders = await Calendar.getRemindersAsync(['123']); + + const reminder = await Calendar.getReminderAsync('123'); + + const remId1 = await Calendar.createReminderAsync('123'); + + const remId2 = await Calendar.updateReminderAsync('123'); + + await Calendar.deleteReminderAsync('123'); + + const sources = await Calendar.getSourcesAsync(); + + const source = await Calendar.getSourceAsync('123'); + + Calendar.openEventInCalendar('123'); +}; + +async () => { + const result = await MailComposer.composeAsync({ + subject: 'sss' + }); + + result.status === 'saved'; +}; diff --git a/types/expo/v25/index.d.ts b/types/expo/v25/index.d.ts new file mode 100644 index 0000000000..0a7093e2b7 --- /dev/null +++ b/types/expo/v25/index.d.ts @@ -0,0 +1,2759 @@ +// Type definitions for expo 25.0 +// Project: https://github.com/expo/expo-sdk +// Definitions by: Konstantin Kai +// Martynas Kadiša +// Jan Aagaard +// Sergio Sánchez +// Fernando Helwanger +// Umidbek Karimov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { EventSubscription } from 'fbemitter'; +import { Component, ComponentClass, Ref, ComponentType } from 'react'; +import { + ColorPropType, + ImageRequireSource, + ImageURISource, + NativeEventEmitter, + ViewProps, + ViewStyle, + Permission, + StyleProp +} from 'react-native'; + +export type Axis = number; +export type BarCodeReadCallback = (params: { type: string; data: string; }) => void; +export type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; +export type Md5 = string; +export type Orientation = 'portrait' | 'landscape'; +export type RequireSource = ImageRequireSource; +export type ResizeModeContain = 'contain'; +export type ResizeModeCover = 'cover'; +export type ResizeModeStretch = 'stretch'; +export type URISource = ImageURISource; + +export interface HashMap { [key: string]: any; } + +/** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ +export namespace Accelerometer { + interface AccelerometerObject { + x: Axis; + y: Axis; + z: Axis; + } + + /** + * Subscribe for updates to the accelerometer. + * @param listener A callback that is invoked when an accelerometer update is available. When invoked, the listener is provided a single argumument that is an object containing keys x, y, z. + * @returns An EventSubscription object that you can call remove() on when you would like to unsubscribe the listener. + */ + function addListener(listener: (obj: AccelerometerObject) => any): EventSubscription; + + /** Remove all listeners. */ + function removeAllListeners(): void; + + /** + * Subscribe for updates to the accelerometer. + * @param intervalMs Desired interval in milliseconds between accelerometer updates. + */ + function setUpdateInterval(intervalMs: number): void; +} + +/** + * Admob + */ +export type AdMobBannerSize = + | 'banner' + | 'largeBanner' + | 'mediumRectangle' + | 'fullBanner' + | 'leaderboard' + | 'smartBannerPortrait' + | 'smartBannerLandscape'; +export interface AdMobBannerProperties extends ViewProps { + bannerSize?: AdMobBannerSize; + adUnitID?: string; + testDeviceID?: string; + didFailToReceiveAdWithError?(errorDescription: string): void; + adViewDidReceiveAd?(): void; + adViewWillPresentScreen?(): void; + adViewWillDismissScreen?(): void; + adViewDidDismissScreen?(): void; + adViewWillLeaveApplication?(): void; +} + +export class AdMobBanner extends Component { } + +export interface AdMobAppEvent { + name: string; + info: string; +} +export interface PublisherBannerProperties extends AdMobBannerProperties { + admobDispatchAppEvent?(event: AdMobAppEvent): void; +} +export class PublisherBanner extends Component { } + +export type AdMobInterstitialEmptyEvent = + | 'interstitialDidLoad' + | 'interstitialDidOpen' + | 'interstitialDidClose' + | 'interstitialWillLeaveApplication'; +export type AdMobInterstitialEvent = AdMobInterstitialEmptyEvent | 'interstitialVideoDidFailToLoad'; +export namespace AdMobInterstitial { + function setAdUnitID(id: string): void; + function setTestDeviceID(id: string): void; + function requestAd(callback?: () => void): void; + function showAd(callback?: (error: string) => void): void; + function isReady(callback: (isReady: boolean) => void): void; + function addEventListener(event: 'interstitialDidFailToLoad', handler: (error: string) => void): void; + function addEventListener(event: AdMobInterstitialEmptyEvent, handler: () => void): void; + function removeEventListener(event: 'interstitialDidFailToLoad', handler: (error: string) => void): void; + function removeEventListener(event: AdMobInterstitialEmptyEvent, handler: () => void): void; + function removeAllListeners(): void; +} + +export type AdMobRewardedEmptyEvent = + | 'rewardedVideoDidLoad' + | 'rewardedVideoDidOpen' + | 'rewardedVideoDidClose' + | 'rewardedVideoWillLeaveApplication'; +export type AdMobRewardedEvent = AdMobRewardedEmptyEvent | 'rewardedVideoDidRewardUser' | 'rewardedVideoDidFailToLoad'; +export namespace AdMobRewarded { + function setAdUnitID(id: string): void; + function setTestDeviceID(id: string): void; + function requestAd(callback?: () => void): void; + function showAd(callback?: (error: string) => void): void; + function addEventListener(event: 'rewardedVideoDidRewardUser', handler: (type: string, amount: number) => void): void; + function addEventListener(event: 'rewardedVideoDidFailToLoad', handler: (error: string) => void): void; + function addEventListener(event: AdMobRewardedEmptyEvent, handler: () => void): void; + function removeEventListener(event: 'rewardedVideoDidRewardUser', handler: (type: string, amount: number) => void): void; + function removeEventListener(event: 'rewardedVideoDidFailToLoad', handler: (error: string) => void): void; + function removeEventListener(event: AdMobRewardedEmptyEvent, handler: () => void): void; + function removeAllListeners(): void; +} + +/** + * Provides access to Amplitude mobile analytics which basically lets you log various events to the Cloud. This module wraps Amplitude’s iOS and Android SDKs. + * + * Note: Session tracking may not work correctly when running Experiences in the main Expo app. It will work correctly if you create a standalone app. + */ +export namespace Amplitude { + /** Initializes Amplitude with your Amplitude API key. */ + function initialize(apiKey: string): void; + + /** Assign a user ID to the current user. If you don’t have a system for user IDs you don’t need to call this. */ + function setUserId(userId: string): void; + + /** Set properties for the current user. */ + function setUserProperties(userProperties: HashMap): void; + + /** Clear properties set by `setUserProperties()`. */ + function clearUserProperties(): void; + + /** Log an event to Amplitude. */ + function logEvent(eventName: string): void; + + /** Log an event to Amplitude with custom properties. */ + function logEventWithProperties( + eventName: string, + + /** A map of custom properties. */ + properties: HashMap + ): void; + + /** Add the current user to a group. */ + function setGroup( + /** The group name, e.g. `'sports'`. */ + groupType: string, + + /** An array of group names, e.g. `['tennis', 'soccer']`. */ + groupNames: string[] + ): void; +} + +// #region AppLoading +/** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ +export interface AppLoadingProps { + /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ + startAsync?: () => Promise; + + /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ + onFinish?: () => void; + + /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ + onError?: (error: Error) => void; +} + +/** + * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. + * + * This is incredibly useful to let you download and cache fonts, logo and icon images and other assets that you want to be sure the user has on their device for an optimal experience before rendering they start using the app. + */ +export class AppLoading extends Component { } +// #endregion AppLoading + +/** This module provides an interface to Expo’s asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts and sounds. Expo’s asset system integrates with React Native’s, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. */ +export class Asset { + constructor({ name, type, hash, uri, width, height }: { + name: string; + type: string; + hash: string; + uri: string; + width?: number; + height?: number; + }); + + /** The MD5 hash of the asset’s data. */ + hash: Md5; + + /** The name of the asset file without the extension. Also without the part from @ onward in the filename (used to specify scale factor for images). */ + name: string; + + /** The extension of the asset filename. */ + type: string; + + /** A URI that points to the asset’s data on the remote server. When running the published version of your app, this refers to the the location on Expo’s asset server where Expo has stored your asset. When running the app from XDE during development, this URI points to XDE’s server running on your computer and the asset is served directly from your computer. */ + uri: string; + + /** If the asset has been downloaded (by calling `downloadAsync()`), the `file://` URI pointing to the local file on the device that contains the asset data. */ + localUri: string; + + /** If the asset is an image, the width of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ + width?: number; + + /** If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present. */ + height?: number; + + downloading: boolean; + downloaded: boolean; + downloadCallbacks: Array<{ resolve: () => any, reject: (e?: any) => any }>; + + /** Downloads the asset data to a local file in the device’s cache directory. Once the returned promise is fulfilled without error, the localUri field of this asset points to a local file containing the asset data. The asset is only downloaded if an up-to-date local file for the asset isn’t already present due to an earlier download. */ + downloadAsync(): Promise; + + /** Returns the `Expo.Asset` instance representing an asset given its module. */ + static fromModule(module: RequireSource): Asset; + + /** + * A helper that wraps `Expo.Asset.fromModule(module).downloadAsync` for convenience. + * @param moduleIds An array of `require('path/to/file')`. Can also be just one module without an Array. + */ + static loadAsync(module: RequireSource[] | RequireSource): Promise; +} + +/** + * Provides basic sample playback and recording. + * + * Note that Expo does not yet support backgrounding, so audio is not available to play in the background of your experience. Audio also automatically stops if headphones / bluetooth audio devices are disconnected. + */ +export namespace Audio { + enum InterruptionModeIos { + /** This is the default option. If this option is set, your experience’s audio is mixed with audio playing in background apps. */ + INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS = 0, + + /** If this option is set, your experience’s audio interrupts audio from other apps. */ + INTERRUPTION_MODE_IOS_DO_NOT_MIX = 1, + + /** If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ + INTERRUPTION_MODE_IOS_DUCK_OTHERS = 2 + } + + const INTERRUPTION_MODE_IOS_MIX_WITH_OTHERS: 0; + const INTERRUPTION_MODE_IOS_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_IOS_DUCK_OTHERS: 2; + + enum InterruptionModeAndroid { + /** If this option is set, your experience’s audio interrupts audio from other apps. */ + INTERRUPTION_MODE_ANDROID_DO_NOT_MIX = 1, + + /** This is the default option. If this option is set, your experience’s audio lowers the volume ("ducks") of audio from other apps while your audio plays. */ + INTERRUPTION_MODE_ANDROID_DUCK_OTHERS = 2 + } + + const INTERRUPTION_MODE_ANDROID_DO_NOT_MIX: 1; + const INTERRUPTION_MODE_ANDROID_DUCK_OTHERS: 2; + + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_THREE_GPP: 1; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4: 2; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_NB: 3; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AMR_WB: 4; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADIF: 5; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_AAC_ADTS: 6; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_RTP_AVP: 7; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG2TS: 8; + const RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM: 9; + + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_DEFAULT: 0; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_NB: 1; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AMR_WB: 2; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC: 3; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_HE_AAC: 4; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC_ELD: 5; + const RECORDING_OPTION_ANDROID_AUDIO_ENCODER_VORBIS: 6; + + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_LINEARPCM: 'lpcm'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AC3: 'ac-3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_60958AC3: 'cac3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLEIMA4: 'ima4'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC: 'aac '; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4CELP: 'celp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4HVXC: 'hvxc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4TWINVQ: 'twvq'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE3: 'MAC3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MACE6: 'MAC6'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ULAW: 'ulaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ALAW: 'alaw'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN: 'QDMC'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QDESIGN2: 'QDM2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_QUALCOMM: 'Qclp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER1: '.mp1'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER2: '.mp2'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEGLAYER3: '.mp3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_APPLELOSSLESS: 'alac'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE: 'aach'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_LD: 'aacl'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD: 'aace'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_SBR: 'aacf'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_ELD_V2: 'aacg'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_HE_V2: 'aacp'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC_SPATIAL: 'aacs'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR: 'samr'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AMR_WB: 'sawb'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AUDIBLE: 'AUDB'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ILBC: 'ilbc'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_DVIINTELIMA: 0x6d730011; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_MICROSOFTGSM: 0x6d730031; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_AES3: 'aes3'; + const RECORDING_OPTION_IOS_OUTPUT_FORMAT_ENHANCEDAC3: 'ec-3'; + + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MIN: 0; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_LOW: 0x20; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MEDIUM: 0x40; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_HIGH: 0x60; + const RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX: 0x7f; + + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_CONSTANT: 0; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_LONG_TERM_AVERAGE: 1; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE_CONSTRAINED: 2; + const RECORDING_OPTION_IOS_BIT_RATE_STRATEGY_VARIABLE: 3; + + type RecordingStatus = { + canRecord: false, + isDoneRecording: false + } | { + canRecord: true, + isRecording: boolean, + durationMillis: number + } | { + canRecord: false, + isDoneRecording: true, + durationMillis: number + }; + + const RECORDING_OPTIONS_PRESET_HIGH_QUALITY: RecordingOptions; + const RECORDING_OPTIONS_PRESET_LOW_QUALITY: RecordingOptions; + + interface RecordingOptions { + android: { + extension: string; + outputFormat: number; + audioEncoder: number; + sampleRate?: number; + numberOfChannels?: number; + bitRate?: number; + maxFileSize?: number; + }; + ios: { + extension: string; + outputFormat?: string | number; + audioQuality: number; + sampleRate: number; + numberOfChannels: number; + bitRate: number; + bitRateStrategy?: number; + bitDepthHint?: number; + linearPCMBitDepth?: number; + linearPCMIsBigEndian?: boolean; + linearPCMIsFloat?: boolean; + }; + } + + interface AudioMode { + /** Boolean selecting if your experience’s audio should play in silent mode on iOS. This value defaults to `false`. */ + playsInSilentModeIOS: boolean; + + /** Boolean selecting if recording is enabled on iOS. This value defaults to `false`. NOTE: when this flag is set to true, playback may be routed to the phone receiver instead of to the speaker. */ + allowsRecordingIOS: boolean; + + /** Enum selecting how your experience’s audio should interact with the audio from other apps on iOS. */ + interruptionModeIOS: InterruptionModeIos; + + /** Boolean selecting if your experience’s audio should automatically be lowered in volume ("duck") if audio from another app interrupts your experience. This value defaults to true. If false, audio from other apps will pause your audio. */ + shouldDuckAndroid: boolean; + + /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ + interruptionModeAndroid: InterruptionModeAndroid; + } + + function setIsEnabledAsync(value: boolean): Promise; + function setAudioModeAsync(mode: AudioMode): Promise; + + /** This class represents a sound corresponding to an Asset or URL. */ + class Sound extends PlaybackObject { + constructor(); + + /** + * Creates and loads a sound from source, with optional `initialStatus`, `onPlaybackStatusUpdate`, and `downloadFirst`. + * + * @returns A `Promise` that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: The newly created and loaded Sound object. + * - `status`: The PlaybackStatus of the Sound object. See the AV documentation for further information. + */ + static create( + /** + * The source of the sound. The following forms are supported: + * + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to an audio file on the web. + * - `require('path/to/file')` for an audio file asset in the source code directory. + * - An `Expo.Asset` object for an audio file asset. + */ + source: PlaybackSource, + + /** The initial intended PlaybackStatusToSet of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter PlaybackStatus. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null, + + /** If set to true, the system will attempt to download the resource to the device before loading. This value defaults to `true`. Note that at the moment, this will only work for `source`s of the form `require('path/to/file')` or `Asset` objects. */ + downloadFirst?: boolean + ): Promise<{ sound: Sound, status: PlaybackStatus }>; + } + + class Recording { + constructor(); + + /** Gets the `status` of the `Recording`. */ + getStatusAsync(): Promise; + + /** Sets a function to be called regularly with the `status` of the `Recording`. */ + setOnRecordingStatusUpdate(onRecordingStatusUpdate?: (status: RecordingStatus) => void): void; + + /** Sets the interval with which onRecordingStatusUpdate is called while the recording can record. This value defaults to 500 milliseconds. */ + setProgressUpdateInterval(progressUpdateIntervalMillis: number): void; + + /** Loads the recorder into memory and prepares it for recording. This must be called before calling `startAsync()`. This method can only be called if the `Recording` instance has never yet been prepared. */ + prepareToRecordAsync( + /** Options for the recording, including sample rate, bitrate, channels, format, encoder, and extension. If no options are passed to `prepareToRecordAsync()`, the recorder will be created with options `Expo.Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY`. */ + options?: RecordingOptions + ): Promise; + + /** Begins recording. This method can only be called if the `Recording` has been prepared. */ + startAsync(): Promise; + + /** + * Pauses recording. This method can only be called if the Recording has been prepared. + * + * NOTE: This is only available on Android API version 24 and later. + */ + pauseAsync(): Promise; + + /** Stops the recording and deallocates the recorder from memory. This reverts the Recording instance to an unprepared state, and another Recording instance must be created in order to record again. This method can only be called if the `Recording` has been prepared. */ + stopAndUnloadAsync(): Promise; + + /** + * Gets the local URI of the Recording. Note that this will only succeed once the Recording is prepared to record. + * + * @returns A string with the local URI of the `Recording`, or `null` if the `Recording` is not prepared to record. + */ + getURI(): string | null | undefined; + + /** + * Creates and loads a new `Sound` object to play back the `Recording`. Note that this will only succeed once the `Recording` is done recording (once `stopAndUnloadAsync()` has been called). + * + * @returns A Promise that is rejected if creation failed, or fulfilled with the following dictionary if creation succeeded: + * - `sound`: the newly created and loaded Sound object. + * - `status`: the PlaybackStatus of the Sound object. + */ + createNewLoadedSound( + /** The initial intended `PlaybackStatusToSet` of the sound, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. */ + initialStatus?: PlaybackStatusToSet, + + /** A function taking a single parameter `PlaybackStatus`. This value defaults to `null` if no parameter is passed. */ + onPlaybackStatusUpdate?: ((status: PlaybackStatus) => void) | null + ): Promise<{ sound: Sound, status: PlaybackStatus }>; + } +} + +/** + * AuthSession + */ +export namespace AuthSession { + type StartAsyncResponse = { + type: 'cancel'; + } | { + type: 'dismissed'; + } | { + type: 'success'; + params: HashMap; + event: HashMap; + } | { + type: 'error'; + params: HashMap; + errorCode: string; + event: HashMap; + }; + + function startAsync(options: { authUrl: string; returnUrl?: string; }): Promise; + function dismiss(): void; + function getRedirectUrl(): string; +} + +// #region AV +/** + * AV + */ +export type PlaybackStatus = { + isLoaded: false; + androidImplementation?: string; + + /** Populated exactly once when an error forces the object to unload. */ + error?: string; +} | { + isLoaded: true; + androidImplementation?: string; + uri: string; + progressUpdateIntervalMillis: number; + durationMillis?: number; + positionMillis: number; + playableDurationMillis?: number; + shouldPlay: boolean; + isPlaying: boolean; + isBuffering: boolean; + rate: number; + shouldCorrectPitch: boolean; + volume: number; + isMuted: boolean; + isLooping: boolean; + + /** True exactly once when the track plays to finish. */ + didJustFinish: boolean; +}; + +export interface PlaybackStatusToSet { + androidImplementation?: string; + progressUpdateIntervalMillis?: number; + positionMillis?: number; + shouldPlay?: boolean; + rate?: FloatFromZeroToOne; + shouldCorrectPitch?: boolean; + volume?: FloatFromZeroToOne; + isMuted?: boolean; + isLooping?: boolean; +} + +export type PlaybackSource = RequireSource | { uri: string } | Asset; + +export class PlaybackObject { + /** + * Gets the `PlaybackStatus` of the `playbackObject`. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject`. + */ + getStatusAsync(): Promise; + + /** + * Loads the media from source into memory and prepares it for playing. This must be called before calling setStatusAsync() or any of the convenience set status methods. This method can only be called if the playbackObject is in an unloaded state. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is loaded, or rejects if loading failed. The `Promise` will also reject if the `playbackObject` was already loaded. See below for details on `PlaybackStatus`. + */ + loadAsync( + /** + * The source of the media. The following forms are supported: + * - A dictionary of the form `{ uri: 'http://path/to/file' }` with a network URL pointing to a media file on the web. + * - `require('path/to/file')` for a media file asset in the source code directory. + * - An `Expo.Asset object` for a media file asset. + */ + source: PlaybackSource, + + /** The initial intended `PlaybackStatusToSet` of the `playbackObject`, whose values will override the default initial playback status. This value defaults to `{}` if no parameter is passed. See below for details on `PlaybackStatusToSet` and the default initial playback status. */ + initialStatus?: PlaybackStatusToSet, + + /** If set to `true`, the system will attempt to download the resource to the device before loading. This value defaults to true. Note that at the moment, this will only work for sources of the form `require('path/to/file')` or `Expo.Asset` objects. */ + downloadFirst?: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false })`. */ + pauseAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the `isPlaying` and `isBuffering` properties of the `PlaybackStatus`. + */ + playAsync(): Promise; + + /** + * This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: true, positionMillis: millis })`. + * + * Playback may not start immediately after calling this function for reasons such as buffering. Make sure to update your UI based on the isPlaying and `isBuffering` properties of the `PlaybackStatus`. + */ + playFromPositionAsync( + /** The desired position of playback in milliseconds. */ + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** + * Replays the item. When using `playFromPositionAsync(0)` the item is seeked to the position at `0` ms. On iOS this method uses internal implementation of the player and is able to play the item from the beginning immediately. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. + */ + replayAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isLooping: value })`. */ + setIsLoopingAsync( + /** A boolean describing if the media should play once (`false`) or loop indefinitely (`true`). */ + isLooping: boolean + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ isMuted: value })`. */ + setIsMutedAsync( + /** A boolean describing if the audio of this media should be muted. */ + isMuted: boolean + ): Promise; + + /** + * Sets a function to be called regularly with the `PlaybackStatus` of the `playbackObject`. See below for details on `PlaybackStatus` and an example use case of this function. + * + * `onPlaybackStatusUpdate` will be called whenever a call to the API for this `playbackObject` completes (such as `setStatusAsync()`, `getStatusAsync()`, or `unloadAsync()`), and will also be called at regular intervals while the media is in the loaded state. Set `progressUpdateIntervalMillis` via `setStatusAsync()` or `setProgressUpdateIntervalAsync()` to modify the interval with which `onPlaybackStatusUpdate` is called while loaded. + */ + setOnPlaybackStatusUpdate( + /** A function taking a single parameter `PlaybackStatus`. */ + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void + ): void; + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis })`. */ + setPositionAsync( + positionMillis: number, + + /** This is equivalent to `playbackObject.setStatusAsync({ positionMillis: millis, seekMillisToleranceBefore: toleranceMillisBefore, seekMillisToleranceAfter: toleranceMillisAfter })`. The tolerances are used only on iOS. */ + tolerances?: { + toleranceMillisBefore: number, + toleranceMillisAfter: number + } + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ progressUpdateIntervalMillis: millis })`. */ + setProgressUpdateIntervalAsync( + /** The new minimum interval in milliseconds between calls of `onPlaybackStatusUpdate`. */ + progressUpdateIntervalMillis: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ rate: value, shouldCorrectPitch: shouldCorrectPitch })`. */ + setRateAsync( + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate: number, + + /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ + shouldCorrectPitch: boolean + ): Promise; + + /** Sets a new `PlaybackStatusToSet` on the `playbackObject`. This method can only be called if the media has been loaded. Return a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once the new status has been set successfully, or rejects if setting the new status failed. */ + setStatusAsync( + /** The new `PlaybackStatusToSet` of the `playbackObject`, whose values will override the current playback status. */ + status: PlaybackStatusToSet + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ volume: value })`. */ + setVolumeAsync( + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume: number + ): Promise; + + /** This is equivalent to `playbackObject.setStatusAsync({ shouldPlay: false, positionMillis: 0 })`. */ + stopAsync(): Promise; + + /** + * Unloads the media from memory. `loadAsync()` must be called again in order to be able to play the media. + * + * Returns a `Promise` that is fulfilled with the `PlaybackStatus` of the `playbackObject` once it is unloaded, or rejects if unloading failed. See below for details on `PlaybackStatus`. + */ + unloadAsync(): Promise; +} +// #endregion + +// #region BarCodeScanner +/** + * BarCodeScanner + */ +export interface BarCodeScannerProps extends ViewProps { + type?: 'front' | 'back'; + torchMode?: 'on' | 'off'; + barCodeTypes?: string[]; + onBarCodeRead?: BarCodeReadCallback; +} + +export class BarCodeScanner extends Component { + static Constants: { + TorchMode: { + on: string; + off: string + } + } & CameraConstants; +} +// #endregion + +// #region BlurView +/** + * BlurView + */ +export interface BlurViewProps extends ViewProps { + tint: 'light' | 'default' | 'dark'; + intensity: number; +} +export class BlurView extends Component { } +// #endregion + +/** + * Brightness + */ +export namespace Brightness { + function setBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; + function getBrightnessAsync(): Promise; + function getSystemBrightnessAsync(): Promise; + function setSystemBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; +} + +// #region Camera +/** + * Camera + */ +export interface PictureOptions { + quality?: number; +} + +export interface PictureResponse { + uri: string; + width: number; + height: number; + exif: string; + base64: string; +} + +export interface RecordingOptions { + quality?: string | number; + maxDuration?: number; + maxFileSize?: number; +} + +export class CameraObject { + takePictureAsync(options: PictureOptions): Promise; + recordAsync(options: RecordingOptions): Promise<{ uri: string; }>; + stopRecording(): void; + getSupportedRatiosAsync(): Promise; // Android only +} + +export interface CameraProps extends ViewProps { + zoom?: FloatFromZeroToOne; + ratio?: string; + focusDepth?: FloatFromZeroToOne; + type?: string | number; + onCameraReady?: () => void; + onBarCodeRead?: BarCodeReadCallback; + faceDetectionMode?: number; + flashMode?: string | number; + barCodeTypes?: Array; + whiteBalance?: string | number; + faceDetectionLandmarks?: number; + autoFocus?: string | number | boolean; + faceDetectionClassifications?: number; + onMountError?: () => void; + onFacesDetected?: (options: { faces: TrackedFaceFeature[] }) => void; + ref?: Ref; +} + +export interface CameraConstants { + readonly Type: string; + readonly FlashMode: string; + readonly AutoFocus: string; + readonly WhiteBalance: string; + readonly VideoQuality: string; + readonly BarCodeType: { + aztec: string; + codabar: string; + code39: string; + code93: string; + code128: string; + code138: string; + code39mod43: string; + datamatrix: string; + ean13: string; + ean8: string; + interleaved2of5: string; + itf14: string; + maxicode: string; + pdf417: string; + rss14: string; + rssexpanded: string; + upc_a: string; + upc_e: string; + upc_ean: string; + qr: string; + }; +} + +export class Camera extends Component { + static readonly Constants: CameraConstants; +} +// #endregion + +/** + * Constants + */ +export namespace Constants { + const appOwnership: 'expo' | 'standalone' | 'guest'; + const expoVersion: string; + const deviceId: string; + const deviceName: string; + const deviceYearClass: number; + const isDevice: boolean; + + interface Platform { + ios?: { + platform: string; + model: string; + userInterfaceIdiom: string; + buildNumber: string; + }; + android?: { + versionCode: string; + }; + } + const platform: Platform; + const sessionId: string; + const statusBarHeight: number; + const systemFonts: string[]; + + interface Manifest { + name: string; + description?: string; + slug?: string; + sdkVersion?: string; + version?: string; + orientation?: Orientation; + primaryColor?: string; + privacy?: 'public' | 'unlisted'; + scheme?: string; + icon?: string; + platforms?: string[]; + githubUrl?: string; + notification?: { + icon?: string, + color?: string, + androidMode?: 'default' | 'collapse', + androidCollapsedTitle?: string + }; + loading?: { + icon?: string, + exponentIconColor?: 'white' | 'blue', + exponentIconGrayscale?: 1 | 0, + backgroundImage?: string, + backgroundColor?: string, + hideExponentText?: boolean + }; + appKey?: string; + androidStatusBar?: { + barStyle?: 'lignt-content' | 'dark-content', + backgroundColor?: string + }; + androidShowExponentNotificationInShellApp?: boolean; + extra?: { + [propName: string]: any + }; + rnCliPath?: any; + entryPoint?: string; + packagerOpts?: { + hostType?: string, + dev?: boolean, + strict?: boolean, + minify?: boolean, + urlType?: string, + urlRandomness?: string, + lanType?: string, + [propName: string]: any + }; + ignoreNodeModulesValidation?: any; + nodeModulesPath?: string; + ios?: { + bundleIdentifier?: string, + buildNumber?: string, + config?: { + usesNonExemptEncryption?: boolean, + googleSignIn?: { + reservedClientId: string + } + }, + supportsTablet?: boolean, + infoPlist?: any + }; + android?: { + package?: string, + versionCode?: string, + config?: { + fabric?: { + apiKey: string, + buildSecret: string + }, + googleMaps?: { + apiKey: string + }, + googleSignIn?: { + apiKey: string, + certificateHash: string + } + } + }; + facebookScheme?: any; + facebookAppId?: string; + facebookDisplayName?: string; + splash?: { + backgroundColor?: string; + resizeMode?: ResizeModeContain | ResizeModeCover; + image?: string; + }; + assetBundlePatterns?: string[]; + releaseChannel: string; + [propName: string]: any; + } + const manifest: Manifest; + const linkingUri: string; +} + +/** + * Contacts + */ +export namespace Contacts { + type PhoneNumbers = 'phoneNumbers'; + type Emails = 'emails'; + type Addresses = 'addresses'; + type Image = 'image'; + type Thumbnail = 'thumbnail'; + type Note = 'note'; + type Birthday = 'birthday'; + type NonGregorianBirthday = 'nonGregorianBirthday'; + type NamePrefix = 'namePrefix'; + type NameSuffix = 'nameSuffix'; + type PhoneticFirstName = 'phoneticFirstName'; + type PhoneticMiddleName = 'phoneticMiddleName'; + type PhoneticLastName = 'phoneticLastName'; + type SocialProfiles = 'socialProfiles'; + type InstantMessageAddresses = 'instantMessageAddresses'; + type UrlAddresses = 'urlAddresses'; + type Dates = 'dates'; + type Relationships = 'relationships'; + + const PHONE_NUMBERS: PhoneNumbers; + const EMAILS: Emails; + const ADDRESSES: Addresses; + const IMAGE: Image; + const THUMBNAIL: Thumbnail; + const NOTE: Note; + const BIRTHDAY: Birthday; + const NON_GREGORIAN_BIRTHDAY: NonGregorianBirthday; + const NAME_PREFIX: NamePrefix; + const NAME_SUFFIX: NameSuffix; + const PHONETIC_FIRST_NAME: PhoneticFirstName; + const PHONETIC_MIDDLE_NAME: PhoneticMiddleName; + const PHONETIC_LAST_NAME: PhoneticLastName; + const SOCIAL_PROFILES: SocialProfiles; + const IM_ADDRESSES: InstantMessageAddresses; + const URLS: UrlAddresses; + const DATES: Dates; + const RELATIONSHIPS: Relationships; + + type FieldType = PhoneNumbers | Emails | Addresses | Image | Thumbnail | + Note | Birthday | NonGregorianBirthday | NamePrefix | NameSuffix | + PhoneticFirstName | PhoneticMiddleName | PhoneticLastName | SocialProfiles | + InstantMessageAddresses | UrlAddresses | Dates | Relationships; + + interface Options { + pageSize?: number; + pageOffset?: number; + fields?: FieldType[]; + } + + interface Contact { + id: string; + contactType: string; + name: string; + firstName?: string; + middleName?: string; + lastName?: string; + previousLastName?: string; + namePrefix?: string; + nameSuffix?: string; + nickname?: string; + phoneticFirstName?: string; + phoneticMiddleName?: string; + phoneticLastName?: string; + emails?: Array<{ + email?: string; + primary?: boolean; + label: string; + id: string; + }>; + phoneNumbers?: Array<{ + number?: string; + primary?: boolean; + digits?: string; + countryCode?: string; + label: string; + id: string; + }>; + addresses?: Array<{ + street?: string; + city?: string; + country?: string; + region?: string; + neighborhood?: string; + postalCode?: string; + poBox?: string; + isoCountryCode?: string; + label: string; + id: string; + }>; + socialProfiles?: Array<{ + service?: string; + localizedProfile?: string; + url?: string; + username?: string; + userId?: string; + label: string; + id: string; + }>; + instantMessageAddresses?: Array<{ + service?: string; + username?: string; + localizedService?: string; + label: string; + id: string; + }>; + urls?: { + label: string; + url?: string; + id: string; + }; + company?: string; + jobTitle?: string; + department?: string; + imageAvailable?: boolean; + image?: { + uri?: string; + }; + thumbnail?: { + uri?: string; + }; + note?: string; + dates?: Array<{ + day?: number; + month?: number; + year?: number; + id: string; + label: string; + }>; + relationships?: Array<{ + label: string; + name?: string; + id: string; + }>; + } + + interface Response { + data: Contact[]; + total: number; + hasNextPage: boolean; + hasPreviousPage: boolean; + } + + function getContactsAsync(options: Options): Promise; + function getContactByIdAsync(options: { id?: string; fields?: FieldType[] }): Promise; +} + +/** + * DocumentPicker + */ +export namespace DocumentPicker { + interface Options { + type?: string; + } + + type Response = { + type: 'success'; + uri: string; + name: string; + size: number; + } | { + type: 'cancel'; + }; + + function getDocumentAsync(options?: Options): Promise; +} + +/** + * ErrorRecovery + */ +export namespace ErrorRecovery { + function setRecoveryProps(props: HashMap): void; +} + +/** + * Facebook + */ +export namespace Facebook { + interface Options { + permissions?: string[]; + behavior?: 'web' | 'native' | 'browser' | 'system'; + } + interface Response { + type: 'cancel' | 'success'; + token?: string; + expires?: number; + } + function logInWithReadPermissionsAsync(appId: string, options?: Options): Promise; +} + +/** + * Facebook Ads + */ +export namespace FacebookAds { + /** + * Interstitial Ads + */ + namespace InterstitialAdManager { + function showAd(placementId: string): Promise; + } + + /** + * Native Ads + */ + type MediaCachePolicy = 'none' | 'icon' | 'image' | 'all'; + class NativeAdsManager { + constructor(placementId: string, numberOfAdsToRequest?: number); + disableAutoRefresh(): void; + setMediaCachePolicy(cachePolicy: MediaCachePolicy): void; + } + + function withNativeAd(component: Component<{ + icon?: string; + coverImage?: string; + title?: string; + subtitle?: string; + description?: string; + callToActionText?: string; + socialContext?: string; + }>): Component<{ adsManager: NativeAdsManager }, { ad: any, canRequestAds: boolean }>; + + /** + * Banner View + */ + type AdType = 'large' | 'rectangle' | 'standard'; + + interface BannerViewProps { + type: AdType; + placementId: string; + onPress: () => void; + onError: () => void; + } + + class BannerView extends Component { } + + /** + * Ad Settings + */ + namespace AdSettings { + const currentDeviceHash: string; + function addTestDevice(device: string): void; + function clearTestDevices(): void; + type SDKLogLevel = 'none' | 'debug' | 'verbose' | 'warning' | 'error' | 'notification'; + function setLogLevel(logLevel: SDKLogLevel): void; + function setIsChildDirected(isDirected: boolean): void; + function setMediationService(mediationService: string): void; + function setUrlPrefix(urlPrefix: string): void; + } +} + +/** + * FaceDetector + */ +export interface Point { + x: Axis; + y: Axis; +} + +export interface FaceFeature { + bounds: { + size: { + width: number; + height: number; + }, + origin: Point; + }; + smilingProbability?: number; + leftEarPosition?: Point; + rightEarPosition?: Point; + leftEyePosition?: Point; + leftEyeOpenProbability?: number; + rightEyePosition?: Point; + rightEyeOpenProbability?: number; + leftCheekPosition?: Point; + rightCheekPosition?: Point; + leftMouthPosition?: Point; + mouthPosition?: Point; + rightMouthPosition?: Point; + bottomMouthPosition?: Point; + noseBasePosition?: Point; + yawAngle?: number; + rollAngle?: number; +} + +export interface TrackedFaceFeature extends FaceFeature { + faceID?: number; +} + +export namespace FaceDetector { + interface DetectFaceResult { + faces: FaceFeature[]; + image: { + uri: string; + width: number; + height: number; + orientation: number; + }; + } + interface Mode { + fast: 'fast'; + accurate: 'accurate'; + } + interface _Shared { + all: 'all'; + none: 'none'; + } + type Landmarks = _Shared; + type Classifications = _Shared; + interface _Constants { + Mode: Mode; + Landmarks: Landmarks; + Classifications: Classifications; + } + + const Constants: _Constants; + + interface DetectionOptions { + mode?: keyof Mode; + detectLandmarks?: keyof Landmarks; + runClassifications?: keyof Classifications; + } + + function detectFaces(uri: string, options?: DetectionOptions): Promise; +} +/** + * FileSystem + */ +export namespace FileSystem { + type FileInfo = { + exists: true; + isDirectory: boolean; + uri: string; + size: number; + modificationTime: number; + md5?: Md5; + } | { + exists: false; + isDirectory: false; + }; + + interface DownloadResult { + uri: string; + status: number; + headers: { [name: string]: string }; + md5?: Md5; + } + + const documentDirectory: string; + const cacheDirectory: string; + + function getInfoAsync(fileUri: string, options?: { md5?: string, size?: boolean; }): Promise; + function readAsStringAsync(fileUri: string): Promise; + function writeAsStringAsync(fileUri: string, contents: string): Promise; + function deleteAsync(fileUri: string, options?: { idempotent: boolean; }): Promise; + function moveAsync(options: { from: string, to: string; }): Promise; + function copyAsync(options: { from: string, to: string; }): Promise; + function makeDirectoryAsync(dirUri: string, options?: { intermediates: boolean }): Promise; + function readDirectoryAsync(dirUri: string): Promise; + function downloadAsync(uri: string, fileUri: string, options?: { md5?: boolean; }): Promise; + function createDownloadResumable( + uri: string, + fileUri: string, + options?: DownloadOptions, + callback?: (totalBytesWritten: number, totalBytesExpectedToWrite: number) => void, + resumeData?: string | null + ): DownloadResumable; + + interface PauseResult { + url: string; + fileUri: string; + options: { md5: boolean; }; + resumeData: string; + } + + interface DownloadOptions { + md5?: boolean; + headers?: { [name: string]: string }; + } + + interface DownloadProgressData { + totalBytesWritten: number; + totalBytesExpectedToWrite: number; + } + + type DownloadProgressCallback = (data: DownloadProgressData) => void; + + class DownloadResumable { + constructor( + url: string, + fileUri: string, + options: DownloadOptions, + callback?: DownloadProgressCallback, + resumeData?: string + ); + + downloadAsync(): Promise; + pauseAsync(): Promise; + resumeAsync(): Promise; + savable(): PauseResult; + } +} + +/** Use TouchID/FaceID (iOS) or the Fingerprint API (Android) to authenticate the user with a fingerprint scan. */ +export namespace Fingerprint { + type FingerprintAuthenticationResult = { + success: true + } | { + success: false, + + /** Error code in the case where authentication fails. */ + error: string + }; + + /** Determine whether the Fingerprint scanner is available on the device. */ + function hasHardwareAsync(): Promise; + + /** Determine whether the device has saved fingerprints to use for authentication. */ + function isEnrolledAsync(): Promise; + + /** + * Attempts to authenticate via Fingerprint. Android: When using the fingerprint module on Android, you need to provide a UI component to prompt the user to scan their fingerprint, as the OS has no default alert for it. + * + * @param promptMessage A message that is shown alongside the TouchID/FaceID prompt. (iOS only) + */ + function authenticateAsync(promptMessageIOS?: string): Promise; + + /** Cancels the fingerprint authentication flow. (Android only) */ + function cancelAuthenticate(): void; +} + +/** + * Font + */ +export namespace Font { + interface FontMap { + [name: string]: RequireSource; + } + + function loadAsync(name: string, url: string): Promise; + function loadAsync(map: FontMap): Promise; +} + +// #region GLView +/** + * GLView + */ +export interface GLViewProps extends ViewProps { + onContextCreate(): void; + msaaSamples: number; +} + +export class GLView extends Component { } +// #endregion + +/** + * Google + */ +export namespace Google { + interface LogInConfig { + androidClientId?: string; + androidStandaloneAppClientId?: string; + iosClientId?: string; + iosStandaloneAppClientId?: string; + webClientId?: string; + behavior?: 'system' | 'web'; + scopes?: string[]; + } + + type LogInResult = { + type: 'cancel'; + } | { + type: 'success'; + accessToken: string; + idToken?: string; + refreshToken?: string; + serverAuthCode?: string; + user: { + id: string; + name: string; + givenName: string; + familyName: string; + photoUrl?: string; + email?: string; + } + }; + + function logInAsync(config: LogInConfig): Promise; +} + +/** Access the device gyroscope sensor to respond to changes in rotation in 3d space. */ +export namespace Gyroscope { + interface GyroscopeObject { + x: Axis; + y: Axis; + z: Axis; + } + + /** A callback that is invoked when an gyroscope update is available. */ + function addListener(listener: (obj: GyroscopeObject) => any): EventSubscription; + + /** Remove all listeners. */ + function removeAllListeners(): void; + + /** Subscribe for updates to the gyroscope. */ + function setUpdateInterval(intervalMs: number): void; +} + +/** + * ImageManipulator + */ +export namespace ImageManipulator { + interface ImageResult { + uri: string; + width: number; + height: number; + base64?: string; + } + + interface SaveOptions { + base64?: boolean; + compress?: FloatFromZeroToOne; + format?: 'jpeg' | 'png'; + } + + interface CropParameters { + originX: number; + originY: number; + width: number; + height: number; + } + + interface ImageManipulationOptions { + resize?: { width?: number; height?: number }; + rotate?: number; + flip?: { vertical?: boolean; horizontal?: boolean }; + crop?: CropParameters; + } + + function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; +} + +/** + * Image Picker + */ +export namespace ImagePicker { + interface ImageInfo { + uri: string; + width: number; + height: number; + type: 'video' | 'image'; + base64?: string; + exif?: object; + duration?: number; + } + + type ImageResult = { cancelled: true } | ({ cancelled: false } & ImageInfo); + + interface _MediaTypeOptions { + All: 'All'; + Videos: 'Videos'; + Images: 'Images'; + } + + const MediaTypeOptions: _MediaTypeOptions; + + interface ImageLibraryOptions { + allowsEditing?: boolean; + aspect?: [number, number]; + quality?: number; + base64?: boolean; + exif?: boolean; + mediaTypes?: keyof _MediaTypeOptions; + } + + function launchImageLibraryAsync(options?: ImageLibraryOptions): Promise; + + interface CameraOptions { + allowsEditing?: boolean; + aspect?: [number, number]; + quality?: number; + } + + function launchCameraAsync(options?: CameraOptions): Promise; +} + +/** + * IntentLauncherAndroid + */ +export namespace IntentLauncherAndroid { + const ACTION_ACCESSIBILITY_SETTINGS: 'android.settings.ACCESSIBILITY_SETTINGS'; + const ACTION_APP_NOTIFICATION_REDACTION: 'android.settings.ACTION_APP_NOTIFICATION_REDACTION'; + const ACTION_CONDITION_PROVIDER_SETTINGS: 'android.settings.ACTION_CONDITION_PROVIDER_SETTINGS'; + const ACTION_NOTIFICATION_LISTENER_SETTINGS: 'android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS'; + const ACTION_PRINT_SETTINGS: 'android.settings.ACTION_PRINT_SETTINGS'; + const ACTION_ADD_ACCOUNT_SETTINGS: 'android.settings.ADD_ACCOUNT_SETTINGS'; + const ACTION_AIRPLANE_MODE_SETTINGS: 'android.settings.AIRPLANE_MODE_SETTINGS'; + const ACTION_APN_SETTINGS: 'android.settings.APN_SETTINGS'; + const ACTION_APPLICATION_DETAILS_SETTINGS: 'android.settings.APPLICATION_DETAILS_SETTINGS'; + const ACTION_APPLICATION_DEVELOPMENT_SETTINGS: 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS'; + const ACTION_APPLICATION_SETTINGS: 'android.settings.APPLICATION_SETTINGS'; + const ACTION_APP_NOTIFICATION_SETTINGS: 'android.settings.APP_NOTIFICATION_SETTINGS'; + const ACTION_APP_OPS_SETTINGS: 'android.settings.APP_OPS_SETTINGS'; + const ACTION_BATTERY_SAVER_SETTINGS: 'android.settings.BATTERY_SAVER_SETTINGS'; + const ACTION_BLUETOOTH_SETTINGS: 'android.settings.BLUETOOTH_SETTINGS'; + const ACTION_CAPTIONING_SETTINGS: 'android.settings.CAPTIONING_SETTINGS'; + const ACTION_CAST_SETTINGS: 'android.settings.CAST_SETTINGS'; + const ACTION_DATA_ROAMING_SETTINGS: 'android.settings.DATA_ROAMING_SETTINGS'; + const ACTION_DATE_SETTINGS: 'android.settings.DATE_SETTINGS'; + const ACTION_DEVICE_INFO_SETTINGS: 'android.settings.DEVICE_INFO_SETTINGS'; + const ACTION_DEVICE_NAME: 'android.settings.DEVICE_NAME'; + const ACTION_DISPLAY_SETTINGS: 'android.settings.DISPLAY_SETTINGS'; + const ACTION_DREAM_SETTINGS: 'android.settings.DREAM_SETTINGS'; + const ACTION_HARD_KEYBOARD_SETTINGS: 'android.settings.HARD_KEYBOARD_SETTINGS'; + const ACTION_HOME_SETTINGS: 'android.settings.HOME_SETTINGS'; + const ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS: 'android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS'; + const ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS: 'android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS'; + const ACTION_INPUT_METHOD_SETTINGS: 'android.settings.INPUT_METHOD_SETTINGS'; + const ACTION_INPUT_METHOD_SUBTYPE_SETTINGS: 'android.settings.INPUT_METHOD_SUBTYPE_SETTINGS'; + const ACTION_INTERNAL_STORAGE_SETTINGS: 'android.settings.INTERNAL_STORAGE_SETTINGS'; + const ACTION_LOCALE_SETTINGS: 'android.settings.LOCALE_SETTINGS'; + const ACTION_LOCATION_SOURCE_SETTINGS: 'android.settings.LOCATION_SOURCE_SETTINGS'; + const ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS: 'android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS'; + const ACTION_MANAGE_APPLICATIONS_SETTINGS: 'android.settings.MANAGE_APPLICATIONS_SETTINGS'; + const ACTION_MANAGE_DEFAULT_APPS_SETTINGS: 'android.settings.MANAGE_DEFAULT_APPS_SETTINGS'; + const ACTION_MEMORY_CARD_SETTINGS: 'android.settings.MEMORY_CARD_SETTINGS'; + const ACTION_MONITORING_CERT_INFO: 'android.settings.MONITORING_CERT_INFO'; + const ACTION_NETWORK_OPERATOR_SETTINGS: 'android.settings.NETWORK_OPERATOR_SETTINGS'; + const ACTION_NFCSHARING_SETTINGS: 'android.settings.NFCSHARING_SETTINGS'; + const ACTION_NFC_PAYMENT_SETTINGS: 'android.settings.NFC_PAYMENT_SETTINGS'; + const ACTION_NFC_SETTINGS: 'android.settings.NFC_SETTINGS'; + const ACTION_NIGHT_DISPLAY_SETTINGS: 'android.settings.NIGHT_DISPLAY_SETTINGS'; + const ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS: 'android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS'; + const ACTION_NOTIFICATION_SETTINGS: 'android.settings.NOTIFICATION_SETTINGS'; + const ACTION_PAIRING_SETTINGS: 'android.settings.PAIRING_SETTINGS'; + const ACTION_PRIVACY_SETTINGS: 'android.settings.PRIVACY_SETTINGS'; + const ACTION_QUICK_LAUNCH_SETTINGS: 'android.settings.QUICK_LAUNCH_SETTINGS'; + const ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: 'android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS'; + const ACTION_SECURITY_SETTINGS: 'android.settings.SECURITY_SETTINGS'; + const ACTION_SETTINGS: 'android.settings.SETTINGS'; + const ACTION_SHOW_ADMIN_SUPPORT_DETAILS: 'android.settings.SHOW_ADMIN_SUPPORT_DETAILS'; + const ACTION_SHOW_INPUT_METHOD_PICKER: 'android.settings.SHOW_INPUT_METHOD_PICKER'; + const ACTION_SHOW_REGULATORY_INFO: 'android.settings.SHOW_REGULATORY_INFO'; + const ACTION_SHOW_REMOTE_BUGREPORT_DIALOG: 'android.settings.SHOW_REMOTE_BUGREPORT_DIALOG'; + const ACTION_SOUND_SETTINGS: 'android.settings.SOUND_SETTINGS'; + const ACTION_STORAGE_MANAGER_SETTINGS: 'android.settings.STORAGE_MANAGER_SETTINGS'; + const ACTION_SYNC_SETTINGS: 'android.settings.SYNC_SETTINGS'; + const ACTION_SYSTEM_UPDATE_SETTINGS: 'android.settings.SYSTEM_UPDATE_SETTINGS'; + const ACTION_TETHER_PROVISIONING_UI: 'android.settings.TETHER_PROVISIONING_UI'; + const ACTION_TRUSTED_CREDENTIALS_USER: 'android.settings.TRUSTED_CREDENTIALS_USER'; + const ACTION_USAGE_ACCESS_SETTINGS: 'android.settings.USAGE_ACCESS_SETTINGS'; + const ACTION_USER_DICTIONARY_INSERT: 'android.settings.USER_DICTIONARY_INSERT'; + const ACTION_USER_DICTIONARY_SETTINGS: 'android.settings.USER_DICTIONARY_SETTINGS'; + const ACTION_USER_SETTINGS: 'android.settings.USER_SETTINGS'; + const ACTION_VOICE_CONTROL_AIRPLANE_MODE: 'android.settings.VOICE_CONTROL_AIRPLANE_MODE'; + const ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE: 'android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE'; + const ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE: 'android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE'; + const ACTION_VOICE_INPUT_SETTINGS: 'android.settings.VOICE_INPUT_SETTINGS'; + const ACTION_VPN_SETTINGS: 'android.settings.VPN_SETTINGS'; + const ACTION_VR_LISTENER_SETTINGS: 'android.settings.VR_LISTENER_SETTINGS'; + const ACTION_WEBVIEW_SETTINGS: 'android.settings.WEBVIEW_SETTINGS'; + const ACTION_WIFI_IP_SETTINGS: 'android.settings.WIFI_IP_SETTINGS'; + const ACTION_WIFI_SETTINGS: 'android.settings.WIFI_SETTINGS'; + const ACTION_WIRELESS_SETTINGS: 'android.settings.WIRELESS_SETTINGS'; + const ACTION_ZEN_MODE_AUTOMATION_SETTINGS: 'android.settings.ZEN_MODE_AUTOMATION_SETTINGS'; + const ACTION_ZEN_MODE_EVENT_RULE_SETTINGS: 'android.settings.ZEN_MODE_EVENT_RULE_SETTINGS'; + const ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS: 'android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS'; + const ACTION_ZEN_MODE_PRIORITY_SETTINGS: 'android.settings.ZEN_MODE_PRIORITY_SETTINGS'; + const ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS: 'android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS'; + const ACTION_ZEN_MODE_SETTINGS: 'android.settings.ZEN_MODE_SETTINGS'; + + function startActivityAsync(activity: string, data?: HashMap): Promise; +} + +/** + * KeepAwake + */ +export class KeepAwake extends Component { + static activate(): void; + static deactivate(): void; +} + +// #region LinearGradient +/** + * LinearGradient + */ +export interface LinearGradientProps { + colors: string[]; + start?: [number, number]; + end?: [number, number]; + locations?: number[]; + style?: StyleProp; +} + +export class LinearGradient extends Component { } +// #endregion + +/** + * Location + */ +export namespace Location { + interface LocationOptions { + enableHighAccuracy?: boolean; + timeInterval?: number; + distanceInterval?: number; + } + + interface LocationProps { + latitude: number; + longitude: number; + } + + interface Coords extends LocationProps { + altitude: number; + accuracy: number; + } + + interface LocationData { + coords: { + heading: number; + speed: number + } & Coords; + timestamp: number; + } + + interface ProviderStatus { + locationServicesEnabled: boolean; + gpsAvailable?: boolean; + networkAvailable?: boolean; + passiveAvailable?: boolean; + } + + interface HeadingStatus { + magHeading: number; + trueHeading: number; + accuracy: number; + } + + interface GeocodeData { + city: string; + street: string; + region: string; + postalCode: string; + country: string; + name: string; + } + + type LocationCallback = (data: LocationData) => void; + + function getCurrentPositionAsync(options: LocationOptions): Promise; + function watchPositionAsync(options: LocationOptions, callback: LocationCallback): EventSubscription; + function getProviderStatusAsync(): Promise; + function getHeadingAsync(): Promise; + function watchHeadingAsync(callback: (status: HeadingStatus) => void): EventSubscription; + function geocodeAsync(address: string): Promise; + function reverseGeocodeAsync(location: LocationProps): Promise; + function setApiKey(key: string): void; +} + +/** + * Magnetometer + */ +export namespace Magnetometer { + interface MagnetometerObject { + x: Axis; + y: Axis; + z: Axis; + } + + function addListener(listener: (obj: MagnetometerObject) => any): EventSubscription; + function removeAllListeners(): void; + function setUpdateInterval(intervalMs: number): void; +} + +/** + * Notifications + */ +export namespace Notifications { + interface Notification { + origin: 'selected' | 'received'; + data: any; + remote: boolean; + isMultiple: boolean; + } + + interface LocalNotification { + title: string; + body?: string; + data?: any; + ios?: { + sound?: boolean + }; + android?: { + sound?: boolean; + icon?: string; + color?: string; + priority?: 'min' | 'low' | 'high' | 'max'; + sticky?: boolean; + vibrate?: boolean | number[]; + link?: string; + }; + } + + type LocalNotificationId = string | number; + + function addListener(listener: (notification: Notification) => any): EventSubscription; + function getExpoPushTokenAsync(): Promise; + function presentLocalNotificationAsync(localNotification: LocalNotification): Promise; + function scheduleLocalNotificationAsync( + localNotification: LocalNotification, + schedulingOptions: { time: Date | number, repeat?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year' } + ): Promise; + function dismissNotificationAsync(localNotificationId: LocalNotificationId): Promise; + function dismissAllNotificationsAsync(): Promise; + function cancelScheduledNotificationAsync(localNotificationId: LocalNotificationId): Promise; + function cancelAllScheduledNotificationsAsync(): Promise; + function getBadgeNumberAsync(): Promise; + function setBadgeNumberAsync(number: number): Promise; +} + +/** + * Pedometer + */ +export namespace Pedometer { + function isAvailableAsync(): Promise; + function getStepCountAsync(start: Date, end: Date): Promise<{ steps: number; }>; + function watchStepCount(callback: (params: { steps: number; }) => void): EventSubscription; +} + +/** + * Permissions + */ +export namespace Permissions { + type PermissionType = 'remoteNotifications' | 'location' | + 'camera' | 'contacts' | 'audioRecording' | 'calendar'; + type PermissionStatus = 'undetermined' | 'granted' | 'denied'; + type PermissionExpires = 'never'; + + interface PermissionDetailsLocationIOS { + scope: 'whenInUse' | 'always'; + } + + interface PermissionDetailsLocationAndroid { + scope: 'fine' | 'coarse' | 'none'; + } + + interface PermissionResponse { + status: PermissionStatus; + expires: PermissionExpires; + ios?: PermissionDetailsLocationIOS; + android?: PermissionDetailsLocationAndroid; + } + + function getAsync(type: PermissionType): Promise; + function askAsync(type: PermissionType): Promise; + + type RemoteNotificationPermission = 'remoteNotifications'; + + const CAMERA: 'camera'; + const CAMERA_ROLL: 'cameraRoll'; + const AUDIO_RECORDING: 'audioRecording'; + const LOCATION: 'location'; + const REMOTE_NOTIFICATIONS: RemoteNotificationPermission; + const NOTIFICATIONS: RemoteNotificationPermission; + const CONTACTS: 'contacts'; + const SYSTEM_BRIGHTNESS: 'systemBrightness'; + const CALENDAR: 'calendar'; +} + +/** + * Register Root Component + */ +export function registerRootComponent(component: ComponentType): void; + +/** + * ScreenOrientation + */ +export namespace ScreenOrientation { + interface Orientations { + ALL: 'ALL'; + ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN'; + PORTRAIT: 'PORTRAIT'; + PORTRAIT_UP: 'PORTRAIT_UP'; + PORTRAIT_DOWN: 'PORTRAIT_DOWN'; + LANDSCAPE: 'LANDSCAPE'; + LANDSCAPE_LEFT: 'LANDSCAPE_LEFT'; + LANDSCAPE_RIGHT: 'LANDSCAPE_RIGHT'; + } + + const Orientation: Orientations; + + function allow(orientation: keyof Orientations): void; +} + +/** + * SecureStore + */ +export namespace SecureStore { + interface SecureStoreOptions { + keychainService?: string; + keychainAccessible?: number; + } + + function setItemAsync(key: string, value: string, options?: SecureStoreOptions): Promise; + function getItemAsync(key: string, options?: SecureStoreOptions): Promise; + function deleteItemAsync(key: string, options?: SecureStoreOptions): Promise; +} + +/** + * Segment + */ +export namespace Segment { + function initialize(keys: { + androidWriteKey: string; + iosWriteKey: string; + }): void; + function identify(userId: string): void; + function identifyWithTraits(userId: string, traits: object): void; + function track(event: string): void; + function reset(): void; + function trackWithProperties(event: string, properties: object): void; + function screen(screenName: string): void; + function screenWithProperties(screenName: string, properties: object): void; + function flush(): void; +} + +/** + * Speech + */ +export namespace Speech { + interface SpeechOptions { + language?: string; + pitch?: number; + rate?: number; + onStart?: () => void; + onStopped?: () => void; + onDone?: () => void; + onError?: (error: string) => void; + } + + function speak(text: string, options?: SpeechOptions): void; + function stop(): void; + function isSpeakingAsync(): Promise; + + /** Available on iOS only */ + function pause(): void; + + /** Available on iOS only */ + function resume(): void; +} + +/** + * SQLite + */ +export namespace SQLite { + type Error = any; + + interface Database { + transaction( + callback: (transaction: Transaction) => any, + error?: (error: Error) => any, // TODO def of error + success?: () => any + ): void; + } + + interface Transaction { + executeSql( + sqlStatement: string, + arguments?: string[] | number[], + success?: (transaction: Transaction, resultSet: ResultSet) => any, + error?: (transaction: Transaction, error: Error) => any + ): void; + } + + interface ResultSet { + insertId: number; + rowAffected: number; + rows: { + length: number; + item: (index: number) => any; + _array: HashMap[]; + }; + } + + function openDatabase( + name: string | { + name: string, + version?: string, + description?: string, + size?: number, + callback?: () => any + }, + version?: string, + description?: string, + size?: number, + callback?: () => any + ): any; +} + +// #region Svg +/** + * Svg + */ +export interface SvgCommonProps { + fill?: string; + fillOpacity?: number | string; + fillRule?: 'nonzero' | 'evenodd'; + stroke?: string; + strokeWidth?: number | string; + strokeOpacity?: number | string; + strokeLinecap?: string; + strokeLineJoin?: string; + strokeDasharray?: any[]; + strokeDashoffset?: any; + x?: number | string; + y?: number | string; + rotate?: number | string; + rotation?: number | string; + scale?: number | string; + origin?: number | string; + originX?: number | string; + originY?: number | string; + id?: string; + disabled?: boolean; + onPress?: () => any; + onPressIn?: () => any; + onPressOut?: () => any; + onLongPress?: () => any; + delayPressIn?: number; + delayPressOut?: number; + delayLongPress?: number; +} + +export interface SvgRectProps extends SvgCommonProps { + width: number | string; + height: number | string; +} + +export interface SvgCircleProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + r: number | string; +} + +export interface SvgEllipseProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + rx: number | string; + ry: number | string; +} + +export interface SvgLineProps extends SvgCommonProps { + x1: number | string; + y1: number | string; + x2: number | string; + y2: number | string; +} + +export interface SvgPolyProps extends SvgCommonProps { + points: string; +} + +export interface SvgPathProps extends SvgCommonProps { + d: string; +} + +export interface SvgTextProps extends SvgCommonProps { + textAnchor?: string; + fontSize?: number | string; + fontWeight?: string; +} + +export interface SvgTSpanProps extends SvgTextProps { + dx?: string; + dy?: string; +} + +export interface SvgTextPathProps extends SvgCommonProps { + href?: string; + startOffset?: string; +} + +export interface SvgUseProps extends SvgCommonProps { + href: string; + x: number | string; + y: number | string; +} + +export interface SvgSymbolProps extends SvgCommonProps { + viewBox: string; + width: number | string; + height: number | string; +} + +export interface SvgLinearGradientProps extends SvgCommonProps { + x1: number | string; + x2: number | string; + y1: number | string; + y2: number | string; +} + +export interface SvgRadialGradientProps extends SvgCommonProps { + cx: number | string; + cy: number | string; + rx: number | string; + ry: number | string; + fx: number | string; + fy: number | string; + gradientUnits?: string; +} + +export interface SvgStopProps extends SvgCommonProps { + offset?: string; + stopColor?: string; + stopOpacity?: string; +} + +export class Svg extends Component<{ width: number, height: number }> { + static Circle: ComponentClass; + static ClipPath: ComponentClass; + static Defs: ComponentClass; + static Ellipse: ComponentClass; + static G: ComponentClass; + static Line: ComponentClass; + static LinearGradient: ComponentClass; + static Path: ComponentClass; + static Polygon: ComponentClass; + static Polyline: ComponentClass; + static RadialGradient: ComponentClass; + static Rect: ComponentClass; + static Stop: ComponentClass; + static Symbol: ComponentClass; + static Text: ComponentClass; + static TextPath: ComponentClass; + static TSpan: ComponentClass; + static Use: ComponentClass; +} +// #endregion + +/** + * Take Snapshot + */ +export function takeSnapshotAsync( + view?: (number | React.ReactElement), + options?: { + width?: number, + height?: number, + format?: 'png' | 'jpg' | 'jpeg' | 'webm', + quality?: number, + result?: 'file' | 'base64' | 'data-uri', + } +): Promise; + +/** Helpful utility functions that don’t fit anywhere else, including some localization and internationalization methods. */ +export namespace Util { + /** Returns the current device country code. */ + function getCurrentDeviceCountryAsync(): Promise; + + /** Returns the current device locale as a string. */ + function getCurrentLocaleAsync(): Promise; + + /** Returns the current device time zone name. */ + function getCurrentTimeZoneAsync(): Promise; + + /** Reloads the current experience. This will fetch and load the newest available JavaScript supported by the device’s Expo environment. This is useful for triggering an update of your experience if you have published a new version. */ + function reload(): void; + + /** _Android only_. Invokes a callback when a new version of your app is successfully downloaded in the background. */ + function addNewVersionListenerExperimental(listener: (event: { + manifest: object; + }) => void): { remove(): void; }; +} + +// #region Video +/** + * Expo Video + */ +export interface NaturalSize { + width: number; + height: number; + orientation: Orientation; +} + +export interface ReadyForDisplayEvent { + naturalSize: NaturalSize; + status: PlaybackStatus; +} + +export enum FullscreenUpdateVariants { + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1, + IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2, + IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3 +} + +export interface FullscreenUpdateEvent { + fullscreenUpdate: FullscreenUpdateVariants; + status: PlaybackStatus; +} + +export interface VideoProps { + source?: PlaybackSource | null; + posterSource?: URISource | RequireSource; + + resizeMode?: ResizeModeContain | ResizeModeCover | ResizeModeStretch; + useNativeControls?: boolean; + usePoster?: boolean; + + onPlaybackStatusUpdate?: (status: PlaybackStatus) => void; + onReadyForDisplay?: (event: ReadyForDisplayEvent) => void; + onIOSFullscreenUpdate?: (event: FullscreenUpdateEvent) => void; + + onLoadStart?: () => void; + onLoad?: (status: PlaybackStatus) => void; + onError?: (error: string) => void; + + status?: PlaybackStatusToSet; + progressUpdateIntervalMillis?: number; + positionMillis?: number; + shouldPlay?: boolean; + rate?: number; + shouldCorrectPitch?: boolean; + volume?: number; + isMuted?: boolean; + isLooping?: boolean; + + scaleX?: number; + scaleY?: number; + translateX?: number; + translateY?: number; + rotation?: number; + ref?: Ref; +} + +export interface VideoState { + showPoster: boolean; +} + +export class Video extends Component { + static RESIZE_MODE_CONTAIN: ResizeModeContain; + static RESIZE_MODE_COVER: ResizeModeCover; + static RESIZE_MODE_STRETCH: ResizeModeStretch; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT; + static IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS; + static IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS: FullscreenUpdateVariants.IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS; +} +// #endregion + +/** + * Web Browser + */ +export namespace WebBrowser { + function openBrowserAsync(url: string): Promise<{ type: 'cancelled' | 'dismissed' }>; + function openAuthSessionAsync(url: string, redirectUrl?: string): Promise<{ type: 'cancelled' | 'dismissed' }>; + function dismissBrowser(): Promise<{ type: 'dismissed' }>; +} + +// #region Calendar +/** + * Calendar + * + * Provides an API for interacting with the device’s system calendars, events, reminders, and associated records. + */ +export namespace Calendar { + interface Calendar { + /** Internal ID that represents this calendar on the device */ + id?: string; + + /** Visible name of the calendar */ + title?: string; + + sourceId?: string; // iOS + + /** Object representing the source to be used for the calendar */ + source?: Source; + + /** Type of calendar this object represents */ + type?: CalendarType; // iOS + + /** Color used to display this calendar’s events */ + color?: string; + + /** Whether the calendar is used in the Calendar or Reminders OS app */ + entityType?: EntityTypes; // iOS + + /** Boolean value that determines whether this calendar can be modified */ + allowsModifications?: boolean; + + /** Availability types that this calendar supports */ + allowedAvailabilities?: Availability[]; + + /** Boolean value indicating whether this is the device’s primary calendar */ + isPrimary?: boolean; // Android + + /** Internal system name of the calendar */ + name?: string; // Android + + /** Name for the account that owns this calendar */ + ownerAccount?: string; // Android + + /** Time zone for the calendar */ + timeZone?: string; // Android + + /** Alarm methods that this calendar supports */ + allowedReminders?: AlarmMethod[]; // Android + + /** Attendee types that this calendar supports */ + allowedAttendeeTypes?: AttendeeType[]; // Android + + /** Indicates whether the OS displays events on this calendar */ + isVisible?: boolean; // Android + + /** Indicates whether this calendar is synced and its events stored on the device */ + isSynced?: boolean; // Android + + /** Level of access that the user has for the calendar */ + accessLevel?: CalendarAccessLevel; // Android + } + + interface Source { + /** Internal ID that represents this source on the device */ + id?: string; // iOS only ?? + + /** Type of account that owns this calendar */ + type?: string; + + /** Name for the account that owns this calendar */ + name?: string; + + /** Whether this source is the local phone account */ + isLocalAccount?: boolean; // Android + } + + interface Event { + /** Internal ID that represents this event on the device */ + id?: string; + + /** ID of the calendar that contains this event */ + calendarId?: string; + + /** Visible name of the event */ + title?: string; + + /** Location field of the event */ + location?: string; + + /** Date when the event record was created */ + creationDate?: string; // iOS + + /** Date when the event record was last modified */ + lastModifiedDate?: string; // iOS + + /** Time zone the event is scheduled in */ + timeZone?: string; + + /** Time zone for the event end time */ + endTimeZone?: string; // Android + + /** URL for the event */ + url?: string; // iOS + + /** Description or notes saved with the event */ + notes?: string; + + /** Array of Alarm objects which control automated reminders to the user */ + alarms?: Alarm[]; + + /** Object representing rules for recurring or repeating events. Null for one-time events. */ + recurrenceRule?: RecurrenceRule; + + /** Date object or string representing the time when the event starts */ + startDate?: string; + + /** Date object or string representing the time when the event ends */ + endDate?: string; + + /** For recurring events, the start date for the first (original) instance of the event */ + originalStartDate?: string; // iOS + + /** Boolean value indicating whether or not the event is a detached (modified) instance of a recurring event */ + isDetached?: boolean; // iOS + + /** Whether the event is displayed as an all-day event on the calendar */ + allDay?: boolean; + + /** The availability setting for the event */ + availability?: Availability; // Availability + + /** Status of the event */ + status?: EventStatus; // Status + + /** Organizer of the event, as an Attendee object */ + organizer?: string; // Organizer - iOS + + /** Email address of the organizer of the event */ + organizerEmail?: string; // Android + + /** User’s access level for the event */ + accessLevel?: EventAccessLevel; // Android, + + /** Whether invited guests can modify the details of the event */ + guestsCanModify?: boolean; // Android, + + /** Whether invited guests can invite other guests */ + guestsCanInviteOthers?: boolean; // Android + + /** Whether invited guests can see other guests */ + guestsCanSeeGuests?: boolean; // Android + + /** For detached (modified) instances of recurring events, the ID of the original recurring event */ + originalId?: string; // Android + + /** For instances of recurring events, volatile ID representing this instance; not guaranteed to always refer to the same instance */ + instanceId?: string; // Android + } + + interface Attendee { + /** Internal ID that represents this attendee on the device */ + id?: string; // Android + + /** Indicates whether or not this attendee is the current OS user */ + isCurrentUser?: boolean; // iOS + + /** Displayed name of the attendee */ + name?: string; + + /** Role of the attendee at the event */ + role?: AttendeeRole; + + /** Status of the attendee in relation to the event */ + status?: AttendeeStatus; + + /** Type of the attendee */ + type?: AttendeeType; + + /** URL for the attendee */ + url?: string; // iOS + + /** Email address of the attendee */ + email?: string; // Android + } + + interface Reminder { + /** Internal ID that represents this reminder on the device */ + id?: string; + + /** ID of the calendar that contains this reminder */ + calendarId?: string; + + /** Visible name of the reminder */ + title?: string; + + /** Location field of the reminder */ + location?: string; + + /** Date when the reminder record was created */ + creationDate?: string; + + /** Date when the reminder record was last modified */ + lastModifiedDate?: string; + + /** Time zone the reminder is scheduled in */ + timeZone?: string; + + /** URL for the reminder */ + url?: string; + + /** Description or notes saved with the reminder */ + notes?: string; + + /** Array of Alarm objects which control automated alarms to the user about the task */ + alarms?: Alarm[]; + + /** Object representing rules for recurring or repeated reminders. Null for one-time tasks. */ + recurrenceRule?: RecurrenceRule; + + /** Date object or string representing the start date of the reminder task */ + startDate?: string; + + /** Date object or string representing the time when the reminder task is due */ + dueDate?: string; + + /** Indicates whether or not the task has been completed */ + completed?: boolean; + + /** Date object or string representing the date of completion, if completed is true */ + completionDate?: string; + } + + interface Alarm { + /** Date object or string representing an absolute time the alarm should occur; overrides relativeOffset and structuredLocation if specified alongside either */ + absoluteDate?: string; // iOS + + /** Number of minutes from the startDate of the calendar item that the alarm should occur; use negative values to have the alarm occur before the startDate */ + relativeOffset?: string; + structuredLocation?: { + // iOS + title?: string; + proximity?: string; // Proximity + radius?: number; + coords?: { + latitude?: number; + longitude?: number; + }; + }; + + /** Method of alerting the user that this alarm should use; on iOS this is always a notification */ + method?: AlarmMethod; // Method, Android + } + + interface RecurrenceRule { + /** How often the calendar item should recur */ + frequency: Frequency; // Frequency + + /** Interval at which the calendar item should recur. For example, an interval: 2 with frequency: DAILY would yield an event that recurs every other day. Defaults to 1 . */ + interval?: number; + + /** Date on which the calendar item should stop recurring; overrides occurrence if both are specified */ + endDate?: string; + + /** Number of times the calendar item should recur before stopping */ + occurrence?: number; + } + + enum EntityTypes { + EVENT = 'event', + REMINDER = 'reminder', + } + + enum CalendarType { + LOCAL = 'local', + CALDAV = 'caldav', + EXCHANGE = 'exchange', + SUBSCRIBED = 'subscribed', + BIRTHDAYS = 'birthdays' + } + + enum Availability { + NOT_SUPPORTED = 'notSupported', // iOS + BUSY = 'busy', + FREE = 'free', + TENTATIVE = 'tentative', + UNAVAILABLE = 'unavailable' // iOS + } + + enum AlarmMethod { + ALARM = 'alarm', + ALERT = 'alert', + EMAIL = 'email', + SMS = 'sms', + DEFAULT = 'default', + } + + enum AttendeeType { + UNKNOWN = 'unknown', // iOS + PERSON = 'person', // iOS + ROOM = 'room', // iOS + GROUP = 'group', // iOS + RESOURCE = 'resource', + OPTIONAL = 'optional', // Android + REQUIRED = 'required', // Android + NONE = 'none' // Android + } + + enum CalendarAccessLevel { + CONTRIBUTOR = 'contributor', + EDITOR = 'editor', + FREEBUSY = 'freebusy', + OVERRIDE = 'override', + OWNER = 'owner', + READ = 'read', + RESPOND = 'respond', + ROOT = 'root', + NONE = 'none' + } + + enum EventAccessLevel { + CONFIDENTIAL = 'confidential', + PRIVATE = 'private', + PUBLIC = 'public', + DEFAULT = 'default' + } + + enum EventStatus { + NONE = 'none', + CONFIRMED = 'confirmed', + TENTATIVE = 'tentative', + CANCELED = 'canceled' + } + + enum AttendeeRole { + UNKNOWN = 'unknown', // iOS + REQUIRED = 'required', // iOS + OPTIONAL = 'optional', // iOS + CHAIR = 'chair', // iOS + NON_PARTICIPANT = 'nonParticipant', // iOS + ATTENDEE = 'attendee', // Android + ORGANIZER = 'organizer', // Android + PERFORMER = 'performer', // Android + SPEAKER = 'speaker', // Android + NONE = 'none' // Android + } + + enum AttendeeStatus { + UNKNOWN = 'unknown', // iOS + PENDING = 'pending', // iOS + ACCEPTED = 'accepted', + DECLINED = 'declined', + TENTATIVE = 'tentative', + DELEGATED = 'delegated', // iOS + COMPLETED = 'completed', // iOS + IN_PROCESS = 'inProcess', // iOS + INVITED = 'invited', // Android + NONE = 'none' // Android + } + + enum Frequency { + DAILY = 'daily', + WEEKLY = 'weekly', + MONTHLY = 'monthly', + YEARLY = 'yearly' + } + + enum ReminderStatus { + COMPLETED = 'completed', + INCOMPLETE = 'incomplete' + } + + interface RecurringEventOptions { + futureEvents?: boolean; + instanceStartDate?: string; + } + + /** Gets an array of calendar objects with details about the different calendars stored on the device. */ + function getCalendarsAsync( + /** (iOS only) Not required, but if defined, filters the returned calendars to a specific entity type. */ + entityType?: EntityTypes + ): Promise; + + /** Creates a new calendar on the device, allowing events to be added later and displayed. */ + function createCalendarAsync(details: Calendar): Promise; + + /** Updates the provided details of an existing calendar stored on the device. To remove a property, explicitly set it to null in details */ + function updateCalendarAsync(id: string, details?: Calendar | null): Promise; + + /** Deletes an existing calendar and all associated events/reminders/attendees from the device. Use with caution. */ + function deleteCalendarAsync(id: string): Promise; + + /** Returns all events in a given set of calendars over a specified time period. */ + function getEventsAsync( + /** Array of IDs of calendars to search for events in. Required. */ + calendarIds: string[], + + /** Beginning of time period to search for events in. Required. */ + startDate: Date, + + /** End of time period to search for events in. Required. */ + endDate: Date + ): Promise; + + /** Returns a specific event selected by ID. If a specific instance of a recurring event is desired, the start date of this instance must also be provided, as instances of recurring events do not have their own unique and stable IDs on either iOS or Android. */ + function getEventAsync( + /** ID of the event to return. Required. */ + id: string, + + /** A map of options for recurring events */ + recurringEventOptions?: RecurringEventOptions + ): Promise; + + /** Creates a new event on the specified calendar. */ + function createEventAsync( + /** ID of the calendar to create this event in. Required. */ + calendarId: string, + details?: Event + ): Promise; + + /** Updates the provided details of an existing calendar stored on the device. To remove a property, explicitly set it to null in details */ + function updateEventAsync( + /** ID of the event to be updated. Required. */ + id: string, + + /** A map of properties to be updated */ + details?: Event | null, + + /** A map of options for recurring events */ + recurrentEventOptions?: RecurringEventOptions + ): Promise; + + /** Deletes an existing event from the device. Use with caution. */ + function deleteEventAsync( + /** ID of the event to be deleted. Required. */ + id: string, + + /** A map of options for recurring events */ + recurringEventOptions?: RecurringEventOptions + ): Promise; + + /** Gets all attendees for a given event (or instance of a recurring event). */ + function getAttendeesForEventAsync( + /** ID of the event to return attendees for. Required. */ + eventId: string, + + /** A map of options for recurring events */ + recurrentEventOptions?: RecurringEventOptions + ): Promise; + + /** Available on Android only. Creates a new attendee record and adds it to the specified event. Note that if eventId specifies a recurring event, this will add the attendee to every instance of the event. */ + function createAttendeeAsync( + /** ID of the event to add this attendee to. Required. */ + eventId: string, + + /** A map of details for the attendee to be created */ + details?: Attendee + ): Promise; + + /** Available on Android only. Updates an existing attendee record. To remove a property, explicitly set it to null in details. */ + function updateAttendeeAsync( + /** ID of the attendee record to be updated. Required. */ + id: string, + + /** A map of properties to be updated */ + details?: Attendee | null + ): Promise; + + /** Available on Android only. Deletes an existing attendee record from the device. Use with caution. */ + function deleteAttendeeAsync(id: string): Promise; + + /** Available on iOS only. Returns a list of reminders matching the provided criteria. */ + function getRemindersAsync( + /** Array of IDs of calendars to search for reminders in. Required. */ + calendarIds: string[], + + status?: ReminderStatus, + + /** Beginning of time period to search for reminders in. Required if status is defined. */ + startDate?: Date, + + /** End of time period to search for reminders in. Required if status is defined. */ + endDate?: Date + ): Promise; + + /** Available on iOS only. Returns a specific reminder selected by ID. */ + function getReminderAsync(id: string): Promise; + + /** Available on iOS only. Creates a new reminder on the specified calendar. */ + function createReminderAsync( + /** ID of the calendar to create this reminder in. Required. */ + calendarId: string, + + /** A map of details for the reminder to be created */ + details?: Reminder + ): Promise; + + /** Available on iOS only. Updates the provided details of an existing reminder stored on the device. To remove a property, explicitly set it to null in details. */ + function updateReminderAsync( + /** ID of the reminder to be updated. Required. */ + id: string, + + /** A map of properties to be updated */ + details?: Reminder | null + ): Promise; + + /** Available on iOS only. Deletes an existing reminder from the device. Use with caution. */ + function deleteReminderAsync(id: string): Promise; + + /** Available on iOS only. */ + function getSourcesAsync(): Promise; + + /** Available on iOS only. Returns a specific source selected by ID. */ + function getSourceAsync(id: string): Promise; + + /** Available on Android only. Sends an intent to open the specified event in the OS Calendar app. */ + function openEventInCalendar( + /** ID of the event to open. Required. */ + id: string + ): void; +} +// #endregion + +// #region Calendar +/** + * An API to compose mails using OS specific UI. + */ +export namespace MailComposer { + interface ComposeOptions { + /** An array of e-mail addressess of the recipients. */ + recipients?: string[]; + + /** An array of e-mail addressess of the CC recipients. */ + ccRecipients?: string[]; + + /** An array of e-mail addressess of the BCC recipients. */ + bccRecipients?: string[]; + + /** Subject of the mail. */ + subject?: string; + + /** Body of the mail. */ + body?: string; + + /** Whether the body contains HTML tags so it could be formatted properly. Not working perfectly on Android. */ + isHtml?: boolean; + + /** An array of app’s internal file uris to attach. */ + attachments?: string[]; + } + + /** Resolves to a promise with object containing status field that could be either sent, saved or cancelled. Android does not provide such info so it always resolves to sent. */ + function composeAsync( + /** A map defining the data to fill the mail */ + options: ComposeOptions + ): Promise<{ status: 'sent' | 'saved' | 'cancelled' }>; +} +// #endregion diff --git a/types/expo/v25/tsconfig.json b/types/expo/v25/tsconfig.json new file mode 100644 index 0000000000..db8203e995 --- /dev/null +++ b/types/expo/v25/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "jsx": "react", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "expo": [ + "expo/v25" + ], + "expo/*": [ + "expo/v25/*" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "expo-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/expo/v25/tslint.json b/types/expo/v25/tslint.json new file mode 100644 index 0000000000..8270136207 --- /dev/null +++ b/types/expo/v25/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "void-return": false, + "max-line-length": false + } +} diff --git a/types/expo__vector-icons/index.d.ts b/types/expo__vector-icons/index.d.ts index 864ae1d0cc..19aadf2a33 100644 --- a/types/expo__vector-icons/index.d.ts +++ b/types/expo__vector-icons/index.d.ts @@ -5,7 +5,7 @@ // TypeScript Version: 2.6 import * as React from 'react'; -import { TextProperties } from 'react-native'; +import { TextProps } from 'react-native'; export { createIconSet, createIconSetFromFontello, createIconSetFromIcoMoon } from 'react-native-vector-icons'; export { default as Entypo } from 'react-native-vector-icons/Entypo'; diff --git a/types/express-correlation-id/express-correlation-id-tests.ts b/types/express-correlation-id/express-correlation-id-tests.ts new file mode 100644 index 0000000000..20c9b872de --- /dev/null +++ b/types/express-correlation-id/express-correlation-id-tests.ts @@ -0,0 +1,9 @@ +import * as express from "express"; +import correlator from "express-correlation-id"; + +const app = express(); +app.use(correlator()); +app.use(correlator({})); +app.use(correlator({ header: "x-correlation-id" })); + +const x: string = correlator.getId() || ""; diff --git a/types/express-correlation-id/index.d.ts b/types/express-correlation-id/index.d.ts new file mode 100644 index 0000000000..fa09b65071 --- /dev/null +++ b/types/express-correlation-id/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for express-correlation-id 1.2 +// Project: https://github.com/toboid/express-correlation-id#readme +// Definitions by: Nate +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { RequestHandler } from "express-serve-static-core"; + +declare const correlator: { + (options?: { header?: string }): RequestHandler; + getId(): string | undefined; +}; + +export default correlator; diff --git a/types/express-correlation-id/tsconfig.json b/types/express-correlation-id/tsconfig.json new file mode 100644 index 0000000000..bcfa9423b6 --- /dev/null +++ b/types/express-correlation-id/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "express-correlation-id-tests.ts"] +} diff --git a/types/express-correlation-id/tslint.json b/types/express-correlation-id/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-correlation-id/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-jsonschema/express-jsonschema-tests.ts b/types/express-jsonschema/express-jsonschema-tests.ts new file mode 100644 index 0000000000..85a3852d75 --- /dev/null +++ b/types/express-jsonschema/express-jsonschema-tests.ts @@ -0,0 +1,71 @@ +import { + JsonSchemaCustomPropertyError, + JsonSchemaValidation, + addSchemaProperties, + validate, +} from "express-jsonschema"; + +import { Request, Response, NextFunction } from "express"; +import { JSONSchema4 } from "json-schema"; + +let jsonSchema: JSONSchema4; +let expressMiddleware: (req: Request, res: Response, next: NextFunction) => void; + +jsonSchema = { + id: 'foo', + $ref: 'foo/bar', + $schema: 'http://json-schema.org/schema#', + title: 'foo', + description: 'bar', + default: 42, + multipleOf: 3, + maximum: 4, + exclusiveMaximum: true, + minimum: 5, + exclusiveMinimum: false, + maxLength: 6, + minLength: 7, + pattern: 'baz', + additionalItems: true, + items: [ + { items: [{ minLength: 4 }] } + ], + maxItems: 4, + minItems: 5, + uniqueItems: true, + maxProperties: 10, + minProperties: 11, + required: ['foo', 'bar'], + additionalProperties: false, + definitions: { + foo: { type: 'string' } + }, + properties: { + bar: { type: 'boolean' } + }, + patternProperties: { + foo: { type: 'integer' } + }, + dependencies: { + baz: { type: 'integer' } + }, + enum: ['foo', 42], + type: 'string', + allOf: [{}], + anyOf: [{}], + oneOf: [{}], + not: {}, + extends: 'foo', + bar: 4, + format: 'date-time', +}; + +expressMiddleware = validate({ test: jsonSchema }, [ jsonSchema ]); +addSchemaProperties({ + test: () => "This is an error with message...", + conditional: (instance: any, schema: JSONSchema4) => { + if (!instance) { + return "An instance should be present"; + } + } +}); diff --git a/types/express-jsonschema/index.d.ts b/types/express-jsonschema/index.d.ts new file mode 100644 index 0000000000..f089e1033e --- /dev/null +++ b/types/express-jsonschema/index.d.ts @@ -0,0 +1,54 @@ +// Type definitions for express-jsonschema 1.1 +// Project: https://github.com/trainiac/express-jsonschema#readme +// Definitions by: Arne Schubert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { Request, Response, NextFunction } from "express"; +import { JSONSchema4 } from "json-schema"; + +export class JsonSchemaCustomPropertyError { + name: string; + message: string; + constructor(propertyName: string); +} + +export class JsonSchemaValidation { + name: string; + message: string; + validations: {[requestProperty: string]: Array<{ value: any, property: string, messages: string[]}> }; + constructor(validations: { [requestProperty: string]: { instance: any, property: string, message: string }}); +} + +/** + * Updates customProperties with the newProperties param. Provides a way for client to extend JSON Schema validations. + * + * @param newProperties - An object where the keys are the + * names of the new schema properties and the values are the respective + * functions that implement the validation. + * @throws Client tries to override an existing JSON Schema property. + */ +export function addSchemaProperties(newProperties: { [attribute: string]: (instance: any, schema: JSONSchema4, options: any, ctx: any) => void | string }): void; + +/** + * Accepts an object where the keys are request properties and the + * values are their respective schemas. Optionally, you may provide + * dependency schemas that are referenced by your schemas using `$ref` + * (see https://www.npmjs.com/package/jsonschema#complex-example-with-split-schemas-and-references + * for more details). + * Returns a middleware function that validates the given + * request properties when a request is made. If there is any invalid + * data a JsonSchemaValidation instance is passed to the next middleware. + * If the data is valid the next middleware is called with no params. + * + * @param schemas - An object where the keys are request properties + * and the values are their respective schemas. + * @param schemaDependencies - A list of schemas on which + * schemas in `schemas` parameter are dependent. These will be added + * to the `jsonschema` validator. + * @returns A middleware function. + */ +export function validate( + schemas: { [requestProperty: string]: JSONSchema4 }, + schemaDependencies?: JSONSchema4[], +): (req: Request, res: Response, next: NextFunction) => void; diff --git a/types/express-jsonschema/tsconfig.json b/types/express-jsonschema/tsconfig.json new file mode 100644 index 0000000000..964ad62e02 --- /dev/null +++ b/types/express-jsonschema/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "express-jsonschema-tests.ts" + ] +} diff --git a/types/express-jsonschema/tslint.json b/types/express-jsonschema/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-jsonschema/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-routemap/express-routemap-tests.ts b/types/express-routemap/express-routemap-tests.ts new file mode 100644 index 0000000000..e169a614b9 --- /dev/null +++ b/types/express-routemap/express-routemap-tests.ts @@ -0,0 +1,7 @@ +import express = require('express'); +import displayRoutes = require('express-routemap'); + +const server = express(); +server.listen(3000, () => { + displayRoutes(server); // $ExpectType void +}); diff --git a/types/express-routemap/index.d.ts b/types/express-routemap/index.d.ts new file mode 100644 index 0000000000..a2e80499b0 --- /dev/null +++ b/types/express-routemap/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for express-routemap 1.1 +// Project: https://github.com/izelnakri/express-routemap#readme +// Definitions by: icopp +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { Application } from 'express'; + +declare function displayRoutes(app: Application, filename?: string): void; +export = displayRoutes; diff --git a/types/express-routemap/tsconfig.json b/types/express-routemap/tsconfig.json new file mode 100644 index 0000000000..44638d2eb4 --- /dev/null +++ b/types/express-routemap/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "express-routemap-tests.ts" + ] +} diff --git a/types/express-routemap/tslint.json b/types/express-routemap/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-routemap/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-socket.io-session/express-socket.io-session-tests.ts b/types/express-socket.io-session/express-socket.io-session-tests.ts new file mode 100644 index 0000000000..46dd000882 --- /dev/null +++ b/types/express-socket.io-session/express-socket.io-session-tests.ts @@ -0,0 +1,28 @@ +/** + * Create by AylaJK on 05/09/2018 + */ +import express = require('express'); +const app = express(); + +import http = require('http'); +const server = http.createServer(app); + +import expresssession = require('express-session'); +const session = expresssession({ + secret: 'my-secret', + resave: true, + saveUninitialized: true, +}); + +import cookieparser = require('cookie-parser'); +const cookieParser = cookieparser('my-secret'); + +import socketio = require('socket.io'); +const io = socketio(server); + +import sharedsession = require('express-socket.io-session'); + +io.use(sharedsession(session)); +io.use(sharedsession(session, { autoSave: true, saveUninitialized: true })); +io.use(sharedsession(session, cookieParser)); +io.use(sharedsession(session, cookieParser, { autoSave: true, saveUninitialized: true })); diff --git a/types/express-socket.io-session/index.d.ts b/types/express-socket.io-session/index.d.ts new file mode 100644 index 0000000000..39a1fb4ff6 --- /dev/null +++ b/types/express-socket.io-session/index.d.ts @@ -0,0 +1,28 @@ +// Type definitions for express-socket.io-session 1.3 +// Project: https://github.com/oskosk/express-socket.io-session +// Definitions by: AylaJK +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import socketio = require('socket.io'); +import express = require('express'); + +declare function sharedsession( + expressSessionMiddleware: express.RequestHandler, + cookieParserMiddleware: express.RequestHandler, + options?: sharedsession.SharedSessionOptions): sharedsession.SocketIoSharedSessionMiddleware; + +declare function sharedsession( + expressSessionMiddleware: express.RequestHandler, + options?: sharedsession.SharedSessionOptions): sharedsession.SocketIoSharedSessionMiddleware; + +declare namespace sharedsession { + interface SharedSessionOptions { + autoSave?: boolean; + saveUninitialized?: boolean; + } + + type SocketIoSharedSessionMiddleware = (socket: socketio.Socket, next: (err?: any) => void) => void; +} + +export = sharedsession; diff --git a/types/express-socket.io-session/tsconfig.json b/types/express-socket.io-session/tsconfig.json new file mode 100644 index 0000000000..6d4aca9e90 --- /dev/null +++ b/types/express-socket.io-session/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "express-socket.io-session-tests.ts" + ] +} diff --git a/types/express-socket.io-session/tslint.json b/types/express-socket.io-session/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-socket.io-session/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/extract-text-webpack-plugin/index.d.ts b/types/extract-text-webpack-plugin/index.d.ts index 61b381d253..f0cc7bf65c 100644 --- a/types/extract-text-webpack-plugin/index.d.ts +++ b/types/extract-text-webpack-plugin/index.d.ts @@ -4,16 +4,10 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { Plugin, NewLoader, OldLoader } from 'webpack'; +import { Plugin, Loader } from 'webpack'; export = ExtractTextPlugin; -/** - * extract-text-webpack-plugin has no support for .options instead of .query yet. - * See https://github.com/webpack/extract-text-webpack-plugin/issues/281 - */ -type Loader = string | OldLoader | NewLoader; - /** * Use an `ExtractTextPlugin` instance and a loader returned by `extract` in concert to write files to disk instead of loading them into others. * Usage example at https://github.com/webpack/extract-text-webpack-plugin#usage-example-with-css diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index 369856130c..e35b0ebe0d 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -283,7 +283,7 @@ interface IObservable { * Observes specified event * @param eventName Object with key/value pairs (eg. {'after:render': handler, 'selection:cleared': handler}) */ - on(events: {[eventName: string]: (e: IEvent) => void}): T; + on(events: { [eventName: string]: (e: IEvent) => void }): T; /** * Fires event with an optional options object * @param eventName Event name to fire @@ -296,7 +296,7 @@ interface IObservable { * @param eventName Event name (eg. 'after:render') or object with key/value pairs (eg. {'after:render': handler, 'selection:cleared': handler}) * @param handler Function to be deleted from EventListeners */ - off(eventName?: string|any, handler?: (e: IEvent) => void): T; + off(eventName?: string | any, handler?: (e: IEvent) => void): T; } interface Callbacks { @@ -337,7 +337,7 @@ interface IObjectAnimation { * @param value Value to animate property * @param options The animation options */ - animate(property: string, value: number|string, options?: IAnimationOptions): Object; + animate(property: string, value: number | string, options?: IAnimationOptions): Object; /** * Animates object's properties * object.animate({ left: ..., top: ... }, { duration: ... }); @@ -350,7 +350,7 @@ interface IAnimationOptions { /** * Allows to specify starting value of animatable property (if we don't want current value to be used). */ - from?: string|number; + from?: string | number; /** * Defaults to 500 (ms). Can be used to change duration of an animation. */ @@ -443,7 +443,7 @@ export class Color { /** * Overlays color with another color */ - overlayWith(otherColor: string|Color): Color; + overlayWith(otherColor: string | Color): Color; /** * Returns new color object, when given a color in RGB format @@ -551,7 +551,7 @@ interface IGradient extends IGradientOptions { toLive(ctx: CanvasRenderingContext2D, object?: PathGroup): CanvasGradient; } interface IGrandientStatic { - new (options?: IGradientOptions): IGradient; + new(options?: IGradientOptions): IGradient; /** * Returns instance from an SVG element * @param el SVG gradient element @@ -612,10 +612,10 @@ interface IPatternOptions { /** * The source for the pattern */ - source: string|HTMLImageElement; + source: string | HTMLImageElement; } -export interface Pattern extends IPatternOptions {} -export class Pattern { +export interface Pattern extends IPatternOptions { } +export class Pattern { constructor(options?: IPatternOptions); initialise(options?: IPatternOptions): Pattern; @@ -797,10 +797,10 @@ interface IShadowOptions { */ offsetY: number; } -export interface Shadow extends IShadowOptions {} +export interface Shadow extends IShadowOptions { } export class Shadow { constructor(options?: IShadowOptions); - initialize(options?: IShadowOptions|string): Shadow; + initialize(options?: IShadowOptions | string): Shadow; /** * Returns object representation of a shadow */ @@ -874,7 +874,7 @@ interface IStaticCanvasOptions { * Background color of canvas instance. * Should be set via setBackgroundColor */ - backgroundColor?: string|Pattern; + backgroundColor?: string | Pattern; /** * Background image of canvas instance. * Should be set via setBackgroundImage @@ -902,7 +902,7 @@ interface IStaticCanvasOptions { * Overlay color of canvas instance. * Should be set via setOverlayColor */ - overlayColor?: string|Pattern; + overlayColor?: string | Pattern; /** * Overlay image of canvas instance. * Should be set via setOverlayImage @@ -922,14 +922,14 @@ interface IStaticCanvasOptions { */ stateful?: boolean; } -export interface StaticCanvas extends IObservable, IStaticCanvasOptions, ICollection, ICanvasAnimation {} +export interface StaticCanvas extends IObservable, IStaticCanvasOptions, ICollection, ICanvasAnimation { } export class StaticCanvas { /** * Constructor * @param element element to initialize instance on * @param [options] Options object */ - constructor(element: HTMLCanvasElement|string, options?: ICanvasOptions); + constructor(element: HTMLCanvasElement | string, options?: ICanvasOptions); /** * Calculates canvas element offset relative to the document @@ -943,7 +943,7 @@ export class StaticCanvas { * @param callback callback to invoke when image is loaded and set as an overlay * @param [options] Optional options to set for the {@link fabric.Image|overlay image}. */ - setOverlayImage(image: Image|string, callback: (img: HTMLImageElement) => void, options?: IImageOptions): this; + setOverlayImage(image: Image | string, callback: (img: HTMLImageElement) => void, options?: IImageOptions): this; /** * Sets {@link fabric.StaticCanvas#backgroundImage|background image} for this canvas @@ -951,21 +951,21 @@ export class StaticCanvas { * @param callback Callback to invoke when image is loaded and set as background * @param [options] Optional options to set for the {@link fabric.Image|background image}. */ - setBackgroundImage(image: Image|string, callback?: (img: HTMLImageElement) => void, options?: IImageOptions): this; + setBackgroundImage(image: Image | string, callback?: (img: HTMLImageElement) => void, options?: IImageOptions): this; /** * Sets {@link fabric.StaticCanvas#overlayColor|background color} for this canvas * @param overlayColor Color or pattern to set background color to * @param callback Callback to invoke when background color is set */ - setOverlayColor(overlayColor: string|Pattern, callback: (pattern: Pattern | undefined) => void): this; + setOverlayColor(overlayColor: string | Pattern, callback: (pattern: Pattern | undefined) => void): this; /** * Sets {@link fabric.StaticCanvas#backgroundColor|background color} for this canvas * @param backgroundColor Color or pattern to set background color to * @param callback Callback to invoke when background color is set */ - setBackgroundColor(backgroundColor: string|Pattern, callback: (pattern: Pattern | undefined) => void): StaticCanvas; + setBackgroundColor(backgroundColor: string | Pattern, callback: (pattern: Pattern | undefined) => void): StaticCanvas; /** * Returns canvas width (in px) @@ -982,14 +982,14 @@ export class StaticCanvas { * @param value Value to set width to * @param [options] Options object */ - setWidth(value: number|string, options?: ICanvasDimensionsOptions): this; + setWidth(value: number | string, options?: ICanvasDimensionsOptions): this; /** * Sets height of this canvas instance * @param value Value to set height to * @param [options] Options object */ - setHeight(value: number|string, options?: ICanvasDimensionsOptions): this; + setHeight(value: number | string, options?: ICanvasDimensionsOptions): this; /** * Sets dimensions (width, height) of this canvas instance. when options.cssOnly flag active you should also supply the unit of measure (px/%/em) @@ -1213,7 +1213,7 @@ export class StaticCanvas { * are initialized * @param [reviver] Method for further parsing of JSON elements, called after each fabric object created. */ - loadFromJSON(json: string|any, callback: () => void, reviver?: Function): this; + loadFromJSON(json: string | any, callback: () => void, reviver?: Function): this; /** * Clones canvas instance * @param [callback] Receives cloned instance as a first argument @@ -1364,8 +1364,8 @@ interface ICanvasOptions extends IStaticCanvasOptions { */ isDrawingMode?: boolean; } -export interface Canvas extends StaticCanvas {} -export interface Canvas extends ICanvasOptions {} +export interface Canvas extends StaticCanvas { } +export interface Canvas extends ICanvasOptions { } export class Canvas { /** * Constructor @@ -1509,7 +1509,7 @@ interface ICircleOptions extends IObjectOptions { */ endAngle?: number; } -export interface Circle extends Object, ICircleOptions {} +export interface Circle extends Object, ICircleOptions { } export class Circle { constructor(options?: ICircleOptions); @@ -1571,7 +1571,7 @@ interface IEllipseOptions extends IObjectOptions { */ ry?: number; } -export interface Ellipse extends Object, IEllipseOptions {} +export interface Ellipse extends Object, IEllipseOptions { } export class Ellipse { constructor(options?: IEllipseOptions); @@ -1621,7 +1621,7 @@ export class Ellipse { static fromObject(object: any): Ellipse; } -export interface Group extends Object, ICollection {} +export interface Group extends Object, ICollection { } export class Group { /** * Constructor @@ -1713,7 +1713,7 @@ export class Group { /////////////////////////////////////////////////////////////////////////////// // ActiveSelection ////////////////////////////////////////////////////////////////////////////// -export interface ActiveSelection extends Object, ICollection {} +export interface ActiveSelection extends Object, ICollection { } export class ActiveSelection { /** * Constructor @@ -1781,7 +1781,7 @@ interface IImageOptions extends IObjectOptions { */ filters?: IBaseFilter[]; } -interface Image extends Object, IImageOptions {} +interface Image extends Object, IImageOptions { } export class Image { /** * Constructor @@ -1790,7 +1790,7 @@ export class Image { */ constructor(element: HTMLImageElement, objObjects: IObjectOptions); - initialize(element?: string|HTMLImageElement, options?: IImageOptions): void; + initialize(element?: string | HTMLImageElement, options?: IImageOptions): void; /** * Applies filters assigned to this image (from "filters" array) * @param callback Callback is invoked when all filters have been applied and new image is generated @@ -1907,7 +1907,7 @@ interface ILineOptions extends IObjectOptions { */ y2: number; } -export interface Line extends Object, ILineOptions {} +export interface Line extends Object, ILineOptions { } export class Line { /** * Constructor @@ -2131,7 +2131,7 @@ interface IObjectOptions { /** * Shadow object representing shadow of this shape */ - shadow?: Shadow|string; + shadow?: Shadow | string; /** * Opacity of object's controlling borders when object is active and moving @@ -2250,7 +2250,7 @@ interface IObjectOptions { */ data?: any; } -export interface Object extends IObservable, IObjectOptions, IObjectAnimation {} +export interface Object extends IObservable, IObjectOptions, IObjectAnimation { } export class Object { getCurrentWidth(): number; getCurrentHeight(): number; @@ -2656,7 +2656,8 @@ export class Object { mt?: boolean; tl?: boolean; tr?: boolean; - mtr?: boolean; }): this; + mtr?: boolean; + }): this; // functions from geometry mixin // ------------------------------------------------------------------------------------------------------------------------------- @@ -2731,14 +2732,14 @@ interface IPathOptions extends IObjectOptions { */ minY?: number; } -export interface Path extends Object, IPathOptions {} +export interface Path extends Object, IPathOptions { } export class Path { /** * Constructor * @param path Path data (sequence of coordinates and corresponding "command" tokens) * @param [options] Options object */ - constructor(path?: string|any[], options?: IPathOptions); + constructor(path?: string | any[], options?: IPathOptions); pathOffset: Point; @@ -2871,7 +2872,7 @@ interface IPolygonOptions extends IObjectOptions { */ minY?: number; } -export interface Polygon extends IPolygonOptions {} +export interface Polygon extends IPolygonOptions { } export class Polygon extends Object { /** * Constructor @@ -2933,7 +2934,7 @@ interface IPolylineOptions extends IObjectOptions { */ minY?: number; } -export interface Polyline extends IPolylineOptions {} +export interface Polyline extends IPolylineOptions { } export class Polyline extends Object { /** * Constructor @@ -2993,7 +2994,7 @@ interface IRectOptions extends IObjectOptions { ry?: number; } -export interface Rect extends IRectOptions {} +export interface Rect extends IRectOptions { } export class Rect extends Object { /** * Constructor @@ -3044,7 +3045,7 @@ interface ITextOptions extends IObjectOptions { /** * Font weight (e.g. bold, normal, 400, 600, 800) */ - fontWeight?: number|string; + fontWeight?: number | string; /** * Font family */ @@ -3074,7 +3075,7 @@ interface ITextOptions extends IObjectOptions { * Shadow object representing shadow of this shape. * Backwards incompatibility note?: This property was named "textShadow" (String) until v1.2.11 */ - shadow?: Shadow|string; + shadow?: Shadow | string; /** * Background color of text lines */ @@ -3084,7 +3085,7 @@ interface ITextOptions extends IObjectOptions { useNative?: boolean; text?: string; } -export interface Text extends ITextOptions {} +export interface Text extends ITextOptions { } export class Text extends Object { /** * Constructor @@ -3127,12 +3128,12 @@ export class Text extends Object { /** * Retrieves object's fontWeight */ - getFontWeight(): number|string; + getFontWeight(): number | string; /** * Sets object's fontWeight * @param fontWeight Font weight */ - setFontWeight(fontWeight: string|number): Text; + setFontWeight(fontWeight: string | number): Text; /** * Retrieves object's fontFamily */ @@ -3281,7 +3282,7 @@ interface IITextOptions extends IObjectOptions, ITextOptions { */ caching?: boolean; } -export interface IText extends Text, IITextOptions {} +export interface IText extends Text, IITextOptions { } export class IText extends Object { /** * Constructor @@ -3566,14 +3567,14 @@ interface IAllFilters { * Constructor * @param [options] Options object */ - new (options?: any): IBaseFilter; + new(options?: any): IBaseFilter; }; Blend: { /** * Constructor * @param [options] Options object */ - new (options?: { color?: string; mode?: string; alpha?: number; image?: Image }): IBlendFilter; + new(options?: { color?: string; mode?: string; alpha?: number; image?: Image }): IBlendFilter; /** * Returns filter instance from an object representation * @param object Object to create an instance from @@ -3581,7 +3582,7 @@ interface IAllFilters { fromObject(object: any): IBlendFilter }; Brightness: { - new (options?: { + new(options?: { /** * Value to brighten the image up (0..255) * @default 0 @@ -3595,7 +3596,7 @@ interface IAllFilters { fromObject(object: any): IBrightnessFilter }; Convolute: { - new (options?: { + new(options?: { opaque?: boolean, /** Filter matrix */ matrix?: number[], @@ -3607,7 +3608,7 @@ interface IAllFilters { fromObject(object: any): IConvoluteFilter }; GradientTransparency: { - new (options?: { + new(options?: { /** @default 100 */ threshold?: number; }): IGradientTransparencyFilter; @@ -3618,7 +3619,7 @@ interface IAllFilters { fromObject(object: any): IGradientTransparencyFilter }; Grayscale: { - new (options?: any): IGrayscaleFilter; + new(options?: any): IGrayscaleFilter; /** * Returns filter instance from an object representation * @param object Object to create an instance from @@ -3630,7 +3631,7 @@ interface IAllFilters { * Constructor * @param [options] Options object */ - new (options?: any): IInvertFilter; + new(options?: any): IInvertFilter; /** * Returns filter instance from an object representation * @param object Object to create an instance from @@ -3638,7 +3639,7 @@ interface IAllFilters { fromObject(object: any): IInvertFilter }; Mask: { - new (options?: { + new(options?: { /** Mask image object */ mask?: Image, /** @@ -3654,7 +3655,7 @@ interface IAllFilters { fromObject(object: any): IMaskFilter }; Multiply: { - new (options?: { + new(options?: { /** * Color to multiply the image pixels with * @default #000000 @@ -3668,7 +3669,7 @@ interface IAllFilters { fromObject(object: any): IMultiplyFilter }; Noise: { - new (options?: { + new(options?: { /** @default 0 */ noise: number, }): INoiseFilter; @@ -3679,7 +3680,7 @@ interface IAllFilters { fromObject(object: any): INoiseFilter }; Pixelate: { - new (options?: { + new(options?: { /** * Blocksize for pixelate * @default 4 @@ -3693,7 +3694,7 @@ interface IAllFilters { fromObject(object: any): IPixelateFilter }; RemoveWhite: { - new (options?: { + new(options?: { /** @default 30 */ threshold?: number, /** @default 20 */ @@ -3706,7 +3707,7 @@ interface IAllFilters { fromObject(object: any): IRemoveWhiteFilter }; Resize: { - new (options?: any): IResizeFilter; + new(options?: any): IResizeFilter; /** * Returns filter instance from an object representation * @param object Object to create an instance from @@ -3714,7 +3715,7 @@ interface IAllFilters { fromObject(object: any): IResizeFilter }; Sepia2: { - new (options?: any): ISepia2Filter; + new(options?: any): ISepia2Filter; /** * Returns filter instance from an object representation * @param object Object to create an instance from @@ -3722,7 +3723,7 @@ interface IAllFilters { fromObject(object: any): ISepia2Filter }; Sepia: { - new (options?: any): ISepiaFilter; + new(options?: any): ISepiaFilter; /** * Returns filter instance from an object representation * @param object Object to create an instance from @@ -3730,7 +3731,7 @@ interface IAllFilters { fromObject(object: any): ISepiaFilter }; Tint: { - new (options?: { + new(options?: { /** * Color to tint the image with * @default #000000 @@ -3905,7 +3906,7 @@ export class BaseBrush { * Backwards incompatibility note: This property replaces "shadowColor" (String), "shadowOffsetX" (Number), * "shadowOffsetY" (Number) and "shadowBlur" (Number) since v1.2.12 */ - shadow: Shadow|string; + shadow: Shadow | string; /** * Line endings style of a brush (one of "butt", "round", "square") */ @@ -3925,7 +3926,7 @@ export class BaseBrush { * Sets shadow of an object * @param [options] Options object or string (e.g. "2px 2px 10px rgba(0,0,0,0.2)") */ - setShadow(options: string|any): BaseBrush; + setShadow(options: string | any): BaseBrush; } export class CircleBrush extends BaseBrush { @@ -4133,7 +4134,7 @@ interface IUtilDomMisc { /** * Takes id and returns an element with that id (if one exists in a document) */ - getById(id: string|HTMLElement): HTMLElement; + getById(id: string | HTMLElement): HTMLElement; /** * Converts an array-like object (e.g. arguments or NodeList) to an array */ @@ -4157,7 +4158,7 @@ interface IUtilDomMisc { * @param wrapper Element to wrap with * @param [attributes] Attributes to set on a wrapper */ - wrapElement(element: HTMLElement, wrapper: HTMLElement|string, attributes?: any): HTMLElement; + wrapElement(element: HTMLElement, wrapper: HTMLElement | string, attributes?: any): HTMLElement; /** * Returns element scroll offsets * @param element Element to operate on @@ -4353,7 +4354,7 @@ interface IUtilMisc { * Returns converted pixels or original value not converted. * @param value number to operate on */ - parseUnit(value: number|string, fontSize?: number): number|string; + parseUnit(value: number | string, fontSize?: number): number | string; /** * Function which always returns `false`. @@ -4480,3 +4481,58 @@ interface IUtil extends IUtilAnimation, IUtilArc, IObservable, IUtilDomEv object: IUtilObject; string: IUtilString; } + +export interface Resources { + [key: string]: HTMLCanvasElement +} +export interface FilterBackend { + resources: Resources; + + applyFilters(filters: IBaseFilter[], sourceElement: HTMLImageElement | HTMLCanvasElement, sourceWidth: number, sourceHeight: number, targetCanvas: HTMLCanvasElement,cacheKey?: string): any; + + evictCachesForKey(cacheKey: string): void; + + dispose(): void; + + clearWebGLCaches(): void; + +} +export let filterBackend: FilterBackend; +export interface Canvas2dFilterBackend extends FilterBackend { } +export class Canvas2dFilterBackend { + constructor(); +} + +export interface GPUInfo{ + renderer:string; + vendor:string; +} + +export interface WebglFilterBackendOptions { + tileSize: number; +} +export interface WebglFilterBackend extends FilterBackend, WebglFilterBackendOptions { + setupGLContext(width: number, height: number): void; + + chooseFastestCopyGLTo2DMethod(width: number, height: number): void; + + createWebGLCanvas(width: number, height: number): void; + + applyFiltersDebug(filters: IBaseFilter[], sourceElement: HTMLImageElement | HTMLCanvasElement, sourceWidth: number, sourceHeight: number, targetCanvas: HTMLCanvasElement, cacheKey?: string): any; + + glErrorToString(context: any, errorCode: any): string; + + createTexture(gl: WebGLRenderingContext, width: number, height: number, textureImageSource?: HTMLImageElement | HTMLCanvasElement): WebGLTexture; + + getCachedTexture(uniqueId: string, textureImageSource: HTMLImageElement | HTMLCanvasElement): WebGLTexture; + + copyGLTo2D(gl: WebGLRenderingContext, pipelineState: any): void; + + captureGPUInfo(): GPUInfo; + +} + +export class WebglFilterBackend { + constructor(options?: WebglFilterBackendOptions); +} + diff --git a/types/fabric/index.d.ts b/types/fabric/index.d.ts index 38277c5708..76ed1ab054 100644 --- a/types/fabric/index.d.ts +++ b/types/fabric/index.d.ts @@ -5,6 +5,7 @@ // Michael Randolph // Tiger Oakes // Brian Martinson +// Rogerio Teixeira // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 export import fabric = require("./fabric-impl"); diff --git a/types/fabric/test/index.ts b/types/fabric/test/index.ts index dfdaafce06..1060525a00 100644 --- a/types/fabric/test/index.ts +++ b/types/fabric/test/index.ts @@ -1061,3 +1061,9 @@ function sample10() { canvas.add(objB); const objArray = canvas.getActiveObjects(); } + +function sample11() { + const canvas2dFilterBackend = new fabric.Canvas2dFilterBackend(); + const webglFilterBackend = new fabric.WebglFilterBackend(); + fabric.filterBackend = new fabric.Canvas2dFilterBackend(); +} diff --git a/types/feather-icons/feather-icons-tests.ts b/types/feather-icons/feather-icons-tests.ts new file mode 100644 index 0000000000..fc71f25798 --- /dev/null +++ b/types/feather-icons/feather-icons-tests.ts @@ -0,0 +1,7 @@ +import * as feather from "feather-icons"; + +feather.replace(); // $ExpectType void +feather.icons[""].toSvg(); // $ExpectType string +feather.icons[""].name; // $ExpectType string +feather.icons[""].contents; // $ExpectType string +feather.icons[""].tags; // $ExpectType string[] diff --git a/types/feather-icons/index.d.ts b/types/feather-icons/index.d.ts new file mode 100644 index 0000000000..34acfb80aa --- /dev/null +++ b/types/feather-icons/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for feather-icons 4.7 +// Project: https://github.com/feathericons/feather#readme +// Definitions by: Jinesh Shah +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace feather; + +export interface FeatherAttributes { + [key: string]: string | number; +} + +export function replace(options?: FeatherAttributes): void; + +export const icons: { + [key: string]: { + name: string; + contents: string; + tags: string[]; + attrs: FeatherAttributes; + toSvg: (options?: FeatherAttributes) => string; + }; +}; diff --git a/types/feather-icons/tsconfig.json b/types/feather-icons/tsconfig.json new file mode 100644 index 0000000000..ab8237b4de --- /dev/null +++ b/types/feather-icons/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": ["index.d.ts", "feather-icons-tests.ts"] +} diff --git a/types/feather-icons/tslint.json b/types/feather-icons/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/feather-icons/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/feathersjs__errors/index.d.ts b/types/feathersjs__errors/index.d.ts index 9eacd9ce7e..056acff676 100644 --- a/types/feathersjs__errors/index.d.ts +++ b/types/feathersjs__errors/index.d.ts @@ -9,67 +9,67 @@ export class FeathersError extends Error { } export class BadRequest extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class NotAuthenticated extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class PaymentError extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class Forbidden extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class NotFound extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class MethodNotAllowed extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class NotAcceptable extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class Timeout extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class Conflict extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class LengthRequired extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class Unprocessable extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class TooManyRequests extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class GeneralError extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class NotImplemented extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class BadGateway extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export class Unavailable extends FeathersError { - constructor(msg: string | Error, data?: any); + constructor(msg?: string | Error, data?: any); } export interface Errors { diff --git a/types/feathersjs__feathers/index.d.ts b/types/feathersjs__feathers/index.d.ts index c0fa3d9946..b3a0f60667 100644 --- a/types/feathersjs__feathers/index.d.ts +++ b/types/feathersjs__feathers/index.d.ts @@ -45,9 +45,9 @@ export interface Paginated { } // tslint:disable-next-line void-return -export type Hook = (hook: HookContext) => (Promise> | void); +export type Hook = (hook: HookContext) => (Promise | void); -export interface HookContext { +export interface HookContext { app?: Application; data?: T; error?: any; diff --git a/types/filter-invalid-dom-props/filter-invalid-dom-props-tests.ts b/types/filter-invalid-dom-props/filter-invalid-dom-props-tests.ts new file mode 100644 index 0000000000..5e55ae35a2 --- /dev/null +++ b/types/filter-invalid-dom-props/filter-invalid-dom-props-tests.ts @@ -0,0 +1,4 @@ +import filterInvalidDomProps from 'filter-invalid-dom-props'; + +// $ExpectType Partial<{ notADomProp: boolean; }> +filterInvalidDomProps({ notADomProp: true }); diff --git a/types/filter-invalid-dom-props/index.d.ts b/types/filter-invalid-dom-props/index.d.ts new file mode 100644 index 0000000000..ee74aae22e --- /dev/null +++ b/types/filter-invalid-dom-props/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for filter-invalid-dom-props 2.0 +// Project: https://www.npmjs.com/package/filter-invalid-dom-props +// Definitions by: icopp +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +// Note that the below can't actually be fully typed in the latest version of +// Typescript, because there's no way to regex-match against `data-` or `aria-` +// (which this function allows in addition to a list of static props). + +export default function filterInvalidDOMProps(props: T): Partial; diff --git a/types/filter-invalid-dom-props/tsconfig.json b/types/filter-invalid-dom-props/tsconfig.json new file mode 100644 index 0000000000..923a354c4e --- /dev/null +++ b/types/filter-invalid-dom-props/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "filter-invalid-dom-props-tests.ts" + ] +} diff --git a/types/filter-invalid-dom-props/tslint.json b/types/filter-invalid-dom-props/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/filter-invalid-dom-props/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/firefox-webext-browser/firefox-webext-browser-tests.ts b/types/firefox-webext-browser/firefox-webext-browser-tests.ts index 38169d573a..53f3b5a928 100644 --- a/types/firefox-webext-browser/firefox-webext-browser-tests.ts +++ b/types/firefox-webext-browser/firefox-webext-browser-tests.ts @@ -12,3 +12,5 @@ browser._manifest.NativeManifest; // $ExpectError // browser.runtime const port = browser.runtime.connect(); port.postMessage(); // $ExpectError + +browser.bookmarks.getTree(); diff --git a/types/firefox-webext-browser/index.d.ts b/types/firefox-webext-browser/index.d.ts index d04b7f6aca..1ce4024f4d 100644 --- a/types/firefox-webext-browser/index.d.ts +++ b/types/firefox-webext-browser/index.d.ts @@ -3915,10 +3915,6 @@ declare namespace browser.bookmarks { type?: BookmarkTreeNodeType; } - export {_import as import}; - - export {_export as export}; - /* bookmarks functions */ /** * Retrieves the specified BookmarkTreeNode(s). @@ -3986,18 +3982,6 @@ declare namespace browser.bookmarks { /** Recursively removes a bookmark folder. */ function removeTree(id: string): Promise; - /** - * Imports bookmarks from an html bookmark file - * @deprecated Unsupported on Firefox at this time. - */ - function _import(): Promise; - - /** - * Exports bookmarks to an html bookmark file - * @deprecated Unsupported on Firefox at this time. - */ - function _export(): Promise; - /* bookmarks events */ /** Fired when a bookmark or folder is created. */ const onCreated: WebExtEvent<(id: string, bookmark: BookmarkTreeNode) => void>; diff --git a/types/flowjs/flowjs-tests.ts b/types/flowjs/flowjs-tests.ts index efb2c30f5b..6167e7f58f 100644 --- a/types/flowjs/flowjs-tests.ts +++ b/types/flowjs/flowjs-tests.ts @@ -4,7 +4,7 @@ var flowObject: flowjs.IFlow; var bool: boolean = flowObject.support; bool = flowObject.supportDirectory; -var obj: Object = flowObject.opts; +var flowOpts: flowjs.IFlowOptions = flowObject.opts; var flowFileArray: flowjs.IFlowFile[] = flowObject.files; flowObject.assignBrowse( [], false, false, {}); diff --git a/types/flowjs/index.d.ts b/types/flowjs/index.d.ts index 7d1f922330..0a6c361c73 100644 --- a/types/flowjs/index.d.ts +++ b/types/flowjs/index.d.ts @@ -7,7 +7,7 @@ declare namespace flowjs { interface IFlow { support: boolean; supportDirectory: boolean; - opts: Object; + opts: IFlowOptions; files: IFlowFile[]; assignBrowse(domNodes: HTMLElement[], isDirectory: boolean, singleFile: boolean, attributes: Object): void; diff --git a/types/fluxible-router/index.d.ts b/types/fluxible-router/index.d.ts new file mode 100644 index 0000000000..2dea024107 --- /dev/null +++ b/types/fluxible-router/index.d.ts @@ -0,0 +1,28 @@ +// Type definitions for fluxible-router 1.5 +// Project: https://github.com/yahoo/fluxible#readme +// Definitions by: xbim +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 +/// +import * as React from 'react'; +import { FluxibleContext } from 'fluxible'; +import BaseStore = require('fluxible/addons/BaseStore'); + +export class NavLink extends React.Component { } + +export class RouteStore extends BaseStore { + static withStaticRoutes(routes: object): typeof RouteStore; +} + +export function handleHistory(Component: typeof React.Component, opts?: object): typeof React.Component; + +export function navigateAction(context: FluxibleContext, params: object): undefined; + +export class NavLinkProps { + href?: string; + routeName?: string; + activeStyle?: object; + preserveScrollPosition?: boolean; + className?: string; + type?: string; +} diff --git a/types/fluxible-router/tsconfig.json b/types/fluxible-router/tsconfig.json new file mode 100644 index 0000000000..1ce319bb08 --- /dev/null +++ b/types/fluxible-router/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "esModuleInterop": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts" + ] +} diff --git a/types/fluxible-router/tslint.json b/types/fluxible-router/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fluxible-router/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fluxible/addons/BaseStore.d.ts b/types/fluxible/addons/BaseStore.d.ts new file mode 100644 index 0000000000..78b51c53c5 --- /dev/null +++ b/types/fluxible/addons/BaseStore.d.ts @@ -0,0 +1,4 @@ +/// +import BaseStore = require('dispatchr/addons/BaseStore'); + +export = BaseStore; diff --git a/types/fluxible/addons/createStore.d.ts b/types/fluxible/addons/createStore.d.ts new file mode 100644 index 0000000000..319a02dc51 --- /dev/null +++ b/types/fluxible/addons/createStore.d.ts @@ -0,0 +1,3 @@ +import createStore = require('dispatchr/addons/createStore'); + +export = createStore; diff --git a/types/fluxible/fluxible-tests.ts b/types/fluxible/fluxible-tests.ts new file mode 100644 index 0000000000..27de6d1b1e --- /dev/null +++ b/types/fluxible/fluxible-tests.ts @@ -0,0 +1,36 @@ +import { createDispatcher, Store } from 'dispatchr'; +import createStore = require('fluxible/addons/createStore'); +import BaseStore = require('fluxible/addons/BaseStore'); +import { Fluxible } from 'fluxible'; + +const TestStore = createStore({ + storeName: 'TestStore', + + handlers: { + ACTION_NAME: 'actionHandler' + }, + + statics: { + staticMethod() { + } + }, + + initialize() {}, +}); + +class ExtendedStore extends BaseStore { + static handlers = { + ACTION_NAME: 'actionHandler' + }; + + actionHandler() { + this.emitChange(); + } +} + +const app = new Fluxible({ + component: {} +}); + +app.registerStore(TestStore); +app.registerStore(ExtendedStore); diff --git a/types/fluxible/index.d.ts b/types/fluxible/index.d.ts new file mode 100644 index 0000000000..d317662e1b --- /dev/null +++ b/types/fluxible/index.d.ts @@ -0,0 +1,126 @@ +// Type definitions for fluxible 1.4 +// Project: https://fluxible.io/ +// Definitions by: xbim +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.5 +/// +import { Dispatcher, DispatcherInterface, StoreClass } from 'dispatchr'; +import BaseStore = require('./addons/BaseStore'); + +export interface FluxibleConfiguration { + /** + * App level component action handler + */ + componentActionHandler?: () => void; + /** + * Stores your top level React component for access using `getComponent()` + */ + component: any; +} + +/** + * Provides a structured way of registering an application's configuration and + * resources. + */ +export class Fluxible { + /** + * @param [options] + * @example + * var app = new Fluxible({ + * component: require('./components/App.jsx') + * }); + */ + constructor(options?: FluxibleConfiguration); + + /** + * Creates an isolated context for a request/session + * @param [contextOptions] The options object. Please refer to FluxibleContext's constructor + * doc for supported subfields and detailed description. + */ + createContext(contextOptions?: any): FluxibleContext; + + /** + * Creates a new dispatcher instance using the application's dispatchr class. Used by + * FluxibleContext to create new dispatcher instance + * @param contextOptions The context options to be provided to each store instance + */ + createDispatcherInstance(contextOptions?: any): Dispatcher; + + /** + * Provides plugin mechanism for adding application level settings that are persisted + * between server/client and also modification of the FluxibleContext + * @param plugin + * @param plugin.name Name of the plugin + * @param plugin.plugContext Method called after context is created to allow + * dynamically plugging the context + * @param [plugin.dehydrate] Method called to serialize the plugin settings to be persisted + * to the client + * @param [plugin.rehydrate] Method called to rehydrate the plugin settings from the server + */ + plug(plugin: any): void; + + /** + * Provides access to a plugin instance by name + * @param pluginName The plugin name + */ + getPlugin(pluginName: string): any; + + /** + * Getter for the top level react component for the application + */ + getComponent(): any; + + /** + * Registers a store to the dispatcher so it can listen for actions + */ + registerStore(store: StoreClass| typeof BaseStore): void; + + /** + * Creates a serializable state of the application and a given context for sending to the client + * @param context + */ + dehydrate(context?: FluxibleContext): any; + + /** + * Rehydrates the application and creates a new context with the state from the server + * @param obj Raw object of dehydrated state + * @param obj.plugins Dehydrated app plugin state + * @param obj.context Dehydrated context state. See FluxibleContext's + * rehydrate() for subfields in this object. + * @param callback + * @async Rehydration may require more asset loading or async IO calls + */ + rehydrate(state: any): void; +} + +/** + * A request or browser-session context + */ +export class FluxibleContext { + /** + * @param options The options sharable by the context and context plugins + */ + + constructor(options?: FluxibleConfiguration); + + /** + * Provides plugin mechanism for adding application level settings that are persisted + * between server/client and also modification of the FluxibleContext + */ + plug(plugin: any): void; + + /** + * Returns a serializable context state + */ + dehydrate(): any; + + /** + * Rehydrates the context state + */ + rehydrate(state: any): void; + + /** + * Getter for store from dispatcher + */ + getStore(store: { new(dispatcher?: DispatcherInterface): T; }): T; +} diff --git a/types/fluxible/tsconfig.json b/types/fluxible/tsconfig.json new file mode 100644 index 0000000000..9af8323ce8 --- /dev/null +++ b/types/fluxible/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "esModuleInterop": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "addons/createStore.d.ts", + "addons/BaseStore.d.ts", + "fluxible-tests.ts" + ] +} diff --git a/types/fluxible/tslint.json b/types/fluxible/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fluxible/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fork-ts-checker-webpack-plugin/fork-ts-checker-webpack-plugin-tests.ts b/types/fork-ts-checker-webpack-plugin/fork-ts-checker-webpack-plugin-tests.ts new file mode 100644 index 0000000000..78ead793b4 --- /dev/null +++ b/types/fork-ts-checker-webpack-plugin/fork-ts-checker-webpack-plugin-tests.ts @@ -0,0 +1,24 @@ +import { Configuration } from 'webpack'; +import * as ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; + +let config: Configuration = { + plugins: [ + new ForkTsCheckerWebpackPlugin() + ] +}; + +config = { + plugins: [ + new ForkTsCheckerWebpackPlugin({}) + ] +}; + +config = { + plugins: [ + new ForkTsCheckerWebpackPlugin({ + vue: true + }) + ] +}; + +export default config; diff --git a/types/fork-ts-checker-webpack-plugin/index.d.ts b/types/fork-ts-checker-webpack-plugin/index.d.ts new file mode 100644 index 0000000000..ace3db5b24 --- /dev/null +++ b/types/fork-ts-checker-webpack-plugin/index.d.ts @@ -0,0 +1,104 @@ +// Type definitions for fork-ts-checker-webpack-plugin 0.4 +// Project: https://github.com/Realytics/fork-ts-checker-webpack-plugin#readme +// Definitions by: JounQin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +import { RuleFailure } from 'tslint'; +import { Diagnostic } from 'typescript'; +import { Plugin } from 'webpack'; + +declare namespace ForkTsCheckerWebpackPlugin { + type ErrorType = 'diagnostic' | 'lint'; + type Severity = 'error' | 'warning'; + + interface NormalizedMessageJson { + type: ErrorType; + code: string | number; + severity: Severity; + content: string; + file: string; + line: number; + character: number; + } + + class NormalizedMessage { + static TYPE_DIAGNOSTIC: ErrorType; + static TYPE_LINT: ErrorType; + static SEVERITY_ERROR: Severity; + static SEVERITY_WARNING: Severity; + type: ErrorType; + code: string | number; + severity: Severity; + content: string; + file: string; + line: number; + character: number; + constructor(data: NormalizedMessageJson); + static createFromDiagnostic(diagnostic: Diagnostic): NormalizedMessage; + static createFromLint(lint: RuleFailure): NormalizedMessage; + static createFromJSON(json: NormalizedMessageJson): NormalizedMessage; + static compare( + messageA: NormalizedMessage, + messageB: NormalizedMessage, + ): number; + static equals( + messageA: NormalizedMessage, + messageB: NormalizedMessage, + ): boolean; + static deduplicate(messages: NormalizedMessage[]): NormalizedMessage[]; + static compareTypes(typeA: ErrorType, typeB: ErrorType): number; + static compareSeverities( + severityA: Severity, + severityB: Severity, + ): number; + static compareOptionalStrings(stringA: string, stringB: string): number; + static compareNumbers(numberA: number, numberB: number): number; + toJSON(): NormalizedMessageJson; + getType(): ErrorType; + isDiagnosticType(): boolean; + isLintType(): boolean; + getCode(): string | number; + getFormattedCode(): string | number; + getSeverity(): Severity; + isErrorSeverity(): boolean; + isWarningSeverity(): boolean; + getContent(): string; + getFile(): string; + getLine(): number; + getCharacter(): number; + } + + type Formatter = (message: NormalizedMessage, useColors: boolean) => string; + + interface Options { + tsconfig?: string; + tslint?: string | true; + watch?: string | string[]; + async?: boolean; + ignoreDiagnostics?: number[]; + ignoreLints?: string[]; + colors?: boolean; + logger?: Console; + formatter?: 'default' | 'codeframe' | Formatter; + formatterOptions?: { + highlightCode?: boolean + linesAbove?: number + linesBelow?: number + forceColor?: boolean + }; + silent?: boolean; + checkSyntacticErrors?: boolean; + memoryLimit?: number; + workers?: number; + vue?: boolean; + } +} + +declare class ForkTsCheckerWebpackPlugin extends Plugin { + constructor(options?: ForkTsCheckerWebpackPlugin.Options); +} + +export = ForkTsCheckerWebpackPlugin; diff --git a/types/fork-ts-checker-webpack-plugin/tsconfig.json b/types/fork-ts-checker-webpack-plugin/tsconfig.json new file mode 100644 index 0000000000..cfd6ee81db --- /dev/null +++ b/types/fork-ts-checker-webpack-plugin/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fork-ts-checker-webpack-plugin-tests.ts" + ] +} diff --git a/types/fork-ts-checker-webpack-plugin/tslint.json b/types/fork-ts-checker-webpack-plugin/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fork-ts-checker-webpack-plugin/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/freshy/freshy-tests.ts b/types/freshy/freshy-tests.ts new file mode 100644 index 0000000000..406791d0eb --- /dev/null +++ b/types/freshy/freshy-tests.ts @@ -0,0 +1,21 @@ +import { unload, reload, freshy } from 'freshy'; +import minimist = require('minimist'); + +declare function require(x: string): any; + +unload('minimist'); // $ExpectType boolean + +const reloaded = reload('minimist'); // $ExpectType any +minimist === reloaded; // false + +const freshlyLoaded = freshy('minimist'); // $ExpectType any +minimist === freshlyLoaded; // false + +let alsofresh: any; +// $ExpectType any +const fresh = freshy('minimist', (fresh) => { + alsofresh = require('minimist'); + fresh === alsofresh; // true +}); +minimist === fresh; // false +fresh === alsofresh; // true diff --git a/types/freshy/index.d.ts b/types/freshy/index.d.ts new file mode 100644 index 0000000000..93b424143a --- /dev/null +++ b/types/freshy/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for freshy 1.0 +// Project: https://github.com/krakenjs/freshy#readme +// Definitions by: Nikita Volodin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function unload(module: string): boolean; +export function reload(module: string): any; +export function freshy(module: string, cb?: (module: any) => any): any; diff --git a/types/freshy/tsconfig.json b/types/freshy/tsconfig.json new file mode 100644 index 0000000000..7cc3f4d9f4 --- /dev/null +++ b/types/freshy/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "freshy-tests.ts" + ] +} diff --git a/types/freshy/tslint.json b/types/freshy/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/freshy/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts b/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts index 337dd1ca0f..bdff193912 100644 --- a/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts +++ b/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts @@ -14,7 +14,7 @@ declare const dir: string; declare const path: string; declare const data: any; declare const object: any; -let buffer: NodeBuffer; +let buffer: Buffer; declare const modeNum: number; declare const modeStr: string; declare const encoding: string; @@ -148,19 +148,19 @@ fs.futimes(fd, atime, mtime, errorCallback); fs.futimesSync(fd, atime, mtime); fs.fsync(fd, errorCallback); fs.fsyncSync(fd); -fs.write(fd, buffer, offset, length, position, (err: Error, written: number, buffer: NodeBuffer) => { +fs.write(fd, buffer, offset, length, position, (err: Error, written: number, buffer: Buffer) => { }); num = fs.writeSync(fd, buffer, offset, length, position); -fs.read(fd, buffer, offset, length, position, (err: Error, bytesRead: number, buffer: NodeBuffer) => { +fs.read(fd, buffer, offset, length, position, (err: Error, bytesRead: number, buffer: Buffer) => { }); num = fs.readSync(fd, buffer, offset, length, position); -fs.readFile(filename, (err: Error, data: NodeBuffer) => { +fs.readFile(filename, (err: Error, data: Buffer) => { }); fs.readFile(filename, encoding, (err: Error, data: string) => { }); fs.readFile(filename, openOpts, (err: Error, data: string) => { }); -fs.readFile(filename, (err: Error, data: NodeBuffer) => { +fs.readFile(filename, (err: Error, data: Buffer) => { }); buffer = fs.readFileSync(filename); str = fs.readFileSync(filename, encoding); diff --git a/types/fs-extra-promise-es6/index.d.ts b/types/fs-extra-promise-es6/index.d.ts index 0f52b5c02e..2b7dacd108 100644 --- a/types/fs-extra-promise-es6/index.d.ts +++ b/types/fs-extra-promise-es6/index.d.ts @@ -113,13 +113,13 @@ export function futimes(fd: number, atime: number, mtime: number, callback?: (er export function futimesSync(fd: number, atime: number, mtime: number): void; export function fsync(fd: number, callback?: (err: Error) => void): void; export function fsyncSync(fd: number): void; -export function write(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: NodeBuffer) => void): void; -export function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; -export function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void): void; -export function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; +export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: Buffer) => void): void; +export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; +export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: Buffer) => void): void; +export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; export function readFile(filename: string, options: OpenOptions | string, callback: (err: Error, data: string) => void): void; -export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void): void; -export function readFileSync(filename: string): NodeBuffer; +export function readFile(filename: string, callback: (err: Error, data: Buffer) => void): void; +export function readFileSync(filename: string): Buffer; export function readFileSync(filename: string, options: OpenOptions | string): string; export function writeFile(filename: string, data: any, callback?: (err: Error) => void): void; export function writeFile(filename: string, data: any, options: OpenOptions | string, callback?: (err: Error) => void): void; @@ -201,10 +201,10 @@ export function openAsync(path: string, flags: string, mode?: string): Promise; export function futimesAsync(fd: number, atime: number, mtime: number): Promise; export function fsyncAsync(fd: number): Promise; -export function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; -export function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; +export function writeAsync(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<[number, Buffer]>; +export function readAsync(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<[number, Buffer]>; export function readFileAsync(filename: string, options: OpenOptions | string): Promise; -export function readFileAsync(filename: string): Promise; +export function readFileAsync(filename: string): Promise; export function writeFileAsync(filename: string, data: any, options?: OpenOptions | string): Promise; export function appendFileAsync(filename: string, data: any, option?: OpenOptions | string): Promise; diff --git a/types/fs-extra-promise/fs-extra-promise-tests.ts b/types/fs-extra-promise/fs-extra-promise-tests.ts index f273d6efb6..61549a55ad 100644 --- a/types/fs-extra-promise/fs-extra-promise-tests.ts +++ b/types/fs-extra-promise/fs-extra-promise-tests.ts @@ -16,7 +16,7 @@ declare const data: any; declare const object: object; declare const buf: Buffer; let strOrBuf: string | Buffer; -let buffer: NodeBuffer; +let buffer: Buffer; declare const modeNum: number; declare const modeStr: string; declare const encoding: string; @@ -148,19 +148,19 @@ fs.futimes(fd, atime, mtime, errorCallback); fs.futimesSync(fd, atime, mtime); fs.fsync(fd, errorCallback); fs.fsyncSync(fd); -fs.write(fd, buffer, offset, length, position, (err: Error, written: number, buffer: NodeBuffer) => { +fs.write(fd, buffer, offset, length, position, (err: Error, written: number, buffer: Buffer) => { }); num = fs.writeSync(fd, buffer, offset, length, position); -fs.read(fd, buffer, offset, length, position, (err: Error, bytesRead: number, buffer: NodeBuffer) => { +fs.read(fd, buffer, offset, length, position, (err: Error, bytesRead: number, buffer: Buffer) => { }); num = fs.readSync(fd, buffer, offset, length, position); -fs.readFile(filename, (err: Error, data: NodeBuffer) => { +fs.readFile(filename, (err: Error, data: Buffer) => { }); fs.readFile(filename, encoding, (err: Error, data: string) => { }); fs.readFile(filename, openOpts, (err: NodeJS.ErrnoException, data: Buffer) => { }); -fs.readFile(filename, (err: Error, data: NodeBuffer) => { +fs.readFile(filename, (err: Error, data: Buffer) => { }); buffer = fs.readFileSync(filename); str = fs.readFileSync(filename, encoding); diff --git a/types/fs-extra-promise/index.d.ts b/types/fs-extra-promise/index.d.ts index de47c81a1e..b4ac5be133 100644 --- a/types/fs-extra-promise/index.d.ts +++ b/types/fs-extra-promise/index.d.ts @@ -65,10 +65,10 @@ export function openAsync(path: string, flags: string, mode?: string): Promise; export function futimesAsync(fd: number, atime: number, mtime: number): Promise; export function fsyncAsync(fd: number): Promise; -export function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; -export function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; +export function writeAsync(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<[number, Buffer]>; +export function readAsync(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<[number, Buffer]>; export function readFileAsync(filename: string, options: string | ReadOptions): Promise; -export function readFileAsync(filename: string): Promise; +export function readFileAsync(filename: string): Promise; export function writeFileAsync(filename: string, data: any, options?: string | WriteOptions): Promise; export function appendFileAsync(filename: string, data: any, option?: string | WriteOptions): Promise; diff --git a/types/geojson/geojson-tests.ts b/types/geojson/geojson-tests.ts index c5c3fa2bdd..4ea0f57a6f 100644 --- a/types/geojson/geojson-tests.ts +++ b/types/geojson/geojson-tests.ts @@ -306,6 +306,11 @@ const collectionNoNull: FeatureCollection = { features: [featureNoNull], }; +const collectionDefault: FeatureCollection = { + type: "FeatureCollection", + features: [] +}; + isNull = featureAllNull.geometry; isPoint = featurePropertyNull.geometry; isNull = featureAllNull.properties; @@ -322,3 +327,18 @@ isPropertyOrNull = collectionMaybeNull.features[0].properties; isPropertyOrNull = collectionPropertyMaybeNull.features[0].properties; isProperty = collectionGeometryMaybeNull.features[0].properties; isProperty = collectionNoNull.features[0].properties; + +for (const { geometry } of collectionDefault.features) { + switch (geometry.type) { + case "Point": + isPoint = geometry; + break; + case "GeometryCollection": + for (const child of geometry.geometries) { + if (child.type === "Point") { + isPoint = child; + } + } + break; + } +} diff --git a/types/geojson/index.d.ts b/types/geojson/index.d.ts index 9a0ab3cd8b..ac1bf84e99 100644 --- a/types/geojson/index.d.ts +++ b/types/geojson/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Jacob Bruun // Arne Schubert // Jeff Jacobson +// Ilia Choly // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -62,6 +63,11 @@ export interface GeoJsonObject { bbox?: BBox; } +/** + * Union of GeoJSON objects. + */ +export type GeoJSON = Geometry | Feature | FeatureCollection; + /** * A geometry object. * https://tools.ietf.org/html/rfc7946#section-3 @@ -70,6 +76,12 @@ export interface GeometryObject extends GeoJsonObject { type: GeoJsonGeometryTypes; } +/** + * Union of geometry objects. + * https://tools.ietf.org/html/rfc7946#section-3 + */ +export type Geometry = Point | MultiPoint | LineString | Polygon | MultiPolygon | GeometryCollection; + /** * Point geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.2 @@ -130,7 +142,7 @@ export interface MultiPolygon extends GeometryObject { */ export interface GeometryCollection extends GeometryObject { type: "GeometryCollection"; - geometries: Array; + geometries: Geometry[]; } export type GeoJsonProperties = { [name: string]: any; } | null; @@ -139,7 +151,7 @@ export type GeoJsonProperties = { [name: string]: any; } | null; * A feature object which contains a geometry and associated properties. * https://tools.ietf.org/html/rfc7946#section-3.2 */ -export interface Feature extends GeoJsonObject { +export interface Feature extends GeoJsonObject { type: "Feature"; /** * The feature's geometry @@ -160,7 +172,7 @@ export interface Feature * A collection of feature objects. * https://tools.ietf.org/html/rfc7946#section-3.3 */ -export interface FeatureCollection extends GeoJsonObject { +export interface FeatureCollection extends GeoJsonObject { type: "FeatureCollection"; features: Array>; } diff --git a/types/gl-shader/gl-shader-tests.ts b/types/gl-shader/gl-shader-tests.ts new file mode 100644 index 0000000000..ad42dd2507 --- /dev/null +++ b/types/gl-shader/gl-shader-tests.ts @@ -0,0 +1,41 @@ +import createShader = require("gl-shader"); + +const gl = new WebGLRenderingContext(); + +let shader = createShader(gl, "", ""); + +shader = createShader(gl, "", "", []); +shader = createShader(gl, "", "", [], []); +shader = createShader(gl, "", "", [{name: "foo", type: "bool"}]); +shader = createShader(gl, "", "", [{name: "foo", type: "bool"}, {name: "bar", type: "float"}]); +shader = createShader(gl, "", "", [{name: "foo", type: "bool"}], [{name: "bar", type: "float"}]); + +shader = createShader(gl, {vertex: "", fragment: ""}); +shader = createShader(gl, {vertex: "", fragment: "", uniforms: [{name: "foo", type: "bool"}]}); +shader = createShader(gl, {vertex: "", fragment: "", uniforms: [{name: "foo", type: "bool"}]}); +shader = createShader(gl, { + vertex: "", + fragment: "", + uniforms: [{name: "foo", type: "bool"}], + attributes: [{name: "bar", type: "float"}] +}); + +shader.bind(); +shader.dispose(); +shader.update("", ""); +shader.update("", "", [{name: "foo", type: "bool"}]); +shader.update("", "", [{name: "foo", type: "bool"}], [{name: "foo", type: "bool"}]); + +shader.uniforms; +shader.uniforms.color; +shader.uniforms.color = 4; +shader.uniforms.color = [ 1, 0, 0, 0 ]; + +shader.uniforms = { + model: [ 1, 2, 3, 4 ], + foo: 13 +}; + +shader.attributes; +shader.attributes.position.length; +shader.attributes.position.pointer(); diff --git a/types/gl-shader/index.d.ts b/types/gl-shader/index.d.ts new file mode 100644 index 0000000000..3049516cca --- /dev/null +++ b/types/gl-shader/index.d.ts @@ -0,0 +1,51 @@ +// Type definitions for gl-shader 4.2 +// Project: https://github.com/stackgl/gl-shader +// Definitions by: Mathias Paumgarten +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +interface Parameter { + type: string; + name: string; +} + +interface Attribute { + location: number[] | number; + pointer(type?: number, normalized?: boolean, stride?: number, offset?: number): number; +} + +declare class Shader { + readonly gl: WebGLRenderingContext; + readonly program: WebGLProgram; + readonly vertShader: WebGLShader; + readonly fragShader: WebGLShader; + readonly attributes: {[key: string]: Attribute & any[]}; + + uniforms: {[key: string]: any}; + + constructor(gl: WebGLRenderingContext); + + bind(): void; + dispose(): void; + + update(vertex: string, fragment: string, uniforms?: Parameter[], attributes?: Parameter[]): void; + update(obj: {vertex: string, fragment: string, uniforms: Parameter[], attributes: Parameter[]}): void; +} + +declare function createShader( + gl: WebGLRenderingContext, + vertex: string, + fragment: string, + uniforms?: Parameter[], + attributes?: Parameter[]): Shader; + +declare function createShader( + gl: WebGLRenderingContext, + options: { + vertex: string, + fragment: string, + uniforms?: Parameter[], + attributes?: Parameter[], + }): Shader; + +export = createShader; diff --git a/types/gl-shader/tsconfig.json b/types/gl-shader/tsconfig.json new file mode 100644 index 0000000000..fefb7e0c4c --- /dev/null +++ b/types/gl-shader/tsconfig.json @@ -0,0 +1,24 @@ +{ + "files": [ + "index.d.ts", + "gl-shader-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/types/gl-shader/tslint.json b/types/gl-shader/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/gl-shader/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/gl-texture2d/gl-texture2d-tests.ts b/types/gl-texture2d/gl-texture2d-tests.ts new file mode 100644 index 0000000000..f51046f420 --- /dev/null +++ b/types/gl-texture2d/gl-texture2d-tests.ts @@ -0,0 +1,79 @@ +import texture2d = require("gl-texture2d"); +import ndarray = require("ndarray"); + +const gl = new WebGLRenderingContext(); +const canvas = new HTMLCanvasElement(); +const video = new HTMLVideoElement(); +const image = new HTMLImageElement(); +const imageData = new ImageData(1, 1); + +// tslint:disable-next-line: no-unnecessary-generics +declare function rawType(): {width: number, height: number, raw: T}; + +texture2d(gl, canvas); +texture2d(gl, canvas, gl.RGBA); +texture2d(gl, canvas, gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, video); +texture2d(gl, video, gl.RGBA); +texture2d(gl, video, gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, image); +texture2d(gl, image, gl.RGBA); +texture2d(gl, image, gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, imageData); +texture2d(gl, imageData, gl.RGBA); +texture2d(gl, imageData, gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, [1, 1]); +texture2d(gl, [1, 1], gl.RGBA); +texture2d(gl, [1, 1], gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, rawType()); +texture2d(gl, rawType(), gl.RGBA); +texture2d(gl, rawType(), gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, rawType()); +texture2d(gl, rawType(), gl.RGBA); +texture2d(gl, rawType(), gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, rawType()); +texture2d(gl, rawType(), gl.RGBA); +texture2d(gl, rawType(), gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, rawType()); +texture2d(gl, rawType(), gl.RGBA); +texture2d(gl, rawType(), gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, rawType()); +texture2d(gl, rawType(), gl.RGBA); +texture2d(gl, rawType(), gl.RGBA, gl.UNSIGNED_BYTE); + +texture2d(gl, ndarray([1, 2, 3])); + +const texture = texture2d(gl, canvas); + +texture.bind(); +texture.bind(1); +texture.dispose(); +texture.generateMipmap(); + +texture.magFilter = 1; +texture.minFilter = 1; +texture.mipSamples = 1; + +texture.shape = [1, 1]; +texture.wrap = [gl.REPEAT, gl.REPEAT]; + + // $ExpectType WebGLRenderingContext +texture.gl; + +// $ExpectType WebGLTexture +texture.handle; + +// $ExpectType number +texture.format; + +// $expectType number +texture.type; diff --git a/types/gl-texture2d/index.d.ts b/types/gl-texture2d/index.d.ts new file mode 100644 index 0000000000..2b44b9985a --- /dev/null +++ b/types/gl-texture2d/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for gl-texture2d 2.1 +// Project: https://github.com/stackgl/gl-texture2d +// Definitions by: Mathias Paumgarten +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import ndarray = require("ndarray"); + +type InputType = ImageData | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement; + +interface RawObject { + width: number; + height: number; + raw: ArrayBufferView | InputType | ImageBitmap; +} + +declare class Texture { + shape: [number, number]; + wrap: [GLenum, GLenum]; + magFilter: GLenum; + minFilter: GLenum; + mipSamples: GLenum; + + readonly gl: WebGLRenderingContext; + readonly handle: WebGLTexture; + readonly format: GLenum; + readonly type: GLenum; + + bind(id?: number): number; + dispose(): void; + generateMipmap(): void; +} + +declare function texture2d(gl: WebGLRenderingContext, array: ndarray): Texture; + +declare function texture2d( + gl: WebGLRenderingContext, + input: InputType | RawObject | [number, number], + format?: GLenum, + type?: GLenum): Texture; + +export = texture2d; diff --git a/types/gl-texture2d/tsconfig.json b/types/gl-texture2d/tsconfig.json new file mode 100644 index 0000000000..32954b0979 --- /dev/null +++ b/types/gl-texture2d/tsconfig.json @@ -0,0 +1,24 @@ +{ + "files": [ + "index.d.ts", + "gl-texture2d-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/types/gl-texture2d/tslint.json b/types/gl-texture2d/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/gl-texture2d/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/globalize-compiler/globalize-compiler-tests.ts b/types/globalize-compiler/globalize-compiler-tests.ts index 648ed40032..ae1f93cad2 100644 --- a/types/globalize-compiler/globalize-compiler-tests.ts +++ b/types/globalize-compiler/globalize-compiler-tests.ts @@ -1,6 +1,6 @@ import * as ESTree from "estree"; +import globalize = require("globalize"); import * as globalizeCompiler from "globalize-compiler"; -const globalize: GlobalizeStatic = null; let extractsArray: globalizeCompiler.FormatterOrParserFunction[]; diff --git a/types/globalize-compiler/index.d.ts b/types/globalize-compiler/index.d.ts index 6f3874636a..382aa52efb 100644 --- a/types/globalize-compiler/index.d.ts +++ b/types/globalize-compiler/index.d.ts @@ -3,8 +3,8 @@ // Definitions by: Ian Clanton-Thuon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// import * as ESTree from "estree"; +import globalize = require("globalize"); interface CompileTemplateOptions { /** @@ -35,7 +35,7 @@ interface ExtractFunction { * * @returns an Array with the formatters and parsers created using the passed Globalize. */ - (globalize: GlobalizeStatic): FormatterOrParserFunction[]; + (globalize: Globalize.Static): FormatterOrParserFunction[]; } interface CompileExtractsAttributes extends CompileOptions { diff --git a/types/globalize/index.d.ts b/types/globalize/index.d.ts index 6ec31883aa..0e6b8537fd 100644 --- a/types/globalize/index.d.ts +++ b/types/globalize/index.d.ts @@ -2,342 +2,344 @@ // Project: https://github.com/jquery/globalize // Definitions by: Grégoire Castre , Aram Taieb // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Note: You'll need the cldr.js definition file to use the globalize (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/cldr.js) -/// +import * as Cldr from "cldrjs"; -interface DateFormatterOptions { - /** - * String value indicating a skeleton (see description above), eg. { skeleton: "GyMMMd" }. - * Skeleton provides a more flexible formatting mechanism than the predefined list full, long, medium, or short represented by date, time, or datetime. - * Instead, they are an open-ended list of patterns containing only date field information, and in a canonical order. - */ - skeleton?: string; - /** - * One of the following String values: full, long, medium, or short, eg. { date: "full" }. - */ - date?: "full" | "long" | "medium" | "short"; - /** - * One of the following String values: full, long, medium, or short, eg. { time: "full" }. - */ - time?: "full" | "long" | "medium" | "short"; - /** - * One of the following String values: full, long, medium, or short, eg. { datetime: "full" } - */ - datetime?: "full" | "long" | "medium" | "short"; - /** - * String value indicating a machine raw pattern (anything in the "Sym." column) eg. { raw: "dd/mm" }. - * Note this is NOT recommended for i18n in general. Use skeleton instead. - */ - raw?: string; +declare var globalize: globalize.Static; +export as namespace Globalize; +export = globalize; - /** - * String based on the time zone names of the IANA time zone database, - * such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York". - */ - timeZone?: string; +declare namespace globalize { + interface DateFormatterOptions { + /** + * String value indicating a skeleton (see description above), eg. { skeleton: "GyMMMd" }. + * Skeleton provides a more flexible formatting mechanism than the predefined list full, long, medium, or short represented by date, time, or datetime. + * Instead, they are an open-ended list of patterns containing only date field information, and in a canonical order. + */ + skeleton?: string; + /** + * One of the following String values: full, long, medium, or short, eg. { date: "full" }. + */ + date?: "full" | "long" | "medium" | "short"; + /** + * One of the following String values: full, long, medium, or short, eg. { time: "full" }. + */ + time?: "full" | "long" | "medium" | "short"; + /** + * One of the following String values: full, long, medium, or short, eg. { datetime: "full" } + */ + datetime?: "full" | "long" | "medium" | "short"; + /** + * String value indicating a machine raw pattern (anything in the "Sym." column) eg. { raw: "dd/mm" }. + * Note this is NOT recommended for i18n in general. Use skeleton instead. + */ + raw?: string; + + /** + * String based on the time zone names of the IANA time zone database, + * such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York". + */ + timeZone?: string; + } + + interface CommonNumberFormatterOptions { + /** + * Non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary. + */ + minimumIntegerDigits?: number; + /** + * Non-negative integer Number values indicating the minimum and maximum fraction digits to be used. + * Numbers will be rounded or padded with trailing zeroes if necessary. + * Either one or both of these properties must be present. + * If they are, they will override minimum and maximum fraction digits derived from the CLDR patterns. + */ + minimumFractionDigits?: number; + /** + * Non-negative integer Number values indicating the minimum and maximum fraction digits to be used. + * Numbers will be rounded or padded with trailing zeroes if necessary. + * Either one or both of these properties must be present. + * If they are, they will override minimum and maximum fraction digits derived from the CLDR patterns. + */ + maximumFractionDigits?: number; + /** + * Positive integer Number values indicating the minimum and maximum fraction digits to be shown. + * Either none or both of these properties are present + * If they are, they override minimum and maximum integer and fraction digits. + * The formatter uses however many integer and fraction digits are required to display the specified number of significant digits. + */ + minimumSignificantDigits?: number; + /** + * Positive integer Number values indicating the minimum and maximum fraction digits to be shown. + * Either none or both of these properties are present. + * If they are, they override minimum and maximum integer and fraction digits. + * The formatter uses however many integer and fraction digits are required to display the specified number of significant digits. + */ + maximumSignificantDigits?: number; + /** + * String with rounding method ceil, floor, round (default), or truncate. + */ + round?: "ceil" | "floor" | "round" | "truncate"; + /** + * Boolean (default is true) value indicating whether a grouping separator should be used. + */ + useGrouping?: boolean; + } + + interface NumberFormatterOptions extends CommonNumberFormatterOptions { + /** + * decimal (default), or percent + */ + style?: "decimal" | "percent"; + } + + interface CurrencyFormatterOptions extends CommonNumberFormatterOptions { + /** + * symbol (default), accounting, code or name. + */ + style?: "symbol" | "accounting" | "code" | "name"; + } + + interface NumberParserOptions { + /** + * decimal (default), or percent. + */ + style?: "decimal" | "percent"; + } + + interface PluralGeneratorOptions { + /** + * cardinal (default), or ordinal. + */ + type?: "cardinal" | "ordinal"; + } + + interface RelativeTimeFormatterOptions { + /** + * eg. "short" or "narrow". Or falsy for default long form + */ + form?: "short" | "narrow"; + } + + interface UnitFormatterOptions { + /** + * form: [String] eg. "long", "short" or "narrow". + */ + form?: "long" | "short" | "narrow"; + + /** + * numberFormatter: [Function] a number formatter function. Defaults to Globalize .numberFormatter() for the current locale using the default options. + */ + numberFormatter?: NumberFormatterOptions; + } + + interface Static { + cldr: Cldr.CldrStatic; + + /** + * Globalize.loadTimeZone ( ianaTzData, ... ) + * This method allows you to load IANA time zone data to enable options.timeZone feature on date formatters and parsers. + * @param {Object} ianaTzData A JSON object with zdumped IANA timezone data. Get the data via https://github.com/rxaviers/iana-tz-data + */ + loadTimeZone(ianaTzData: Object): void; + + /** + * Globalize.load( json, ... ) + * @param {Object} [JSON] + * Load resolved or unresolved cldr data. + * Somewhat equivalent to previous Globalize.addCultureInfo(...). + */ + load(json: Object): void; + + /** + * Globalize.locale() + * Return the default Cldr instance. + */ + locale(): Cldr.CldrStatic; + + /** + * Globalize.locale( [locale] ) + * @param {string} locale + * Set default Cldr instance + * Return the default Cldr instance. + */ + + locale(locale: string): Cldr.CldrStatic; + /** + * Globalize.locale( cldr ) + * @param {Cldr} cldr [Cldr instance] + * Set default Cldr instance + * Return the default Cldr instance. + */ + locale(cldr: Cldr.CldrStatic): Cldr.CldrStatic; + + /** + * .dateFormatter( options ) + * @param {DateFormatterOptions} options see date/expand_pattern for more info. + * @returns {Function} Return a function that formats a date according to the given `options` and the default/instance locale. + */ + dateFormatter(options?: DateFormatterOptions): (value: Date) => string; + + //Return a function that parses a string representing a date into a JavaScript Date object according to the given options. The default parsing assumes numeric year, month, and day (i.e., { skeleton: "yMd" }). + dateParser(options?: DateFormatterOptions): (value: string) => Date; + + //Alias for .dateFormatter( [options] )( value ). + formatDate(value: Date, options?: DateFormatterOptions): string; + /** + * Alias for .dateParser( [options] )( value ). + * @param {string} value The object whose module id you wish to determine. + * @param {DateFormatterOptions} options The object whose module id you wish to determine. + * @returns {Date} Return the value as a Date. + */ + parseDate(value: string, options?: DateFormatterOptions): Date; + + /** + * Load messages data. + * @param {Object} json JSON object of messages data. Keys can use any character, except /, { and }. Values (i.e., the message content itself) can contain any character. + * @returns {void} + */ + loadMessages(json: Object): void; + /** + * Return a function that formats a message (using ICU message format pattern) given its path and a set of variables into a user-readable string. It supports pluralization and gender inflections. + * @param path String or Array containing the path of the message content, eg. "greetings/bye", or [ "greetings", "bye" ]. + * @returns {Function} Return A function that formats a message (using ICU message format pattern) given its path and a set of variables into a user-readable string. It supports pluralization and gender inflections. + */ + messageFormatter(path: string | string[]): (variables?: string | string[] | Object) => string; + + /** + * Formats a message (using ICU message format pattern) given its path and a set of variables into a user-readable string + * @param path String or Array containing the path of the message content, eg. "greetings/bye", or [ "greetings", "bye" ]. + * @param variables Variables can be Objects, where each property can be referenced by name inside a message; or Arrays, where each entry of the Array can be used inside a message, using numeric indices. When passing one or more arguments of other types, they're converted to an Array and used as such. + * @returns {string} Return a user-readable string. + */ + formatMessage(path: string | string[], variables?: string | string[] | Object): string + + /** + * Return a function that formats a number according to the given options or locale's defaults. + * @param {NumberFormatterOptions} options A JSON object including none or any of the following options. + * style Optional String decimal (default), or percent. + * minimumIntegerDigits Optional Non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary. + * minimumFractionDigits and maximumFractionDigits Optional Non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary. Either one or both of these properties must be present. If they are, they will override minimum and maximum fraction digits derived from the CLDR patterns. + * minimumSignificantDigits and maximumSignificantDigits Optional Positive integer Number values indicating the minimum and maximum fraction digits to be shown. Either none or both of these properties are present. If they are, they override minimum and maximum integer and fraction digits. The formatter uses however many integer and fraction digits are required to display the specified number of significant digits. + * round Optional String with rounding method ceil, floor, round (default), or truncate. + * useGrouping Optional Boolean (default is true) value indicating whether a grouping separator should be used. + * @returns {Function} Return a function that formats a number according to the given options. + */ + numberFormatter(options?: NumberFormatterOptions): (value: number) => string; + + /** + * Return a function that parses a string representing a number according to the given options or locale's defaults. + * @param {NumberParserOptions} options A JSON object including none or any of the following options. + * style Optional String decimal (default), or percent. + * @returns {Function} Return a function that parses a String representing a number according to the given options. If value is invalid, NaN is returned. + */ + numberParser(options?: NumberParserOptions): (value: string) => number + + /** + * Return a number formatted according to the given options or locale's defaults. + * @param {number} value The number to format + * @param {NumberFormatterOptions} options A JSON object including none or any of the following options. + * style Optional String decimal (default), or percent. + * minimumIntegerDigits Optional Non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary. + * minimumFractionDigits and maximumFractionDigits Optional Non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary. Either one or both of these properties must be present. If they are, they will override minimum and maximum fraction digits derived from the CLDR patterns. + * minimumSignificantDigits and maximumSignificantDigits Optional Positive integer Number values indicating the minimum and maximum fraction digits to be shown. Either none or both of these properties are present. If they are, they override minimum and maximum integer and fraction digits. The formatter uses however many integer and fraction digits are required to display the specified number of significant digits. + * round Optional String with rounding method ceil, floor, round (default), or truncate. + * useGrouping Optional Boolean (default is true) value indicating whether a grouping separator should be used. + * @returns {string} Return the number formatted + */ + formatNumber(value: number, options?: NumberFormatterOptions): string; + + /** + * A function that parses a string representing a number according to the given options or locale's defaults. + * @param {string} value The number as string to parse + * @param {NumberParserOptions} options A JSON object including none or any of the following options. + * style Optional String decimal (default), or percent. + * @returns {number} Return a number according to the given options. If value is invalid, NaN is returned. + */ + parseNumber(value: string, options?: NumberParserOptions): number; + + /** + * Return a function that formats a currency according to the given options or locale's defaults. + * The returned function is invoked with one argument: the Number value to be formatted. + * @param {string} currency 3-letter currency code as defined by ISO 4217, eg. USD. + * @param {CurrencyFormatterOptions} options A JSON object including none or any of the following options. + * @returns {Function} Return a function that formats a currency + */ + currencyFormatter(currency: string, options?: CurrencyFormatterOptions): (value: number) => string; + + /** + * Return a currency formatted according to the given options or locale's defaults. + * @param {number} value The value to format. + * @param {string} currency 3-letter currency code as defined by ISO 4217, eg. USD. + * @param {CurrencyFormatterOptions} options A JSON object including none or any of the following options. + * @returns {string} Return a string formatted in the currency according to the value and the options + */ + formatCurrency(value: number, currency: string, options?: CurrencyFormatterOptions): string; + + /** + * Return a function that returns the value's corresponding plural group: zero, one, two, few, many, or other. + * The returned function is invoked with one argument: the Number value for which to return the plural group. + * @param {PluralGeneratorOptions} options A JSON object including none or any of the following options. + * type Optional String cardinal (default), or ordinal. + * @returns {Function} Return a function that returns the value's corresponding plural group: zero, one, two, few, many, or other. + */ + pluralGenerator(options?: PluralGeneratorOptions): (value: number) => string; + + /** + * Returns the value's corresponding plural group: zero, one, two, few, many, or other. + * @param {number} value A Number for which to return the plural group. + * @param {PluralGeneratorOptions} options A JSON object including none or any of the following options. + * type Optional String cardinal (default), or ordinal. + * @returns {string} Returns the value's corresponding plural group: zero, one, two, few, many, or other. + */ + plural(value: number, options?: PluralGeneratorOptions): string; + + /** + * Returns a function that formats a relative time according to the given unit, options, and the default/instance locale. + * The returned function is invoked with one argument: the number value to be formatted. + * @param unit String value indicating the unit to be formatted. eg. "day", "week", "month", etc. + * @param options form: [String] eg. "short" or "narrow". Or falsy for default long form. + * @returns {Function} Returns a function that formats a relative time according to the given unit. + */ + relativeTimeFormatter(unit: string, options?: RelativeTimeFormatterOptions): (value: number) => string; + + /** + * Return a relative time according to the given unit + * @param {number} value The number to be formatted. + * @param {string} unit String value indicating the unit to be formatted. eg. "day", "week", "month", etc. + * @param options form: [String] eg. "short" or "narrow". Or falsy for default long form. + * @returns {string} Return a relative time according to the given unit. + */ + formatRelativeTime(value: number, unit: string, options?: RelativeTimeFormatterOptions): string; + + /** + * Returns a function that formats a unit according to the given unit, options, and the default/instance locale. + * The returned function is invoked with one argument: the number value to be formatted. + * @param unit String value indicating the unit to be formatted. eg. "day", "week", "month", etc. Could also be a compound unit, eg. "mile-per-hour" or "mile/hour" + * @param options form: [String] eg. "long", "short" or "narrow". + * @returns {Function} Returns a function that formats a unit according to the given unit, options, and the default/instance locale. + */ + unitFormatter(unit: string, options?: UnitFormatterOptions): (value: number) => string; + + /** + * Alias for .unitFormatter( unit, options )( value ). + * @param {number} value The number to be formatted. + * @param {string} unit String value indicating the unit to be formatted. eg. "day", "week", "month", etc. Could also be a compound unit, eg. "mile-per-hour" or "mile/hour" + * @param {UnitFormatterOptions} options form: [String] eg. "long", "short" or "narrow". + * @returns {string} Returns the unit formatted. + */ + formatUnit(value: number, unit: string, options?: UnitFormatterOptions): string + + /** + * Create a Globalize instance. + * @param {string} Locale string of the instance. + * @returns {Globalize} A Globalize instance + */ + new (locale: string): Static; + /** + * Create a Globalize instance. + * @param cldr Cldr instance of the instance. + * @returns {Globalize} A Globalize instance + */ + new (cldr: Cldr.CldrStatic): Static; + } } - -interface CommonNumberFormatterOptions { - /** - * Non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary. - */ - minimumIntegerDigits?: number; - /** - * Non-negative integer Number values indicating the minimum and maximum fraction digits to be used. - * Numbers will be rounded or padded with trailing zeroes if necessary. - * Either one or both of these properties must be present. - * If they are, they will override minimum and maximum fraction digits derived from the CLDR patterns. - */ - minimumFractionDigits?: number; - /** - * Non-negative integer Number values indicating the minimum and maximum fraction digits to be used. - * Numbers will be rounded or padded with trailing zeroes if necessary. - * Either one or both of these properties must be present. - * If they are, they will override minimum and maximum fraction digits derived from the CLDR patterns. - */ - maximumFractionDigits?: number; - /** - * Positive integer Number values indicating the minimum and maximum fraction digits to be shown. - * Either none or both of these properties are present - * If they are, they override minimum and maximum integer and fraction digits. - * The formatter uses however many integer and fraction digits are required to display the specified number of significant digits. - */ - minimumSignificantDigits?: number; - /** - * Positive integer Number values indicating the minimum and maximum fraction digits to be shown. - * Either none or both of these properties are present. - * If they are, they override minimum and maximum integer and fraction digits. - * The formatter uses however many integer and fraction digits are required to display the specified number of significant digits. - */ - maximumSignificantDigits?: number; - /** - * String with rounding method ceil, floor, round (default), or truncate. - */ - round?: "ceil" | "floor" | "round" | "truncate"; - /** - * Boolean (default is true) value indicating whether a grouping separator should be used. - */ - useGrouping?: boolean; -} - -interface NumberFormatterOptions extends CommonNumberFormatterOptions { - /** - * decimal (default), or percent - */ - style?: "decimal" | "percent"; -} - -interface CurrencyFormatterOptions extends CommonNumberFormatterOptions { - /** - * symbol (default), accounting, code or name. - */ - style?: "symbol" | "accounting" | "code" | "name"; -} - -interface NumberParserOptions { - /** - * decimal (default), or percent. - */ - style?: "decimal" | "percent"; -} - -interface PluralGeneratorOptions { - /** - * cardinal (default), or ordinal. - */ - type?: "cardinal" | "ordinal"; -} - -interface RelativeTimeFormatterOptions { - /** - * eg. "short" or "narrow". Or falsy for default long form - */ - form?: "short" | "narrow"; -} - -interface UnitFormatterOptions { - /** - * form: [String] eg. "long", "short" or "narrow". - */ - form?: "long" | "short" | "narrow"; - - /** - * numberFormatter: [Function] a number formatter function. Defaults to Globalize .numberFormatter() for the current locale using the default options. - */ - numberFormatter?: NumberFormatterOptions; -} - -interface GlobalizeStatic { - - cldr: Cldr.CldrStatic; - - /** - * Globalize.loadTimeZone ( ianaTzData, ... ) - * This method allows you to load IANA time zone data to enable options.timeZone feature on date formatters and parsers. - * @param {Object} ianaTzData A JSON object with zdumped IANA timezone data. Get the data via https://github.com/rxaviers/iana-tz-data - */ - loadTimeZone(ianaTzData: Object): void; - - /** - * Globalize.load( json, ... ) - * @param {Object} [JSON] - * Load resolved or unresolved cldr data. - * Somewhat equivalent to previous Globalize.addCultureInfo(...). - */ - load(json: Object): void; - - /** - * Globalize.locale() - * Return the default Cldr instance. - */ - locale(): Cldr.CldrStatic; - - /** - * Globalize.locale( [locale] ) - * @param {string} locale - * Set default Cldr instance - * Return the default Cldr instance. - */ - - locale(locale: string): Cldr.CldrStatic; - /** - * Globalize.locale( cldr ) - * @param {Cldr} cldr [Cldr instance] - * Set default Cldr instance - * Return the default Cldr instance. - */ - locale(cldr: Cldr.CldrStatic): Cldr.CldrStatic; - - /** - * .dateFormatter( options ) - * @param {DateFormatterOptions} options see date/expand_pattern for more info. - * @returns {Function} Return a function that formats a date according to the given `options` and the default/instance locale. - */ - dateFormatter(options?: DateFormatterOptions): (value: Date) => string; - - //Return a function that parses a string representing a date into a JavaScript Date object according to the given options. The default parsing assumes numeric year, month, and day (i.e., { skeleton: "yMd" }). - dateParser(options?: DateFormatterOptions): (value: string) => Date; - - //Alias for .dateFormatter( [options] )( value ). - formatDate(value: Date, options?: DateFormatterOptions): string; - /** - * Alias for .dateParser( [options] )( value ). - * @param {string} value The object whose module id you wish to determine. - * @param {DateFormatterOptions} options The object whose module id you wish to determine. - * @returns {Date} Return the value as a Date. - */ - parseDate(value: string, options?: DateFormatterOptions): Date; - - /** - * Load messages data. - * @param {Object} json JSON object of messages data. Keys can use any character, except /, { and }. Values (i.e., the message content itself) can contain any character. - * @returns {void} - */ - loadMessages(json: Object): void; - /** - * Return a function that formats a message (using ICU message format pattern) given its path and a set of variables into a user-readable string. It supports pluralization and gender inflections. - * @param path String or Array containing the path of the message content, eg. "greetings/bye", or [ "greetings", "bye" ]. - * @returns {Function} Return A function that formats a message (using ICU message format pattern) given its path and a set of variables into a user-readable string. It supports pluralization and gender inflections. - */ - messageFormatter(path: string | string[]): (variables?: string | string[] | Object) => string; - - /** - * Formats a message (using ICU message format pattern) given its path and a set of variables into a user-readable string - * @param path String or Array containing the path of the message content, eg. "greetings/bye", or [ "greetings", "bye" ]. - * @param variables Variables can be Objects, where each property can be referenced by name inside a message; or Arrays, where each entry of the Array can be used inside a message, using numeric indices. When passing one or more arguments of other types, they're converted to an Array and used as such. - * @returns {string} Return a user-readable string. - */ - formatMessage(path: string | string[], variables?: string | string[] | Object): string - - /** - * Return a function that formats a number according to the given options or locale's defaults. - * @param {NumberFormatterOptions} options A JSON object including none or any of the following options. - * style Optional String decimal (default), or percent. - * minimumIntegerDigits Optional Non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary. - * minimumFractionDigits and maximumFractionDigits Optional Non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary. Either one or both of these properties must be present. If they are, they will override minimum and maximum fraction digits derived from the CLDR patterns. - * minimumSignificantDigits and maximumSignificantDigits Optional Positive integer Number values indicating the minimum and maximum fraction digits to be shown. Either none or both of these properties are present. If they are, they override minimum and maximum integer and fraction digits. The formatter uses however many integer and fraction digits are required to display the specified number of significant digits. - * round Optional String with rounding method ceil, floor, round (default), or truncate. - * useGrouping Optional Boolean (default is true) value indicating whether a grouping separator should be used. - * @returns {Function} Return a function that formats a number according to the given options. - */ - numberFormatter(options?: NumberFormatterOptions): (value: number) => string; - - /** - * Return a function that parses a string representing a number according to the given options or locale's defaults. - * @param {NumberParserOptions} options A JSON object including none or any of the following options. - * style Optional String decimal (default), or percent. - * @returns {Function} Return a function that parses a String representing a number according to the given options. If value is invalid, NaN is returned. - */ - numberParser(options?: NumberParserOptions): (value: string) => number - - /** - * Return a number formatted according to the given options or locale's defaults. - * @param {number} value The number to format - * @param {NumberFormatterOptions} options A JSON object including none or any of the following options. - * style Optional String decimal (default), or percent. - * minimumIntegerDigits Optional Non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary. - * minimumFractionDigits and maximumFractionDigits Optional Non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary. Either one or both of these properties must be present. If they are, they will override minimum and maximum fraction digits derived from the CLDR patterns. - * minimumSignificantDigits and maximumSignificantDigits Optional Positive integer Number values indicating the minimum and maximum fraction digits to be shown. Either none or both of these properties are present. If they are, they override minimum and maximum integer and fraction digits. The formatter uses however many integer and fraction digits are required to display the specified number of significant digits. - * round Optional String with rounding method ceil, floor, round (default), or truncate. - * useGrouping Optional Boolean (default is true) value indicating whether a grouping separator should be used. - * @returns {string} Return the number formatted - */ - formatNumber(value: number, options?: NumberFormatterOptions): string; - - /** - * A function that parses a string representing a number according to the given options or locale's defaults. - * @param {string} value The number as string to parse - * @param {NumberParserOptions} options A JSON object including none or any of the following options. - * style Optional String decimal (default), or percent. - * @returns {number} Return a number according to the given options. If value is invalid, NaN is returned. - */ - parseNumber(value: string, options?: NumberParserOptions): number; - - /** - * Return a function that formats a currency according to the given options or locale's defaults. - * The returned function is invoked with one argument: the Number value to be formatted. - * @param {string} currency 3-letter currency code as defined by ISO 4217, eg. USD. - * @param {CurrencyFormatterOptions} options A JSON object including none or any of the following options. - * @returns {Function} Return a function that formats a currency - */ - currencyFormatter(currency: string, options?: CurrencyFormatterOptions): (value: number) => string; - - /** - * Return a currency formatted according to the given options or locale's defaults. - * @param {number} value The value to format. - * @param {string} currency 3-letter currency code as defined by ISO 4217, eg. USD. - * @param {CurrencyFormatterOptions} options A JSON object including none or any of the following options. - * @returns {string} Return a string formatted in the currency according to the value and the options - */ - formatCurrency(value: number, currency: string, options?: CurrencyFormatterOptions): string; - - /** - * Return a function that returns the value's corresponding plural group: zero, one, two, few, many, or other. - * The returned function is invoked with one argument: the Number value for which to return the plural group. - * @param {PluralGeneratorOptions} options A JSON object including none or any of the following options. - * type Optional String cardinal (default), or ordinal. - * @returns {Function} Return a function that returns the value's corresponding plural group: zero, one, two, few, many, or other. - */ - pluralGenerator(options?: PluralGeneratorOptions): (value: number) => string; - - /** - * Returns the value's corresponding plural group: zero, one, two, few, many, or other. - * @param {number} value A Number for which to return the plural group. - * @param {PluralGeneratorOptions} options A JSON object including none or any of the following options. - * type Optional String cardinal (default), or ordinal. - * @returns {string} Returns the value's corresponding plural group: zero, one, two, few, many, or other. - */ - plural(value: number, options?: PluralGeneratorOptions): string; - - /** - * Returns a function that formats a relative time according to the given unit, options, and the default/instance locale. - * The returned function is invoked with one argument: the number value to be formatted. - * @param unit String value indicating the unit to be formatted. eg. "day", "week", "month", etc. - * @param options form: [String] eg. "short" or "narrow". Or falsy for default long form. - * @returns {Function} Returns a function that formats a relative time according to the given unit. - */ - relativeTimeFormatter(unit: string, options?: RelativeTimeFormatterOptions): (value: number) => string; - - /** - * Return a relative time according to the given unit - * @param {number} value The number to be formatted. - * @param {string} unit String value indicating the unit to be formatted. eg. "day", "week", "month", etc. - * @param options form: [String] eg. "short" or "narrow". Or falsy for default long form. - * @returns {string} Return a relative time according to the given unit. - */ - formatRelativeTime(value: number, unit: string, options?: RelativeTimeFormatterOptions): string; - - /** - * Returns a function that formats a unit according to the given unit, options, and the default/instance locale. - * The returned function is invoked with one argument: the number value to be formatted. - * @param unit String value indicating the unit to be formatted. eg. "day", "week", "month", etc. Could also be a compound unit, eg. "mile-per-hour" or "mile/hour" - * @param options form: [String] eg. "long", "short" or "narrow". - * @returns {Function} Returns a function that formats a unit according to the given unit, options, and the default/instance locale. - */ - unitFormatter(unit: string, options?: UnitFormatterOptions): (value: number) => string; - - /** - * Alias for .unitFormatter( unit, options )( value ). - * @param {number} value The number to be formatted. - * @param {string} unit String value indicating the unit to be formatted. eg. "day", "week", "month", etc. Could also be a compound unit, eg. "mile-per-hour" or "mile/hour" - * @param {UnitFormatterOptions} options form: [String] eg. "long", "short" or "narrow". - * @returns {string} Returns the unit formatted. - */ - formatUnit(value: number, unit: string, options?: UnitFormatterOptions): string - - /** - * Create a Globalize instance. - * @param {string} Locale string of the instance. - * @returns {Globalize} A Globalize instance - */ - new (locale: string): GlobalizeStatic; - /** - * Create a Globalize instance. - * @param cldr Cldr instance of the instance. - * @returns {Globalize} A Globalize instance - */ - new (cldr: Cldr.CldrStatic): GlobalizeStatic; -} - -declare var Globalize: GlobalizeStatic; diff --git a/types/glue/glue-tests.ts b/types/glue/glue-tests.ts index 7ac309352c..dd400697e6 100644 --- a/types/glue/glue-tests.ts +++ b/types/glue/glue-tests.ts @@ -7,8 +7,9 @@ const manifest: Glue.Manifest = { }, register: { plugins: [ + "./test-plugin.js", { - plugin: "./test", + plugin: "./test.js", routes: { prefix: "test" } diff --git a/types/glue/index.d.ts b/types/glue/index.d.ts index d1bf010ffe..060d729d66 100644 --- a/types/glue/index.d.ts +++ b/types/glue/index.d.ts @@ -24,8 +24,8 @@ export interface Plugin { export interface Manifest { server: ServerOptions; register?: { - plugins: string | Plugin[] + plugins: string[] | Plugin[] | Array<(string|Plugin)> }; } -export function compose(manifest: Manifest, options?: Options): Server; +export function compose(manifest: Manifest, options?: Options): Promise; diff --git a/types/gm/gm-tests.ts b/types/gm/gm-tests.ts index 9f59854467..b2efd9505a 100644 --- a/types/gm/gm-tests.ts +++ b/types/gm/gm-tests.ts @@ -62,6 +62,7 @@ declare const font: string; declare const quality: number; declare const align: string; declare const depth: number; +declare const defineValue: string; let readStream: stream.PassThrough; gm(src) @@ -104,7 +105,7 @@ gm(src) .crop(width, height, x, y, usePercent) .cycle(factor) .deconstruct() - .define() + .define(defineValue) .delay(time) .density(width, height) .despeckle() diff --git a/types/gm/index.d.ts b/types/gm/index.d.ts index 0670f0ae0f..5e8853efce 100644 --- a/types/gm/index.d.ts +++ b/types/gm/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for gm 1.17 +// Type definitions for gm 1.18 // Project: https://github.com/aheckmann/gm // Definitions by: Joel Spadin , Maarten van Vliet // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -123,7 +123,7 @@ declare namespace m { crop(width: number, height: number, x?: number, y?: number, percent?: boolean): State; cycle(amount: number): State; deconstruct(): State; - define(): State; + define(value: string): State; delay(milliseconds: number): State; density(width: number, height: number): State; despeckle(): State; diff --git a/types/google-apps-script/google-apps-script.calendar.d.ts b/types/google-apps-script/google-apps-script.calendar.d.ts index 34a3d46a11..21770b6efb 100644 --- a/types/google-apps-script/google-apps-script.calendar.d.ts +++ b/types/google-apps-script/google-apps-script.calendar.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Google Apps Script 2017-05-12 +// Type definitions for Google Apps Script 2018-05-03 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen +// linlex // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -24,6 +25,7 @@ declare namespace GoogleAppsScript { deleteCalendar(): void; getColor(): string; getDescription(): string; + getEventById(iCalId: string): CalendarEvent; getEventSeriesById(iCalId: string): CalendarEventSeries; getEvents(startTime: Date, endTime: Date): CalendarEvent[]; getEvents(startTime: Date, endTime: Date, options: Object): CalendarEvent[]; diff --git a/types/google-apps-script/google-apps-script.spreadsheet.d.ts b/types/google-apps-script/google-apps-script.spreadsheet.d.ts index 7cd1cb8946..b656032a96 100644 --- a/types/google-apps-script/google-apps-script.spreadsheet.d.ts +++ b/types/google-apps-script/google-apps-script.spreadsheet.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Google Apps Script 2017-05-12 +// Type definitions for Google Apps Script 2018-05-03 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen +// linlex // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -11,7 +12,7 @@ declare namespace GoogleAppsScript { /** * This service allows scripts to create, access, and modify Google Sheets files. See also the guide to storing data in spreadsheets. - * + * * https://developers.google.com/apps-script/guides/sheets */ export module Spreadsheet { @@ -858,6 +859,7 @@ declare namespace GoogleAppsScript { autoResizeColumn(columnPosition: Integer): Sheet; clear(): Sheet; clear(options: Object): Sheet; + clearConditionalFormatRules(): void; clearContents(): Sheet; clearFormats(): Sheet; clearNotes(): Sheet; @@ -870,6 +872,7 @@ declare namespace GoogleAppsScript { getActiveRange(): Range; getCharts(): EmbeddedChart[]; getColumnWidth(columnPosition: Integer): Integer; + getConditionalFormatRules(): ConditionalFormatRule[]; getDataRange(): Range; getFrozenColumns(): Integer; getFrozenRows(): Integer; @@ -923,6 +926,8 @@ declare namespace GoogleAppsScript { setActiveSelection(range: Range): Range; setActiveSelection(a1Notation: string): Range; setColumnWidth(columnPosition: Integer, width: Integer): Sheet; + setConditionalFormatRules(rules: ReadonlyArray): void; + setCurrentCell(cell: Range): void; setFrozenColumns(columns: Integer): void; setFrozenRows(rows: Integer): void; setName(name: string): Sheet; @@ -1066,6 +1071,14 @@ declare namespace GoogleAppsScript { * An enumeration representing the data-validation criteria that can be set on a range. */ DataValidationCriteria: typeof DataValidationCriteria; + /** + * An enumeration representing the interpolation options for calculating a value to be used in a GradientCondition in a ConditionalFormatRule. + */ + InterpolationType: typeof InterpolationType; + /** + * An enumeration representing the boolean criteria that can be used in conditional format or filter. + */ + BooleanCriteria: typeof BooleanCriteria; /** * An enumeration representing the parts of a spreadsheet that can be protected from edits. */ @@ -1111,27 +1124,408 @@ declare namespace GoogleAppsScript { */ open(file: Drive.File): Spreadsheet; /** - * Opens the spreadsheet with the given ID. + * Opens the spreadsheet with the given ID. */ openById(id: string): Spreadsheet; /** - * Opens the spreadsheet with the given url. + * Opens the spreadsheet with the given url. */ openByUrl(url: string): Spreadsheet; /** - * Sets the active range for the application. + * Sets the active range for the application. */ setActiveRange(range: Range): Range; /** - * Sets the active sheet in a spreadsheet. + * Sets the active sheet in a spreadsheet. */ setActiveSheet(sheet: Sheet): Sheet; /** - * Sets the active spreadsheet. + * Sets the active spreadsheet. */ setActiveSpreadsheet(newActiveSpreadsheet: Spreadsheet): void; + /** + * Creates a builder for a conditional formatting rule. + */ + newConditionalFormatRule(): ConditionalFormatRuleBuilder; } + /** + * Access conditional formatting rules. To create a new rule, use SpreadsheetApp.newConditionalFormatRule() and + * ConditionalFormatRuleBuilder. You can use Sheet.setConditionalFormatRules(rules) to set the rules for a given + * sheet. + */ + export interface ConditionalFormatRule { + /** + * Returns a rule builder preset with this rule's settings. + */ + copy(): ConditionalFormatRuleBuilder; + + /** + * Retrieves the rule's BooleanCondition information if this rule uses boolean condition criteria. + */ + getBooleanCondition(): BooleanCondition; + + /** + * Retrieves the rule's GradientCondition information, if this rule uses gradient condition criteria. + */ + getGradientCondition(): GradientCondition; + + /** + * Retrieves the ranges to which this conditional format rule is applied. + */ + getRanges(): Range[]; + } + + /** + * Builder for conditional format rules. + */ + export interface ConditionalFormatRuleBuilder { + + /** + * Constructs a conditional format rule from the settings applied to the builder. + */ + build(): ConditionalFormatRule; + + /** + * Returns a rule builder preset with this rule's settings. + */ + copy(): ConditionalFormatRuleBuilder; + + /** + * Retrieves the rule's BooleanCondition information if this rule uses boolean condition criteria. + */ + getBooleanCondition(): BooleanCondition; + + /** + * Retrieves the rule's GradientCondition information, if this rule uses gradient condition criteria. + */ + getGradientCondition(): GradientCondition; + + /** + * Retrieves the ranges to which this conditional format rule is applied. + */ + getRanges(): Range[]; + + /** + * Sets the background color for the conditional format rule's format. + */ + setBackground(color: string): ConditionalFormatRuleBuilder; + + /** + * Sets text bolding for the conditional format rule's format. + */ + setBold(bold: boolean): ConditionalFormatRuleBuilder; + + /** + * Sets the font color for the conditional format rule's format. + */ + setFontColor(color: string): ConditionalFormatRuleBuilder; + + /** + * Clears the conditional format rule's gradient maxpoint value, and instead uses the maximum value in the rule's ranges. + */ + setGradientMaxpoint(color: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule's gradient maxpoint fields. + */ + setGradientMaxpointWithValue(color: string, type: InterpolationType, value: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule's gradient midpoint fields. + */ + setGradientMidpointWithValue(color: string, type: InterpolationType, value: string): ConditionalFormatRuleBuilder; + + /** + * Clears the conditional format rule's gradient minpoint value, and instead uses the minimum value in the rule's ranges. + */ + setGradientMinpoint(color: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule's gradient minpoint fields. + */ + setGradientMinpointWithValue(color: string, type: SpreadsheetApp.InterpolationType, value: string): ConditionalFormatRuleBuilder; + + /** + * Sets text italics for the conditional format rule's format. + */ + setItalic(italic: boolean): ConditionalFormatRuleBuilder; + + /** + * Sets one or more ranges to which this conditional format rule is applied. + */ + setRanges(ranges: ReadonlyArray): ConditionalFormatRuleBuilder; + + /** + * Sets text strikethrough for the conditional format rule's format. + */ + setStrikethrough(strikethrough: boolean): ConditionalFormatRuleBuilder; + + /** + * Sets text underlining for the conditional format rule's format. + */ + setUnderline(underline: boolean): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when the cell is empty. + */ + whenCellEmpty(): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when the cell is not empty. + */ + whenCellNotEmpty(): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a date is after the given value. + */ + whenDateAfter(date: Date): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a date is after the given relative date. + */ + whenDateAfter(date: Date): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a date is before the given date. + */ + whenDateBefore(date: Date): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a date is before the given relative date. + */ + whenDateBefore(date: Date): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a date is equal to the given date. + */ + whenDateEqualTo(date: Date): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a date is equal to the given relative date. + */ + whenDateEqualTo(date: Date): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when that the given formula evaluates to true. + */ + whenFormulaSatisfied(formula: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a number falls between, or is either of, two specified values. + */ + whenNumberBetween(start: number, end: number): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a number is equal to the given value. + */ + whenNumberEqualTo(number: number): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a number is greater than the given value. + */ + whenNumberGreaterThan(number: number): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a number is greater than or equal to the given value. + */ + whenNumberGreaterThanOrEqualTo(number: number): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional conditional format rule to trigger when a number less than the given value. + */ + whenNumberLessThan(number: number): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a number less than or equal to the given value. + */ + whenNumberLessThanOrEqualTo(number: number): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a number does not fall between, and is neither of, two specified values. + */ + whenNumberNotBetween(start: number, end: number): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when a number is not equal to the given value. + */ + whenNumberNotEqualTo(number: number): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when that the input contains the given value. + */ + whenTextContains(text: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when that the input does not contain the given value. + */ + whenTextDoesNotContain(text: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when that the input ends with the given value. + */ + whenTextEndsWith(text: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when that the input is equal to the given value. + */ + whenTextEqualTo(text: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to trigger when that the input starts with the given value. + */ + whenTextStartsWith(text: string): ConditionalFormatRuleBuilder; + + /** + * Sets the conditional format rule to criteria defined by BooleanCriteria values, typically taken from the criteria and arguments of an existing rule. + */ + withCriteria(criteria: BooleanCriteria, args: ReadonlyArray): ConditionalFormatRuleBuilder; + } + + /** + * An enumeration representing the boolean criteria that can be used in conditional format or filter. + */ + export enum BooleanCriteria { + /** + * The criteria is met when a cell is empty. + */ + CELL_EMPTY, + + /** + * The criteria is met when a cell is not empty. + */ + CELL_NOT_EMPTY, + + /** + * The criteria is met when a date is after the given value. + */ + DATE_AFTER, + + /** + * The criteria is met when a date is before the given value. + */ + DATE_BEFORE, + + /** + * The criteria is met when a date is equal to the given value. + */ + DATE_EQUAL_TO, + + /** + * The criteria is met when a date is after the relative date value. + */ + DATE_AFTER_RELATIVE, + + /** + * The criteria is met when a date is before the relative date value. + */ + DATE_BEFORE_RELATIVE, + + /** + * The criteria is met when a date is equal to the relative date value. + */ + DATE_EQUAL_TO_RELATIVE, + + /** + * The criteria is met when a number that is between the given values. + */ + NUMBER_BETWEEN, + + /** + * The criteria is met when a number that is equal to the given value. + */ + NUMBER_EQUAL_TO, + + /** + * The criteria is met when a number that is greater than the given value. + */ + NUMBER_GREATER_THAN, + + /** + * The criteria is met when a number that is greater than or equal to the given value. + */ + NUMBER_GREATER_THAN_OR_EQUAL_TO, + + /** + * The criteria is met when a number that is less than the given value. + */ + NUMBER_LESS_THAN, + + /** + * The criteria is met when a number that is less than or equal to the given value. + */ + NUMBER_LESS_THAN_OR_EQUAL_TO, + + /** + * The criteria is met when a number that is not between the given values. + */ + NUMBER_NOT_BETWEEN, + + /** + * The criteria is met when a number that is not equal to the given value. + */ + NUMBER_NOT_EQUAL_TO, + + /** + * The criteria is met when the input contains the given value. + */ + TEXT_CONTAINS, + + /** + * The criteria is met when the input does not contain the given value. + */ + TEXT_DOES_NOT_CONTAIN, + + /** + * The criteria is met when the input is equal to the given value. + */ + TEXT_EQUAL_TO, + + /** + * The criteria is met when the input begins with the given value. + */ + TEXT_STARTS_WITH, + + /** + * The criteria is met when the input ends with the given value. + */ + TEXT_ENDS_WITH, + + /** + * The criteria is met when the input makes the given formula evaluate to true. + */ + CUSTOM_FORMULA + } + + /** + * An enumeration representing the interpolation options for calculating a value to be used in a GradientCondition in a ConditionalFormatRule. + */ + export enum InterpolationType { + /** + * Use the number as as specific interpolation point for a gradient condition. + */ + NUMBER, + + /** + * Use the number as a percentage interpolation point for a gradient condition. + */ + PERCENT, + + /** + * Use the number as a percentile interpolation point for a gradient condition. + */ + PERCENTILE, + + /** + * Infer the minimum number as a specific interpolation point for a gradient condition. + */ + MIN, + + /** + * Infer the maximum number as a specific interpolation point for a gradient condition. + */ + MAX + } } } diff --git a/types/google-cloud__datastore/google-cloud__datastore-tests.ts b/types/google-cloud__datastore/google-cloud__datastore-tests.ts index 3093a8256a..cb723d0d5b 100644 --- a/types/google-cloud__datastore/google-cloud__datastore-tests.ts +++ b/types/google-cloud__datastore/google-cloud__datastore-tests.ts @@ -14,8 +14,7 @@ interface TestEntity { name?: string; location?: string; symbol?: string; - - [keySymbol: string]: any; + [Datastore.KEY]?: any; } const kind = 'Company'; diff --git a/types/google-cloud__datastore/index.d.ts b/types/google-cloud__datastore/index.d.ts index 8c9cdd23c3..f864f965c9 100644 --- a/types/google-cloud__datastore/index.d.ts +++ b/types/google-cloud__datastore/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/googleapis/nodejs-datastore // Definitions by: Antoine Beauvais-Lacasse // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.7 /// @@ -36,7 +36,7 @@ declare module '@google-cloud/datastore' { class Datastore extends DatastoreRequest_ { constructor(options: InitOptions); - readonly KEY: KEY_SYMBOL; + readonly KEY: typeof Datastore.KEY; readonly MORE_RESULTS_AFTER_CURSOR: MoreResultsAfterCursor; readonly MORE_RESULTS_AFTER_LIMIT: MoreResultsAfterLimit; readonly NO_MORE_RESULTS: NoMoreResults; @@ -81,7 +81,7 @@ declare module '@google-cloud/datastore' { } namespace Datastore { - const KEY: KEY_SYMBOL; + const KEY: unique symbol; const MORE_RESULTS_AFTER_CURSOR: MoreResultsAfterCursor; const MORE_RESULTS_AFTER_LIMIT: MoreResultsAfterLimit; const NO_MORE_RESULTS: NoMoreResults; @@ -93,6 +93,8 @@ declare module '@google-cloud/datastore' { } declare module '@google-cloud/datastore/entity' { + import Datastore = require("@google-cloud/datastore"); + interface DatastoreInt { value: string; } @@ -133,7 +135,7 @@ declare module '@google-cloud/datastore/entity' { parent?: DatastoreKey; } - type KEY_SYMBOL = symbol; + type KEY_SYMBOL = typeof Datastore.KEY; interface DatastorePayload { key: DatastoreKey; diff --git a/types/google-libphonenumber/index.d.ts b/types/google-libphonenumber/index.d.ts index 9a46ac69a6..dd73c56790 100644 --- a/types/google-libphonenumber/index.d.ts +++ b/types/google-libphonenumber/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for libphonenumber v7.4.3 // Project: https://github.com/googlei18n/libphonenumber, https://github.com/seegno/google-libphonenumber // Definitions by: Leon Yu +// Roman Jurkov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace libphonenumber { @@ -112,6 +113,7 @@ declare namespace libphonenumber { export class PhoneNumberUtil { static getInstance(): PhoneNumberUtil format(phoneNumber: PhoneNumber, format: PhoneNumberFormat): string; + formatOutOfCountryCallingNumber(phoneNumber: PhoneNumber, regionDialingFrom?: string): string; getNddPrefixForRegion(regionCode?: string, stripNonDigits?: boolean): string | undefined; getNumberType(phoneNumber: PhoneNumber): PhoneNumberType; getCountryCodeForRegion(supportedRegion:string):string; diff --git a/types/google-map-react/google-map-react-tests.tsx b/types/google-map-react/google-map-react-tests.tsx index 464f840658..552e75d362 100644 --- a/types/google-map-react/google-map-react-tests.tsx +++ b/types/google-map-react/google-map-react-tests.tsx @@ -1,9 +1,20 @@ -import GoogleMapReact, { BootstrapURLKeys } from 'google-map-react'; +import GoogleMapReact, { BootstrapURLKeys, MapOptions } from 'google-map-react'; import * as React from 'react'; const center = { lat: 0, lng: 0 }; const key: BootstrapURLKeys = { key: 'my-google-maps-key' }; const client: BootstrapURLKeys = { client: 'my-client-identifier', v: '3.28' , language: 'en' }; +const options: MapOptions = { + zoomControl: false, + gestureHandling: 'cooperative', + styles: [ + { + featureType: "administrative", + elementType: "all", + stylers: [ {saturation: "-100"} ] + } + ], +}; -; +; diff --git a/types/google-map-react/index.d.ts b/types/google-map-react/index.d.ts index 7f34a68cc4..ca5348323a 100644 --- a/types/google-map-react/index.d.ts +++ b/types/google-map-react/index.d.ts @@ -8,15 +8,48 @@ import * as React from 'react'; export type BootstrapURLKeys = ({ key: string; } | { client: string; v: string; }) & { language?: string }; -export interface Options { - styles?: any[]; - scrollwheel?: boolean; - panControl?: boolean; +export interface MapTypeStyle { + elementType: string; + featureType: string; + stylers: any[]; +} + +export interface MapOptions { + // Any options from https://developers.google.com/maps/documentation/javascript/reference/3/#MapOptions + // excluding 'zoom' and 'center' which get set via props. + backgroundColor?: string; + clickableIcons?: boolean; + disableDefaultUI?: boolean; + disableDoubleClickZoom?: boolean; + draggable?: boolean; + draggableCursor?: string; + draggingCursor?: string; + fullscreenControl?: boolean; + fullscreenControlOptions?: {position: number}; + gestureHandling?: string; + heading?: number; + keyboardShortcuts?: boolean; mapTypeControl?: boolean; - minZoomOverride?: boolean; + mapTypeControlOptions?: any; + mapTypeId?: string; minZoom?: number; maxZoom?: number; - gestureHandling?: string; + noClear?: boolean; + panControl?: boolean; + panControlOptions?: {position: number}; + rotateControl?: boolean; + rotateControlOptions?: {position: number}; + scaleControl?: boolean; + scaleControlOptions?: any; + scrollwheel?: boolean; + streetView?: any; + streetViewControl?: boolean; + streetViewControlOptions?: {position: number}; + styles?: MapTypeStyle[]; + tilt?: number; + zoomControl?: boolean; + zoomControlOptions?: {position: number}; + minZoomOverride?: boolean; // Not a standard option; specific to google-map-react: https://github.com/google-map-react/google-map-react/pull/154 } export interface Maps { @@ -87,7 +120,7 @@ export interface Props { defaultZoom?: number; zoom?: number; hoverDistance?: number; - options?: Options | ((maps: Maps) => Options); + options?: MapOptions | ((maps: Maps) => MapOptions); margin?: any[]; debounced?: boolean; draggable?: boolean; diff --git a/types/got/got-tests.ts b/types/got/got-tests.ts index 8c88cef3bc..1eb2d89aa8 100644 --- a/types/got/got-tests.ts +++ b/types/got/got-tests.ts @@ -1,10 +1,12 @@ import got = require('got'); import cookie = require('cookie'); import FormData = require('form-data'); +import Keyv = require('keyv'); import * as fs from 'fs'; import * as http from 'http'; import * as https from 'https'; import * as url from 'url'; +import QuickLRU = require('quick-lru'); let str: string; let buf: Buffer; @@ -242,7 +244,15 @@ got('todomvc', { }); got('todomvc', { - cache: new Map() + cache: new Map(), +}).then(res => res.fromCache); + +got('todomvc', { + cache: new Keyv(), +}).then(res => res.fromCache); + +got('todomvc', { + cache: new QuickLRU(), }).then(res => res.fromCache); got(new url.URL('http://todomvc.com')); diff --git a/types/got/index.d.ts b/types/got/index.d.ts index 47c281fb53..f786af118e 100644 --- a/types/got/index.d.ts +++ b/types/got/index.d.ts @@ -119,7 +119,7 @@ declare namespace got { followRedirect?: boolean; decompress?: boolean; useElectronNet?: boolean; - cache?: Map; + cache?: Cache; agent?: http.Agent | boolean | AgentOptions; throwHttpErrors?: boolean; } @@ -137,6 +137,12 @@ declare namespace got { type RetryFunction = (retry: number, error: any) => number; + interface Cache { + set(key: string, value: any, ttl?: number): any; + get(key: string): any; + delete(key: string): any; + } + interface Response extends http.IncomingMessage { body: B; url: string; diff --git a/types/graphql-deduplicator/graphql-deduplicator-tests.ts b/types/graphql-deduplicator/graphql-deduplicator-tests.ts new file mode 100644 index 0000000000..7da4764de2 --- /dev/null +++ b/types/graphql-deduplicator/graphql-deduplicator-tests.ts @@ -0,0 +1,4 @@ +import { deflate, inflate } from 'graphql-deduplicator'; + +deflate({}); +inflate({}); diff --git a/types/graphql-deduplicator/index.d.ts b/types/graphql-deduplicator/index.d.ts new file mode 100644 index 0000000000..079b7c31be --- /dev/null +++ b/types/graphql-deduplicator/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for graphql-deduplicator 2.0 +// Project: https://github.com/gajus/graphql-deduplicator#readme +// Definitions by: Luis Fernando Alvarez D. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export function deflate(response: object): { + [key: string]: any; +}; + +export function inflate(response: object): { + [key: string]: any; +}; diff --git a/types/graphql-deduplicator/tsconfig.json b/types/graphql-deduplicator/tsconfig.json new file mode 100644 index 0000000000..2254638503 --- /dev/null +++ b/types/graphql-deduplicator/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "graphql-deduplicator-tests.ts" + ] +} diff --git a/types/graphql-deduplicator/tslint.json b/types/graphql-deduplicator/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-deduplicator/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/graphql-depth-limit/graphql-depth-limit-tests.ts b/types/graphql-depth-limit/graphql-depth-limit-tests.ts new file mode 100644 index 0000000000..68a5aa51f9 --- /dev/null +++ b/types/graphql-depth-limit/graphql-depth-limit-tests.ts @@ -0,0 +1,29 @@ +import graphqlDepthLimit = require('graphql-depth-limit'); +import { + GraphQLSchema, + DocumentNode, + buildSchema, + Source, + parse, + validate, + specifiedRules +} from 'graphql'; + +const schema: GraphQLSchema = buildSchema(` + # graphql schema goes here... +`); +const document: DocumentNode = parse(new Source(` + # graphql query goes here... +`, 'GraphQL request')); + +validate(schema, document, [ graphqlDepthLimit(5) ]); + +validate(schema, document, [ ...specifiedRules, graphqlDepthLimit(10) ]); + +validate(schema, document, [ graphqlDepthLimit( + 10, + { ignore: [ /_trusted$/, 'idontcare' ] }, + (depths: any) => { + // do something.... + }, +)]); diff --git a/types/graphql-depth-limit/index.d.ts b/types/graphql-depth-limit/index.d.ts new file mode 100644 index 0000000000..281f8fdaff --- /dev/null +++ b/types/graphql-depth-limit/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for graphql-depth-limit 1.1 +// Project: https://github.com/stems/graphql-depth-limit#readme +// Definitions by: Siim Tiilen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +declare function depthLimit(depthLimit: number, options?: depthLimit.Options, callback?: (obj: any) => void): any; +export = depthLimit; + +declare namespace depthLimit { + interface Options { + ignore: Array boolean)>; + } +} diff --git a/types/graphql-depth-limit/tsconfig.json b/types/graphql-depth-limit/tsconfig.json new file mode 100644 index 0000000000..5c59137102 --- /dev/null +++ b/types/graphql-depth-limit/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "graphql-depth-limit-tests.ts" + ] +} diff --git a/types/graphql-depth-limit/tslint.json b/types/graphql-depth-limit/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-depth-limit/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/graphql/error/GraphQLError.d.ts b/types/graphql/error/GraphQLError.d.ts index 0be931bee0..ce31564fb1 100644 --- a/types/graphql/error/GraphQLError.d.ts +++ b/types/graphql/error/GraphQLError.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { getLocation } from "../language"; import { ASTNode } from "../language/ast"; import { Source } from "../language/source"; @@ -58,7 +59,7 @@ export class GraphQLError extends Error { /** * The original error thrown from a field resolver during execution. */ - readonly originalError: Error | void; + readonly originalError: Maybe; /** * Extension fields to add to the formatted error. @@ -68,10 +69,10 @@ export class GraphQLError extends Error { constructor( message: string, nodes?: ReadonlyArray | ASTNode | undefined, - source?: Source | void, - positions?: ReadonlyArray | void, - path?: ReadonlyArray | void, - originalError?: Error | void, - extensions?: { [key: string]: any } | void + source?: Maybe, + positions?: Maybe>, + path?: Maybe>, + originalError?: Maybe, + extensions?: Maybe<{ [key: string]: any }> ); } diff --git a/types/graphql/execution/execute.d.ts b/types/graphql/execution/execute.d.ts index 424bb62b5a..7ef4d5ce63 100644 --- a/types/graphql/execution/execute.d.ts +++ b/types/graphql/execution/execute.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { GraphQLError, locatedError } from "../error"; import { GraphQLSchema } from "../type/schema"; import { @@ -51,9 +52,9 @@ export type ExecutionArgs = { document: DocumentNode; rootValue?: any; contextValue?: any; - variableValues?: { [key: string]: any } | void; - operationName?: string | void; - fieldResolver?: GraphQLFieldResolver | void; + variableValues?: Maybe<{ [key: string]: any }>; + operationName?: Maybe; + fieldResolver?: Maybe>; }; /** @@ -74,9 +75,9 @@ export function execute( document: DocumentNode, rootValue?: any, contextValue?: any, - variableValues?: { [key: string]: any } | void, - operationName?: string | void, - fieldResolver?: GraphQLFieldResolver | void + variableValues?: Maybe<{ [key: string]: any }>, + operationName?: Maybe, + fieldResolver?: Maybe> ): MaybePromise; /** @@ -101,7 +102,7 @@ export function addPath( export function assertValidExecutionArguments( schema: GraphQLSchema, document: DocumentNode, - rawVariableValues: { [key: string]: any } | void + rawVariableValues: Maybe<{ [key: string]: any }> ): void; /** @@ -115,9 +116,9 @@ export function buildExecutionContext( document: DocumentNode, rootValue: any, contextValue: any, - rawVariableValues: { [key: string]: any } | void, - operationName: string | void, - fieldResolver: GraphQLFieldResolver | void + rawVariableValues: Maybe<{ [key: string]: any }>, + operationName: Maybe, + fieldResolver: Maybe> ): ReadonlyArray | ExecutionContext; /** @@ -181,4 +182,4 @@ export function getFieldDef( schema: GraphQLSchema, parentType: GraphQLObjectType, fieldName: string -): GraphQLField | void; +): Maybe>; diff --git a/types/graphql/execution/values.d.ts b/types/graphql/execution/values.d.ts index fb629325e8..e3cb7eb4bc 100644 --- a/types/graphql/execution/values.d.ts +++ b/types/graphql/execution/values.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { GraphQLError } from "../error"; import { GraphQLInputType, GraphQLField, GraphQLArgument } from "../type/definition"; import { GraphQLDirective } from "../type/directives"; @@ -35,7 +36,7 @@ export function getVariableValues( export function getArgumentValues( def: GraphQLField | GraphQLDirective, node: FieldNode | DirectiveNode, - variableValues?: { [key: string]: any } | void + variableValues?: Maybe<{ [key: string]: any }> ): { [key: string]: any }; /** @@ -54,5 +55,5 @@ export function getDirectiveValues( node: { readonly directives?: ReadonlyArray; }, - variableValues?: { [key: string]: any } | void + variableValues?: Maybe<{ [key: string]: any }> ): undefined | { [key: string]: any }; diff --git a/types/graphql/graphql.d.ts b/types/graphql/graphql.d.ts index 7282ea80f2..59dc3918f1 100644 --- a/types/graphql/graphql.d.ts +++ b/types/graphql/graphql.d.ts @@ -1,3 +1,4 @@ +import Maybe from "./tsutils/Maybe"; import { Source } from "./language/source"; import { GraphQLFieldResolver } from "./type/definition"; import { GraphQLSchema } from "./type/schema"; @@ -38,9 +39,9 @@ export interface GraphQLArgs { source: Source | string; rootValue?: any; contextValue?: any; - variableValues?: { [key: string]: any } | void; - operationName?: string | void; - fieldResolver?: GraphQLFieldResolver | void; + variableValues?: Maybe<{ [key: string]: any }>; + operationName?: Maybe; + fieldResolver?: Maybe>; } export function graphql(args: GraphQLArgs): Promise; @@ -49,9 +50,9 @@ export function graphql( source: Source | string, rootValue?: any, contextValue?: any, - variableValues?: { [key: string]: any } | void, - operationName?: string | void, - fieldResolver?: GraphQLFieldResolver | void + variableValues?: Maybe<{ [key: string]: any }>, + operationName?: Maybe, + fieldResolver?: Maybe> ): Promise; /** @@ -66,7 +67,7 @@ export function graphqlSync( source: Source | string, rootValue?: any, contextValue?: any, - variableValues?: { [key: string]: any } | void, - operationName?: string | void, - fieldResolver?: GraphQLFieldResolver | void + variableValues?: Maybe<{ [key: string]: any }>, + operationName?: Maybe, + fieldResolver?: Maybe> ): ExecutionResult; diff --git a/types/graphql/index.d.ts b/types/graphql/index.d.ts index 68e04d104d..ba9213b7c4 100644 --- a/types/graphql/index.d.ts +++ b/types/graphql/index.d.ts @@ -13,6 +13,7 @@ // Dylan Stewart // Alessio Dionisi // Divyendu Singh +// Brad Zacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/graphql/language/visitor.d.ts b/types/graphql/language/visitor.d.ts index a137fa318e..be50e6e02e 100644 --- a/types/graphql/language/visitor.d.ts +++ b/types/graphql/language/visitor.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { ASTNode, ASTKindToNode } from "./ast"; import { TypeInfo } from "../utilities/TypeInfo"; @@ -157,4 +158,4 @@ export function visitWithTypeInfo(typeInfo: TypeInfo, visitor: Visitor, kind: string, isLeaving: boolean): VisitFn | void; +export function getVisitFn(visitor: Visitor, kind: string, isLeaving: boolean): Maybe>; diff --git a/types/graphql/subscription/subscribe.d.ts b/types/graphql/subscription/subscribe.d.ts index a9fe6b565e..f5b29ebbb8 100644 --- a/types/graphql/subscription/subscribe.d.ts +++ b/types/graphql/subscription/subscribe.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { GraphQLSchema } from "../type/schema"; import { DocumentNode } from "../language/ast"; import { GraphQLFieldResolver } from "../type/definition"; @@ -28,10 +29,10 @@ export function subscribe(args: { document: DocumentNode; rootValue?: any; contextValue?: any; - variableValues?: { [key: string]: any } | void; - operationName?: string | void; - fieldResolver?: GraphQLFieldResolver | void; - subscribeFieldResolver?: GraphQLFieldResolver | void; + variableValues?: Maybe<{ [key: string]: any }>; + operationName?: Maybe; + fieldResolver?: Maybe>; + subscribeFieldResolver?: Maybe>; }): Promise | ExecutionResult>; export function subscribe( @@ -39,10 +40,10 @@ export function subscribe( document: DocumentNode, rootValue?: any, contextValue?: any, - variableValues?: { [key: string]: any } | void, - operationName?: string | void, - fieldResolver?: GraphQLFieldResolver | void, - subscribeFieldResolver?: GraphQLFieldResolver | void + variableValues?: Maybe<{ [key: string]: any }>, + operationName?: Maybe, + fieldResolver?: Maybe>, + subscribeFieldResolver?: Maybe> ): Promise | ExecutionResult>; /** @@ -69,6 +70,6 @@ export function createSourceEventStream( rootValue?: any, contextValue?: any, variableValues?: { [key: string]: any }, - operationName?: string | void, - fieldResolver?: GraphQLFieldResolver | void + operationName?: Maybe, + fieldResolver?: Maybe> ): Promise | ExecutionResult>; diff --git a/types/graphql/tsconfig.json b/types/graphql/tsconfig.json index 72f0de0665..3bc66f8bea 100644 --- a/types/graphql/tsconfig.json +++ b/types/graphql/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -21,4 +21,4 @@ "index.d.ts", "graphql-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/graphql/tsutils/Maybe.d.ts b/types/graphql/tsutils/Maybe.d.ts new file mode 100644 index 0000000000..7ad0bc85a4 --- /dev/null +++ b/types/graphql/tsutils/Maybe.d.ts @@ -0,0 +1,4 @@ +// Conveniently represents flow's "Maybe" type https://flow.org/en/docs/types/maybe/ +type Maybe = null | undefined | T + +export default Maybe diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index ed87af50ad..b078acccb1 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { MaybePromise } from "../jsutils/MaybePromise"; import { ScalarTypeDefinitionNode, @@ -254,8 +255,8 @@ export type Thunk = (() => T) | T; */ export class GraphQLScalarType { name: string; - description: string | void; - astNode?: ScalarTypeDefinitionNode | void; + description: Maybe; + astNode?: Maybe; constructor(config: GraphQLScalarTypeConfig); // Serializes an internal value to include in a response. @@ -265,7 +266,7 @@ export class GraphQLScalarType { parseValue(value: any): any; // Parses an externally provided literal value to use as an input. - parseLiteral(valueNode: ValueNode, variables?: { [key: string]: any } | void): any; + parseLiteral(valueNode: ValueNode, variables?: Maybe<{ [key: string]: any }>): any; toString(): string; toJSON(): string; @@ -274,11 +275,11 @@ export class GraphQLScalarType { export interface GraphQLScalarTypeConfig { name: string; - description?: string | void; - astNode?: ScalarTypeDefinitionNode | void; - serialize(value: any): TExternal | void; - parseValue?(value: any): TInternal | void; - parseLiteral?(valueNode: ValueNode, variables: { [key: string]: any } | void): TInternal | void; + description?: Maybe; + astNode?: Maybe; + serialize(value: any): Maybe; + parseValue?(value: any): Maybe; + parseLiteral?(valueNode: ValueNode, variables: Maybe<{ [key: string]: any }>): Maybe; } /** @@ -320,10 +321,10 @@ export interface GraphQLScalarTypeConfig { */ export class GraphQLObjectType { name: string; - description: string | void; - astNode: ObjectTypeDefinitionNode | void; - extensionASTNodes: ReadonlyArray | void; - isTypeOf: GraphQLIsTypeOfFn | void; + description: Maybe; + astNode: Maybe; + extensionASTNodes: Maybe>; + isTypeOf: Maybe>; constructor(config: GraphQLObjectTypeConfig); getFields(): GraphQLFieldMap; @@ -335,19 +336,19 @@ export class GraphQLObjectType { export interface GraphQLObjectTypeConfig { name: string; - interfaces?: Thunk; + interfaces?: Thunk>; fields: Thunk>; - isTypeOf?: GraphQLIsTypeOfFn | void; - description?: string | void; - astNode?: ObjectTypeDefinitionNode | void; - extensionASTNodes?: ReadonlyArray | void; + isTypeOf?: Maybe>; + description?: Maybe; + astNode?: Maybe; + extensionASTNodes?: Maybe>; } export type GraphQLTypeResolver = ( value: TSource, context: TContext, info: GraphQLResolveInfo -) => MaybePromise; +) => MaybePromise>; export type GraphQLIsTypeOfFn = ( source: TSource, @@ -385,9 +386,9 @@ export interface GraphQLFieldConfig; subscribe?: GraphQLFieldResolver; - deprecationReason?: string | void; - description?: string | void; - astNode?: FieldDefinitionNode | void; + deprecationReason?: Maybe; + description?: Maybe; + astNode?: Maybe; } export type GraphQLFieldConfigArgumentMap = { [key: string]: GraphQLArgumentConfig }; @@ -395,8 +396,8 @@ export type GraphQLFieldConfigArgumentMap = { [key: string]: GraphQLArgumentConf export interface GraphQLArgumentConfig { type: GraphQLInputType; defaultValue?: any; - description?: string | void; - astNode?: InputValueDefinitionNode | void; + description?: Maybe; + astNode?: Maybe; } export type GraphQLFieldConfigMap = { @@ -405,22 +406,22 @@ export type GraphQLFieldConfigMap = { export interface GraphQLField { name: string; - description: string | void; + description: Maybe; type: GraphQLOutputType; args: GraphQLArgument[]; resolve?: GraphQLFieldResolver; subscribe?: GraphQLFieldResolver; isDeprecated?: boolean; - deprecationReason?: string | void; - astNode?: FieldDefinitionNode | void; + deprecationReason?: Maybe; + astNode?: Maybe; } export interface GraphQLArgument { name: string; type: GraphQLInputType; defaultValue?: any; - description?: string | void; - astNode?: InputValueDefinitionNode | void; + description?: Maybe; + astNode?: Maybe; } export type GraphQLFieldMap = { @@ -447,10 +448,10 @@ export type GraphQLFieldMap = { */ export class GraphQLInterfaceType { name: string; - description: string | void; - astNode?: InterfaceTypeDefinitionNode | void; - extensionASTNodes: ReadonlyArray | void; - resolveType: GraphQLTypeResolver | void; + description: Maybe; + astNode?: Maybe; + extensionASTNodes: Maybe>; + resolveType: Maybe>; constructor(config: GraphQLInterfaceTypeConfig); @@ -469,10 +470,10 @@ export interface GraphQLInterfaceTypeConfig { * the default implementation will call `isTypeOf` on each implementing * Object type. */ - resolveType?: GraphQLTypeResolver | void; - description?: string | void; - astNode?: InterfaceTypeDefinitionNode | void; - extensionASTNodes?: ReadonlyArray | void; + resolveType?: Maybe>; + description?: Maybe; + astNode?: Maybe; + extensionASTNodes?: Maybe>; } /** @@ -500,9 +501,9 @@ export interface GraphQLInterfaceTypeConfig { */ export class GraphQLUnionType { name: string; - description: string | void; - astNode?: UnionTypeDefinitionNode | void; - resolveType: GraphQLTypeResolver | void; + description: Maybe; + astNode?: Maybe; + resolveType: Maybe>; constructor(config: GraphQLUnionTypeConfig); @@ -521,9 +522,9 @@ export interface GraphQLUnionTypeConfig { * the default implementation will call `isTypeOf` on each implementing * Object type. */ - resolveType?: GraphQLTypeResolver | void; - description?: string | void; - astNode?: UnionTypeDefinitionNode | void; + resolveType?: Maybe>; + description?: Maybe; + astNode?: Maybe; } /** @@ -549,15 +550,15 @@ export interface GraphQLUnionTypeConfig { */ export class GraphQLEnumType { name: string; - description: string | void; - astNode: EnumTypeDefinitionNode | void; + description: Maybe; + astNode: Maybe; constructor(config: GraphQLEnumTypeConfig); getValues(): GraphQLEnumValue[]; - getValue(name: string): GraphQLEnumValue | void; - serialize(value: any): string | void; - parseValue(value: any): any; - parseLiteral(valueNode: ValueNode, _variables: { [key: string]: any } | void): any; + getValue(name: string): Maybe; + serialize(value: any): Maybe; + parseValue(value: any): Maybe; + parseLiteral(valueNode: ValueNode, _variables: Maybe<{ [key: string]: any }>): Maybe; toString(): string; toJSON(): string; inspect(): string; @@ -566,25 +567,25 @@ export class GraphQLEnumType { export interface GraphQLEnumTypeConfig { name: string; values: GraphQLEnumValueConfigMap; - description?: string | void; - astNode?: EnumTypeDefinitionNode | void; + description?: Maybe; + astNode?: Maybe; } export type GraphQLEnumValueConfigMap = { [key: string]: GraphQLEnumValueConfig }; export interface GraphQLEnumValueConfig { value?: any; - deprecationReason?: string | void; - description?: string | void; - astNode?: EnumValueDefinitionNode | void; + deprecationReason?: Maybe; + description?: Maybe; + astNode?: Maybe; } export interface GraphQLEnumValue { name: string; - description: string | void; + description: Maybe; isDeprecated?: boolean; - deprecationReason: string | void; - astNode?: EnumValueDefinitionNode | void; + deprecationReason: Maybe; + astNode?: Maybe; value: any; } @@ -610,8 +611,8 @@ export interface GraphQLEnumValue { */ export class GraphQLInputObjectType { name: string; - description: string | void; - astNode: InputObjectTypeDefinitionNode | void; + description: Maybe; + astNode: Maybe; constructor(config: GraphQLInputObjectTypeConfig); getFields(): GraphQLInputFieldMap; toString(): string; @@ -622,15 +623,15 @@ export class GraphQLInputObjectType { export interface GraphQLInputObjectTypeConfig { name: string; fields: Thunk; - description?: string | void; - astNode?: InputObjectTypeDefinitionNode | void; + description?: Maybe; + astNode?: Maybe; } export interface GraphQLInputFieldConfig { type: GraphQLInputType; defaultValue?: any; - description?: string | void; - astNode?: InputValueDefinitionNode | void; + description?: Maybe; + astNode?: Maybe; } export type GraphQLInputFieldConfigMap = { @@ -641,8 +642,8 @@ export interface GraphQLInputField { name: string; type: GraphQLInputType; defaultValue?: any; - description?: string | void; - astNode?: InputValueDefinitionNode | void; + description?: Maybe; + astNode?: Maybe; } export type GraphQLInputFieldMap = { [key: string]: GraphQLInputField }; diff --git a/types/graphql/type/directives.d.ts b/types/graphql/type/directives.d.ts index f6e19f674d..ca9e947640 100644 --- a/types/graphql/type/directives.d.ts +++ b/types/graphql/type/directives.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { GraphQLFieldConfigArgumentMap, GraphQLArgument } from "./definition"; import { DirectiveDefinitionNode } from "../language/ast"; import { DirectiveLocationEnum } from "../language/directiveLocation"; @@ -13,20 +14,20 @@ export function isDirective(directive: any): directive is GraphQLDirective; */ export class GraphQLDirective { name: string; - description: string | void; + description: Maybe; locations: DirectiveLocationEnum[]; args: GraphQLArgument[]; - astNode: DirectiveDefinitionNode | void; + astNode: Maybe; constructor(config: GraphQLDirectiveConfig); } export interface GraphQLDirectiveConfig { name: string; - description?: string | void; + description?: Maybe; locations: DirectiveLocationEnum[]; - args?: GraphQLFieldConfigArgumentMap | void; - astNode?: DirectiveDefinitionNode | void; + args?: Maybe; + astNode?: Maybe; } /** diff --git a/types/graphql/type/schema.d.ts b/types/graphql/type/schema.d.ts index a7bb94f5c5..b5ddc9d8d4 100644 --- a/types/graphql/type/schema.d.ts +++ b/types/graphql/type/schema.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { GraphQLObjectType } from "./definition"; import { GraphQLType, GraphQLNamedType, GraphQLAbstractType } from "./definition"; import { SchemaDefinitionNode } from "../language/ast"; @@ -35,21 +36,21 @@ export function isSchema(schema: any): schema is GraphQLSchema; * */ export class GraphQLSchema { - astNode: SchemaDefinitionNode | void; + astNode: Maybe; constructor(config: GraphQLSchemaConfig); - getQueryType(): GraphQLObjectType | void; - getMutationType(): GraphQLObjectType | void; - getSubscriptionType(): GraphQLObjectType | void; + getQueryType(): Maybe; + getMutationType(): Maybe; + getSubscriptionType(): Maybe; getTypeMap(): TypeMap; - getType(name: string): GraphQLNamedType | void; + getType(name: string): Maybe; getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray; isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean; getDirectives(): ReadonlyArray; - getDirective(name: string): GraphQLDirective | void; + getDirective(name: string): Maybe; } type TypeMap = { [key: string]: GraphQLNamedType }; @@ -72,14 +73,14 @@ export interface GraphQLSchemaValidationOptions { * This option is provided to ease adoption and may be removed in a future * major release. */ - allowedLegacyNames?: ReadonlyArray | void; + allowedLegacyNames?: Maybe>; } export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions { - query: GraphQLObjectType | void; - mutation?: GraphQLObjectType | void; - subscription?: GraphQLObjectType | void; - types?: GraphQLNamedType[] | void; - directives?: GraphQLDirective[] | void; - astNode?: SchemaDefinitionNode | void; + query: Maybe; + mutation?: Maybe; + subscription?: Maybe; + types?: Maybe; + directives?: Maybe; + astNode?: Maybe; } diff --git a/types/graphql/utilities/TypeInfo.d.ts b/types/graphql/utilities/TypeInfo.d.ts index 1c2f139642..826704a52b 100644 --- a/types/graphql/utilities/TypeInfo.d.ts +++ b/types/graphql/utilities/TypeInfo.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { GraphQLSchema } from "../type/schema"; import { GraphQLOutputType, @@ -28,14 +29,15 @@ export class TypeInfo { initialType?: GraphQLType ); - getType(): GraphQLOutputType | void; - getParentType(): GraphQLCompositeType | void; - getInputType(): GraphQLInputType | void; - getParentInputType(): GraphQLInputType | void; - getFieldDef(): GraphQLField | void; - getDirective(): GraphQLDirective | void; - getArgument(): GraphQLArgument | void; - getEnumValue(): GraphQLEnumValue | void; + getType(): Maybe; + getParentType(): Maybe; + getInputType(): Maybe; + getParentInputType(): Maybe; + getFieldDef(): GraphQLField>; + getDefaultValue(): Maybe; + getDirective(): Maybe; + getArgument(): Maybe; + getEnumValue(): Maybe; enter(node: ASTNode): any; leave(node: ASTNode): any; } @@ -44,4 +46,4 @@ type getFieldDef = ( schema: GraphQLSchema, parentType: GraphQLType, fieldNode: FieldNode -) => GraphQLField | void; +) => Maybe>; diff --git a/types/graphql/utilities/astFromValue.d.ts b/types/graphql/utilities/astFromValue.d.ts index 9c2198e6d6..e6c9f1ba6c 100644 --- a/types/graphql/utilities/astFromValue.d.ts +++ b/types/graphql/utilities/astFromValue.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { ValueNode } from "../language/ast"; import { GraphQLInputType } from "../type/definition"; @@ -18,4 +19,4 @@ import { GraphQLInputType } from "../type/definition"; * | null | NullValue | * */ -export function astFromValue(value: any, type: GraphQLInputType): ValueNode | void; +export function astFromValue(value: any, type: GraphQLInputType): Maybe; diff --git a/types/graphql/utilities/buildASTSchema.d.ts b/types/graphql/utilities/buildASTSchema.d.ts index ebff50b4f7..e2406c7ee1 100644 --- a/types/graphql/utilities/buildASTSchema.d.ts +++ b/types/graphql/utilities/buildASTSchema.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { DocumentNode, Location, @@ -47,7 +48,7 @@ type TypeDefinitionsMap = { [key: string]: TypeDefinitionNode }; type TypeResolver = (typeRef: NamedTypeNode) => GraphQLNamedType; export class ASTDefinitionBuilder { - constructor(typeDefinitionsMap: TypeDefinitionsMap, options: BuildSchemaOptions | void, resolveType: TypeResolver); + constructor(typeDefinitionsMap: TypeDefinitionsMap, options: Maybe, resolveType: TypeResolver); buildTypes(nodes: ReadonlyArray): Array; @@ -69,7 +70,7 @@ export class ASTDefinitionBuilder { */ export function getDescription( node: { readonly description?: StringValueNode; readonly loc?: Location }, - options: BuildSchemaOptions | void + options: Maybe ): string | undefined; /** diff --git a/types/graphql/utilities/getOperationAST.d.ts b/types/graphql/utilities/getOperationAST.d.ts index 81e9bd4cbe..a36cfa139c 100644 --- a/types/graphql/utilities/getOperationAST.d.ts +++ b/types/graphql/utilities/getOperationAST.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { DocumentNode, OperationDefinitionNode } from "../language/ast"; /** @@ -7,5 +8,5 @@ import { DocumentNode, OperationDefinitionNode } from "../language/ast"; */ export function getOperationAST( documentAST: DocumentNode, - operationName: string | void -): OperationDefinitionNode | void; + operationName: Maybe +): Maybe; diff --git a/types/graphql/utilities/introspectionQuery.d.ts b/types/graphql/utilities/introspectionQuery.d.ts index 750fe0d99c..f2172595f8 100644 --- a/types/graphql/utilities/introspectionQuery.d.ts +++ b/types/graphql/utilities/introspectionQuery.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { DirectiveLocationEnum } from "../language/directiveLocation"; export interface IntrospectionOptions { @@ -16,8 +17,8 @@ export interface IntrospectionQuery { export interface IntrospectionSchema { readonly queryType: IntrospectionNamedTypeRef; - readonly mutationType: IntrospectionNamedTypeRef | void; - readonly subscriptionType: IntrospectionNamedTypeRef | void; + readonly mutationType: Maybe>; + readonly subscriptionType: Maybe>; readonly types: ReadonlyArray; readonly directives: ReadonlyArray; } @@ -42,13 +43,13 @@ export type IntrospectionInputType = IntrospectionScalarType | IntrospectionEnum export interface IntrospectionScalarType { readonly kind: "SCALAR"; readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; } export interface IntrospectionObjectType { readonly kind: "OBJECT"; readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; readonly fields: ReadonlyArray; readonly interfaces: ReadonlyArray>; } @@ -56,7 +57,7 @@ export interface IntrospectionObjectType { export interface IntrospectionInterfaceType { readonly kind: "INTERFACE"; readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; readonly fields: ReadonlyArray; readonly possibleTypes: ReadonlyArray>; } @@ -64,21 +65,21 @@ export interface IntrospectionInterfaceType { export interface IntrospectionUnionType { readonly kind: "UNION"; readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; readonly possibleTypes: ReadonlyArray>; } export interface IntrospectionEnumType { readonly kind: "ENUM"; readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; readonly enumValues: ReadonlyArray; } export interface IntrospectionInputObjectType { readonly kind: "INPUT_OBJECT"; readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; readonly inputFields: ReadonlyArray; } @@ -114,30 +115,30 @@ export interface IntrospectionNamedTypeRef; readonly args: ReadonlyArray; readonly type: IntrospectionOutputTypeRef; readonly isDeprecated: boolean; - readonly deprecationReason?: string | void; + readonly deprecationReason?: Maybe; } export interface IntrospectionInputValue { readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; readonly type: IntrospectionInputTypeRef; - readonly defaultValue?: string | void; + readonly defaultValue?: Maybe; } export interface IntrospectionEnumValue { readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; readonly isDeprecated: boolean; - readonly deprecationReason?: string | void; + readonly deprecationReason?: Maybe; } export interface IntrospectionDirective { readonly name: string; - readonly description?: string | void; + readonly description?: Maybe; readonly locations: ReadonlyArray; readonly args: ReadonlyArray; } diff --git a/types/graphql/utilities/valueFromAST.d.ts b/types/graphql/utilities/valueFromAST.d.ts index cd67108aad..c95eca9002 100644 --- a/types/graphql/utilities/valueFromAST.d.ts +++ b/types/graphql/utilities/valueFromAST.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { GraphQLInputType } from "../type/definition"; import { ValueNode, VariableNode, ListValueNode, ObjectValueNode } from "../language/ast"; @@ -22,7 +23,7 @@ import { ValueNode, VariableNode, ListValueNode, ObjectValueNode } from "../lang * */ export function valueFromAST( - valueNode: ValueNode | void, + valueNode: Maybe, type: GraphQLInputType, - variables?: { [key: string]: any } | void + variables?: Maybe<{ [key: string]: any }> ): any; diff --git a/types/graphql/utilities/valueFromASTUntyped.d.ts b/types/graphql/utilities/valueFromASTUntyped.d.ts index 98d3137694..4ca58ca867 100644 --- a/types/graphql/utilities/valueFromASTUntyped.d.ts +++ b/types/graphql/utilities/valueFromASTUntyped.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { ValueNode } from "../language/ast"; /** @@ -16,4 +17,4 @@ import { ValueNode } from "../language/ast"; * | Null | null | * */ -export function valueFromASTUntyped(valueNode: ValueNode, variables?: { [key: string]: any } | void): any; +export function valueFromASTUntyped(valueNode: ValueNode, variables?: Maybe<{ [key: string]: any }>): any; diff --git a/types/graphql/validation/ValidationContext.d.ts b/types/graphql/validation/ValidationContext.d.ts index 0f8a4ea8f7..24049decdf 100644 --- a/types/graphql/validation/ValidationContext.d.ts +++ b/types/graphql/validation/ValidationContext.d.ts @@ -1,3 +1,4 @@ +import Maybe from "../tsutils/Maybe"; import { GraphQLError } from "../error"; import { DocumentNode, @@ -19,7 +20,11 @@ import { GraphQLDirective } from "../type/directives"; import { TypeInfo } from "../utilities/TypeInfo"; type NodeWithSelectionSet = OperationDefinitionNode | FragmentDefinitionNode; -type VariableUsage = { node: VariableNode; type: GraphQLInputType | void }; +type VariableUsage = { + readonly node: VariableNode; + readonly type: Maybe; + readonly defaultValue: Maybe; +}; /** * An instance of this class is passed as the "this" context to all validators, @@ -37,7 +42,7 @@ export default class ValidationContext { getDocument(): DocumentNode; - getFragment(name: string): FragmentDefinitionNode | void; + getFragment(name: string): Maybe; getFragmentSpreads(node: SelectionSetNode): ReadonlyArray; @@ -47,17 +52,17 @@ export default class ValidationContext { getRecursiveVariableUsages(operation: OperationDefinitionNode): ReadonlyArray; - getType(): GraphQLOutputType | void; + getType(): Maybe; - getParentType(): GraphQLCompositeType | void; + getParentType(): Maybe; - getInputType(): GraphQLInputType | void; + getInputType(): Maybe; - getParentInputType(): GraphQLInputType | void; + getParentInputType(): Maybe; - getFieldDef(): GraphQLField | void; + getFieldDef(): Maybe>; - getDirective(): GraphQLDirective | void; + getDirective(): Maybe; - getArgument(): GraphQLArgument | void; + getArgument(): Maybe; } diff --git a/types/graphql/validation/rules/NoUndefinedVariables.d.ts b/types/graphql/validation/rules/NoUndefinedVariables.d.ts index 611ad01a9b..f340b41ad8 100644 --- a/types/graphql/validation/rules/NoUndefinedVariables.d.ts +++ b/types/graphql/validation/rules/NoUndefinedVariables.d.ts @@ -1,7 +1,8 @@ +import Maybe from "../../tsutils/Maybe"; import ValidationContext from "../ValidationContext"; import { ASTVisitor } from "../../language/visitor"; -export function undefinedVarMessage(varName: string, opName: string | void): string; +export function undefinedVarMessage(varName: string, opName: Maybe): string; /** * No undefined variables diff --git a/types/graphql/validation/rules/NoUnusedVariables.d.ts b/types/graphql/validation/rules/NoUnusedVariables.d.ts index 10282cdacd..1846995a1f 100644 --- a/types/graphql/validation/rules/NoUnusedVariables.d.ts +++ b/types/graphql/validation/rules/NoUnusedVariables.d.ts @@ -1,7 +1,8 @@ +import Maybe from "../../tsutils/Maybe"; import ValidationContext from "../ValidationContext"; import { ASTVisitor } from "../../language/visitor"; -export function unusedVariableMessage(varName: string, opName: string | void): string; +export function unusedVariableMessage(varName: string, opName: Maybe): string; /** * No unused variables diff --git a/types/graphql/validation/rules/SingleFieldSubscriptions.d.ts b/types/graphql/validation/rules/SingleFieldSubscriptions.d.ts index fef0869710..54b1fec36a 100644 --- a/types/graphql/validation/rules/SingleFieldSubscriptions.d.ts +++ b/types/graphql/validation/rules/SingleFieldSubscriptions.d.ts @@ -1,7 +1,8 @@ +import Maybe from "../../tsutils/Maybe"; import ValidationContext from "../ValidationContext"; import { ASTVisitor } from "../../language/visitor"; -export function singleFieldOnlyMessage(name: string | void): string; +export function singleFieldOnlyMessage(name: Maybe): string; /** * Subscriptions must only include one field. diff --git a/types/grid-styled/index.d.ts b/types/grid-styled/index.d.ts index 8cce111478..af969b0cec 100644 --- a/types/grid-styled/index.d.ts +++ b/types/grid-styled/index.d.ts @@ -1,14 +1,12 @@ -// Type definitions for grid-styled 3.2 +// Type definitions for grid-styled 4.1 // Project: https://github.com/jxnblk/grid-styled // Definitions by: Anton Vasin // Victor Orlov +// Louis Hache // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 -export type Diff = ({ [P in T]: P } & - { [P in U]: never } & { [x: string]: never })[T]; - -export type Omit = Pick>; +export type Omit = Pick; import { ComponentClass } from "react"; import { StyledComponentClass } from "styled-components"; @@ -42,6 +40,7 @@ export interface BoxProps flex?: ResponsiveProp; order?: ResponsiveProp; is?: string | ComponentClass; + alignSelf?: ResponsiveProp; } export interface FlexProps extends BoxProps { diff --git a/types/gulp-mustache/gulp-mustache-tests.ts b/types/gulp-mustache/gulp-mustache-tests.ts index d8285370e7..d7fb994a58 100644 --- a/types/gulp-mustache/gulp-mustache-tests.ts +++ b/types/gulp-mustache/gulp-mustache-tests.ts @@ -4,6 +4,33 @@ import { Transform } from "stream"; mustache({ // $ExpectType Transform msg: "Hello Gulp!" }); +mustache({ + name: "Chris", + value: 10000, + taxed_value: 10000 - (10000 * 0.4), + in_ca: true +}); +mustache({ + repo: [ + { name: "resque" }, + { name: "hub" }, + { name: "rip" } + ] +}); +mustache({ + name: "Willy", + wrapped: () => { + return (text: string, render: (arg: string) => string) => { + return `${render(text)}`; + }; + } +}); +mustache({ + "person?": { name: "Jon" } +}); +mustache({ + repo: [] +}); mustache({ // $ExpectType Transform msg: "Hello Gulp!", diff --git a/types/gulp-mustache/index.d.ts b/types/gulp-mustache/index.d.ts index 13e0198558..ba6b22df9d 100644 --- a/types/gulp-mustache/index.d.ts +++ b/types/gulp-mustache/index.d.ts @@ -11,7 +11,7 @@ declare namespace GulpMustache { type View = Hash | string | undefined; interface Hash { - [key: string]: string; + [key: string]: any; } interface Options { diff --git a/types/gulp-svgmin/gulp-svgmin-tests.ts b/types/gulp-svgmin/gulp-svgmin-tests.ts new file mode 100644 index 0000000000..2d3d6e7e44 --- /dev/null +++ b/types/gulp-svgmin/gulp-svgmin-tests.ts @@ -0,0 +1,51 @@ +import svgmin = require("gulp-svgmin"); +import { basename, extname } from "path"; + +// From tests + +svgmin({ plugins: [] }); +svgmin({ plugins: [{ removeDoctype: false }] }); +svgmin({ plugins: [{ removeDoctype: false }, { removeComments: false }] }); + +// From examples given in README + +// $ExpectType Transform +svgmin(); + +// $ExpectType Transform +svgmin({ + plugins: [{ + removeDoctype: false + }, { + removeComments: false + }, { + cleanupNumericValues: { + floatPrecision: 2 + } + }, { + convertColors: { + names2hex: false, + rgb2hex: false + } + }] +}); + +// $ExpectType Transform +svgmin({ + js2svg: { + pretty: true + } +}); + +// $ExpectType Transform +svgmin(function getOptions(file) { + const prefix = basename(file.relative, extname(file.relative)); + return { + plugins: [{ + cleanupIDs: { + prefix: prefix + '-', + minify: true + } + }] + }; +}); diff --git a/types/gulp-svgmin/index.d.ts b/types/gulp-svgmin/index.d.ts new file mode 100644 index 0000000000..08c84bc930 --- /dev/null +++ b/types/gulp-svgmin/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for gulp-svgmin 1.2 +// Project: https://github.com/ben-eb/gulp-svgmin +// Definitions by: Aankhen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 +// (required because svgo specifies 2.2) + +/// + +import SVGO = require("svgo"); +import { Transform } from "stream"; +import * as File from "vinyl"; + +export = GulpSvgmin; + +declare function GulpSvgmin(cb: (file: File) => SVGO.Options): Transform; +declare function GulpSvgmin(options?: SVGO.Options): Transform; diff --git a/types/gulp-svgmin/tsconfig.json b/types/gulp-svgmin/tsconfig.json new file mode 100644 index 0000000000..1d94db7181 --- /dev/null +++ b/types/gulp-svgmin/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-svgmin-tests.ts" + ] +} diff --git a/types/gulp-svgmin/tslint.json b/types/gulp-svgmin/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gulp-svgmin/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts b/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts index cf51162eb4..50b17e8db6 100644 --- a/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts +++ b/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts @@ -32,7 +32,7 @@ server.register({ .then(() => { const opts: hapiAuthJwt2.Options = { key: 'NeverShareYourSecret', - async validate(decoded: { id: number }, request) { + async validate(decoded: { id: number }) { return { isValid: !!users[decoded.id], }; @@ -42,5 +42,14 @@ server.register({ issuer: 'test', } }; + const opts2: hapiAuthJwt2.Options = { + key: 'NeverShareYourSecret2', + validate(decoded: { id: number }) { + return { + isValid: !!users[decoded.id], + }; + } + }; server.auth.strategy('jwt', 'jwt', opts); + server.auth.strategy('jwt2', 'jwt', opts2); }); diff --git a/types/hapi-auth-jwt2/index.d.ts b/types/hapi-auth-jwt2/index.d.ts index a93f740bfc..f980cfa6e9 100644 --- a/types/hapi-auth-jwt2/index.d.ts +++ b/types/hapi-auth-jwt2/index.d.ts @@ -39,6 +39,12 @@ declare namespace hapiAuthJwt2 { }; } + interface ValidationResult { + isValid: boolean; + credentials?: any; + response?: ResponseObject; + } + /** * Options passed to `hapi.auth.strategy` when this plugin is used */ @@ -54,11 +60,7 @@ declare namespace hapiAuthJwt2 { * @param decoded the *decoded* and *verified* JWT received from the client in *request.headers.authorization* * @param request the original *request* received from the client */ - validate(decoded: {}, request: Request, tk: ResponseToolkit): Promise<{ - isValid: boolean; - credentials?: any; - response?: ResponseObject - }>; + validate(decoded: {}, request: Request, tk: ResponseToolkit): ValidationResult | Promise; /** * Settings to define how tokens are verified by the jsonwebtoken library diff --git a/types/hapi/index.d.ts b/types/hapi/index.d.ts index d4072b0cd7..d8edc40685 100644 --- a/types/hapi/index.d.ts +++ b/types/hapi/index.d.ts @@ -544,7 +544,7 @@ export interface Request extends Podium { * @return void * [See docs](https://hapijs.com/api/17.0.1#-requestseturlurl-striptrailingslash) */ - setUrl(url: string | url.URL, stripTrailingSlash?: boolean): void; + setUrl(url: string | url.Url, stripTrailingSlash?: boolean): void; } /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2472,15 +2472,15 @@ export interface ServerExtOptions { /** * a string or array of strings of plugin names this method must execute before (on the same event). Otherwise, extension methods are executed in the order added. */ - before: string | string[]; + before?: string | string[]; /** * a string or array of strings of plugin names this method must execute after (on the same event). Otherwise, extension methods are executed in the order added. */ - after: string | string[]; + after?: string | string[]; /** * a context object passed back to the provided method (via this) when called. Ignored if the method is an arrow function. */ - bind: object; + bind?: object; /** * if set to 'plugin' when adding a request extension points the extension is only added to routes defined by the current plugin. Not allowed when configuring route-level extensions, or when * adding server extensions. Defaults to 'server' which applies to any route added to the server the extension is added to. diff --git a/types/hapi/test/request/event-types.ts b/types/hapi/test/request/event-types.ts index 386b93e19d..4d4f3f01ca 100644 --- a/types/hapi/test/request/event-types.ts +++ b/types/hapi/test/request/event-types.ts @@ -1,6 +1,6 @@ // https://github.com/hapijs/hapi/blob/master/API.md#-servereventevents // https://github.com/hapijs/hapi/blob/master/API.md#-requestevents -import { Lifecycle, Request, ResponseToolkit, RouteOptions, Server, ServerOptions, ServerRoute } from "hapi"; +import { Lifecycle, Request, Server, ServerOptions, ServerRoute } from "hapi"; import * as Crypto from 'crypto'; const options: ServerOptions = { @@ -10,7 +10,7 @@ const options: ServerOptions = { const serverRoute: ServerRoute = { path: '/', method: 'GET', - handler(request, h) { + handler(request) { return 'ok: ' + request.path; } }; @@ -42,7 +42,7 @@ const onRequest: Lifecycle.Method = (request, h) => { */ const hash = Crypto.createHash('sha1'); - request.events.on("peek", (chunk, encoding) => { + request.events.on("peek", (chunk) => { hash.update(chunk); }); @@ -59,7 +59,9 @@ const onRequest: Lifecycle.Method = (request, h) => { const server = new Server(options); server.route(serverRoute); -server.ext('onRequest', onRequest); +server.ext('onRequest', onRequest, { + before: 'test', +}); server.start(); console.log('Server started at: ' + server.info.uri); diff --git a/types/he/he-tests.ts b/types/he/he-tests.ts index 6045574fa5..3fce7214c9 100644 --- a/types/he/he-tests.ts +++ b/types/he/he-tests.ts @@ -2,18 +2,18 @@ import he = require('he'); function main() { var result: string; - + result = he.encode('foo \xa9 bar \u2260 baz qux'); // 'foo © bar ≠ baz qux' - + he.encode('foo \0 bar'); // 'foo \0 bar' - + // Passing an `options` object to `encode`, to explicitly disallow named references: he.encode('foo \xa9 bar \u2260 baz qux', { 'useNamedReferences': false }); - + he.encode('foo \xa9 bar \u2260 baz qux', { 'encodeEverything': true }); @@ -22,21 +22,43 @@ function main() { 'encodeEverything': true, 'useNamedReferences': true }); - + he.encode('\x01', { 'strict': false }); - // '' - + // '' + he.encode('foo © and & ampersand', { 'allowUnsafeSymbols': true }); - + + // Using the global default setting (defaults to `false`): + he.encode('foo © bar ≠ baz 𝌆 qux'); + // → 'foo © bar ≠ baz 𝌆 qux' + + // Passing an `options` object to `encode`, to explicitly disable decimal escapes: + he.encode('foo © bar ≠ baz 𝌆 qux', { + 'decimal': false + }); + // → 'foo © bar ≠ baz 𝌆 qux' + + // Passing an `options` object to `encode`, to explicitly enable decimal escapes: + he.encode('foo © bar ≠ baz 𝌆 qux', { + 'decimal': true + }); + // → 'foo © bar ≠ baz 𝌆 qux' + + // Passing an `options` object to `encode`, to explicitly allow named references and decimal escapes: + he.encode('foo © bar ≠ baz 𝌆 qux', { + 'useNamedReferences': true, + 'decimal': true + }); + // Override the global default setting: he.encode.options.useNamedReferences = true; - + he.decode('foo © bar ≠ baz 𝌆 qux'); - + he.decode('foo&bar', { 'isAttributeValue': false }); diff --git a/types/he/index.d.ts b/types/he/index.d.ts index a890ad823c..e729b6bbdc 100644 --- a/types/he/index.d.ts +++ b/types/he/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for he v0.5.0 +// Type definitions for he v1.1.1 // Project: https://github.com/mathiasbynens/he // Definitions by: Simon Edwards +// Robin Tregaskis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // he - "HTML Entities" - A high quality pair of HTML encode and decode functions. @@ -18,6 +19,18 @@ export interface EncodeOptions { */ useNamedReferences?: boolean; + /** + * The default value for the decimal option is false. If the option is + * enabled, encode will generally use decimal escapes (e.g. ©) + * rather than hexadecimal escapes (e.g. ©). Beside of this + * replacement, the basic behavior remains the same when combined with + * other options. For example: if both options useNamedReferences and + * decimal are enabled, named references (e.g. ©) are used over + * decimal escapes. HTML entities without a named reference are encoded + * using decimal escapes. + */ + decimal?: boolean; + /** * The default value for the encodeEverything option is false. This means * that encode() will not use any character references for printable ASCII diff --git a/types/hexo-log/hexo-log-tests.ts b/types/hexo-log/hexo-log-tests.ts index 9d0c263c03..a6fbcced57 100644 --- a/types/hexo-log/hexo-log-tests.ts +++ b/types/hexo-log/hexo-log-tests.ts @@ -1,90 +1,52 @@ -import mocha = require('mocha'); -import chai = require('chai'); -const should = chai.should(); -import rewire = require('rewire'); -import sinon = require('sinon'); import logger = require('hexo-log'); -const _c = logger(); -type HexoLogger = typeof _c; +declare function it(s: string, cb: () => void): void; -describe('hexo-log', () => { - const loggerModule = rewire<(options?: { name?: string; silent?: boolean; debug?: boolean; }) => HexoLogger>('./'); +it('add alias for levels', () => { + const log = logger(); - it('add alias for levels', () => { - const log = logger(); - - log.d.should.eql(log.debug); - log.i.should.eql(log.info); - log.w.should.eql(log.warn); - log.e.should.eql(log.error); - log.log.should.eql(log.info); - }); - - it('default name is hexo', () => { - const log = logger(); - - log.fields.name.should.eql('hexo'); - }); - - it('options.name', () => { - const log = logger({ name: 'foo' }); - - log.fields.name.should.eql('foo'); - }); - - it('level should be trace if options.debug is true', () => { - const log: any = logger({ debug: true }); - - log.streams[0].level.should.eql(10); - }); - - it('should add file stream if options.debug is true', () => { - const log: any = logger({ debug: true }); - - log.streams[1].path.should.eql('debug.log'); - }); - - it('should remove console stream if options.silent is true', () => { - const log: any = logger({ silent: true }); - - log.streams.length.should.eql(0); - }); - - it('should display time if options.debug is true', () => { - const spy = sinon.spy(); - const now = new Date(); - - loggerModule.__with__({ - process: { - stdout: { - write: spy - } - } - })(() => { - sinon.useFakeTimers(now.valueOf()); - const log = loggerModule({ debug: true }); - log.info('test'); - sinon.restore(undefined); - }); - - spy.args[0][0].should.contain(now.toISOString().substring(11, 23)); - }); - - it('should print error to process.stderr stream', () => { - const spy = sinon.spy(); - - loggerModule.__with__({ - process: { - stderr: { - write: spy - } - } - })(() => { - const log = loggerModule(); - log.error('test'); - }); - - spy.calledOnce.should.be.true; - }); + log.d === log.debug; + log.i === log.info; + log.w === log.warn; + log.e === log.error; + log.log === log.info; +}); + +it('default name is hexo', () => { + const log = logger(); + + log.fields.name === 'hexo'; +}); + +it('options.name', () => { + const log = logger({ name: 'foo' }); + log.fields === 'foo'; +}); + +it('level should be trace if options.debug is true', () => { + const log = logger({ debug: true }); + // TODO + // log.streams[0].level.should.eql(10); +}); + +it('should add file stream if options.debug is true', () => { + const log = logger({ debug: true }); + // TODO + // log.streams[1].path === 'debug.log'; +}); + +it('should remove console stream if options.silent is true', () => { + const log = logger({ silent: true }); + // TODO + // log.streams.length === 0; +}); + +it('should display time if options.debug is true', () => { + const log = logger({ debug: true }); + log.info('test'); +}); + +it('should print error to process.stderr stream', () => { + const log = logger(); + log.error('test'); }); diff --git a/types/historykana/historykana-tests.ts b/types/historykana/historykana-tests.ts new file mode 100644 index 0000000000..f801ce4f52 --- /dev/null +++ b/types/historykana/historykana-tests.ts @@ -0,0 +1,23 @@ +import historykana from "historykana"; + +// Stock input history +const inputHistory = [ + "y", + "や", + "やm", + "やま", + "やまd", + "やまだ", + "山田", + "山田", + "山田t", + "山田た", + "山田たr", + "山田たろ", + "山田たろう", + "山田太郎", + "山田太郎" +]; + +const result = historykana(inputHistory); +// => やまだたろう diff --git a/types/historykana/index.d.ts b/types/historykana/index.d.ts new file mode 100644 index 0000000000..c99c82de98 --- /dev/null +++ b/types/historykana/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for HistoryKana 1.0 +// Project: https://github.com/terrierscript/historykana +// Definitions by: shiratsuki +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/** + * Get Kana string from input history array. + * @param histories Input History Array + * @param options kanaRegexp : Hiragana detection regular expression rule. + */ +declare function historykana(histories: string[], options?: object): string; + +export = historykana; diff --git a/types/historykana/tsconfig.json b/types/historykana/tsconfig.json new file mode 100644 index 0000000000..8ae561d5d6 --- /dev/null +++ b/types/historykana/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "allowSyntheticDefaultImports": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "historykana-tests.ts"] +} diff --git a/types/historykana/tslint.json b/types/historykana/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/historykana/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/html-tag-names/html-tag-names-tests.ts b/types/html-tag-names/html-tag-names-tests.ts new file mode 100644 index 0000000000..b3362a6b7e --- /dev/null +++ b/types/html-tag-names/html-tag-names-tests.ts @@ -0,0 +1,3 @@ +import htmlTagNames = require("html-tag-names"); +htmlTagNames.length; // => 147 +const firstNames: string[] = htmlTagNames.slice(0, 20); diff --git a/types/html-tag-names/index.d.ts b/types/html-tag-names/index.d.ts new file mode 100644 index 0000000000..8c9558edb7 --- /dev/null +++ b/types/html-tag-names/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for html-tag-names 1.1 +// Project: https://github.com/wooorm/html-tag-names +// Definitions by: Nathan Shively-Sanders +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare const htmlTagNames: string[]; +export = htmlTagNames; diff --git a/types/html-tag-names/tsconfig.json b/types/html-tag-names/tsconfig.json new file mode 100644 index 0000000000..05cded79c8 --- /dev/null +++ b/types/html-tag-names/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "html-tag-names-tests.ts" + ] +} diff --git a/types/html-tag-names/tslint.json b/types/html-tag-names/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/html-tag-names/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/http-proxy/http-proxy-tests.ts b/types/http-proxy/http-proxy-tests.ts index 70ea803da6..1610befc7d 100644 --- a/types/http-proxy/http-proxy-tests.ts +++ b/types/http-proxy/http-proxy-tests.ts @@ -24,3 +24,11 @@ proxy.on("start", (req, res, target) => { http.createServer((req, res) => { proxy.web(req, res); }); + +const newProxy = HttpProxy.createProxyServer({ + target: { + host: 'localhost', + port: '9015' + }, + ws: true +}); diff --git a/types/http-proxy/index.d.ts b/types/http-proxy/index.d.ts index e9ef9a572d..fb7eb26abc 100644 --- a/types/http-proxy/index.d.ts +++ b/types/http-proxy/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for node-http-proxy 1.16 // Project: https://github.com/nodejitsu/node-http-proxy -// Definitions by: Maxime LUCE , Florian Oellerich +// Definitions by: Maxime LUCE +// Florian Oellerich +// Daniel Schmidt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -166,9 +168,9 @@ declare namespace Server { /** Buffer */ buffer?: stream.Stream; /** URL string to be parsed with the url module. */ - target?: string; + target?: ProxyTargetUrl; /** URL string to be parsed with the url module. */ - forward?: string; + forward?: ProxyTargetUrl; /** Object to be passed to http(s).request. */ agent?: any; /** Object to be passed to https.createServer(). */ diff --git a/types/hubot/index.d.ts b/types/hubot/index.d.ts index 7da5501736..1b90a512af 100644 --- a/types/hubot/index.d.ts +++ b/types/hubot/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for hubot 2.19 // Project: https://github.com/github/hubot // Definitions by: Dirk Gadsden +// Kees C. Bakker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Hubot { @@ -33,12 +34,16 @@ declare namespace Hubot { type ListenerCallback = (response: Response) => void; class Robot { + alias: string; brain: Brain; + name: string; readonly adapter: A; constructor(adapterPath: string, adapter: string, httpd: boolean, name: string, alias?: string); hear(regex: RegExp, callback: ListenerCallback): void; hear(regex: RegExp, options: any, callback: ListenerCallback): void; + helpCommands(): string[]; + loadFile(directory: string, fileName: string): void; respond(regex: RegExp, callback: ListenerCallback): void; respond(regex: RegExp, options: any, callback: ListenerCallback): void; } diff --git a/types/ibm_db/index.d.ts b/types/ibm_db/index.d.ts index 662a16ffb3..de54b9ca26 100644 --- a/types/ibm_db/index.d.ts +++ b/types/ibm_db/index.d.ts @@ -187,6 +187,9 @@ export class ODBCStatement { export class ODBCResult { fetchMode: number; + fetchAllSync(): any[]; + moreResultsSync(): any[]; + closeSync(): void; } // Class ODBCResult export function getElapsedTime(): string; diff --git a/types/ids/ids-tests.ts b/types/ids/ids-tests.ts deleted file mode 100644 index 16ba06e34f..0000000000 --- a/types/ids/ids-tests.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Ids = require('ids'); - -const ids = new Ids(); - -const next = ids.next(); // returns id - -ids.claim('f71a81'); // claim id as already existing - -ids.assigned('f71a81'); // true if id was already generated / claimed diff --git a/types/ids/index.d.ts b/types/ids/index.d.ts deleted file mode 100644 index f744f77a5c..0000000000 --- a/types/ids/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Type definitions for ids 0.2.0 -// Project: https://github.com/bpmn-io/ids -// Definitions by: Jan Steinbruecker -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = Ids; - -declare class Ids { - - /** - * Create a new id generator / cache instance. - * @param {number[]} [seed] a seed that is used internally. - */ - constructor(seed?: number[]); - - /** - * Returns true if the given id has already been assigned. - * @param {string} id - * @return {boolean} - */ - assigned(id: string): boolean; - - /** - * Manually claim an existing id. - * @param {string} id - * @param {*} [element] element the id is claimed by - */ - claim(id: string, element?: any): void; - - /** Clear all claimed ids. */ - clear(): void; - - /** - * Generate a next id. - * @param {*} [element] element to bind the id to - * @return {string} id - */ - next(element?: any): string; - - /** - * Generate a next id with a given prefix. - * @param {*} [element] element to bind the id to - * @return {string} id - */ - nextPrefixed(prefix: string, element?: any): string; - - /** - * Unclaim an id. - * @param {string} id - the id to unclaim - */ - unclaim(id: string): void; - -} diff --git a/types/idyll-ast/idyll-ast-tests.ts b/types/idyll-ast/idyll-ast-tests.ts new file mode 100644 index 0000000000..6b3eb7d651 --- /dev/null +++ b/types/idyll-ast/idyll-ast-tests.ts @@ -0,0 +1,99 @@ +import { AST, Property, TreeNode, Node } from "idyll-compiler"; + +import { + appendNode, + getNodesByName, + appendNodes, + prependNode, + prependNodes, + createNode, + getChildren, + walkNodes, + findNodes, + modifyChildren, + filterChildren, + filterNodes, + modifyNodesByName, + getProperty, + getProperties, + getPropertiesByType, + removeNodesByName, + setProperty, + setProperties, + removeProperty +} from "idyll-ast"; + +const ast: AST = [ + ["h2", [], []], + "world", + ["h1", [], ["child1", ["child2", [], []]]] +]; +const prop: Property = ["className", ["value", "hello"]]; + +// $ExpectType Node[] +appendNode(ast, "hello"); + +// $ExpectType Node[] +appendNode(getNodesByName(ast, "div"), "test"); + +// $ExpectType Node[] +appendNodes(ast, [["strong", [], ["div", ["pre", [], []]]], "test"]); + +// $ExpectType Node[] +prependNode(getNodesByName(ast, "div"), "test"); + +// $ExpectType Node[] +prependNodes(ast, [["strong", [], ["div", ["pre", [], []]]], "test"]); + +// $ExpectType TreeNode +createNode("div", { prop1: "prop1", prop2: ["expression", "x=2"] }, []); + +// $ExpectType Node[] +getChildren(ast[0]); + +// $ExpectType void +walkNodes(ast, (n: Node) => { + (n as TreeNode)[0] = "funky-name"; +}); + +// $ExpectType Node[] +findNodes(ast, n => n instanceof Array); + +// $ExpectType Node +modifyChildren(ast[0], (n: Node) => { + if (typeof n === "object") { + n[0] = "somename"; + } +}); +// $ExpectType Node[] +getNodesByName(ast, "h1"); + +// $ExpectType Node +filterChildren(ast[1], n => n === "world"); + +// $ExpectType Node[] +filterNodes(ast, n => (n instanceof Object ? n[0] === "h1" : false)); + +// $ExpectType Node[] +modifyNodesByName(ast, "h2", n => { + typeof n === "object" ? (n[1] = []) : undefined; +}); + +// $ExpectType [PropType, PropData] | null +getProperty(ast[1], "someProp"); +// $ExpectType [string, [PropType, PropData]] +getProperties(ast[1])[0]; +// $ExpectType [string, [PropType, PropData]][] +getPropertiesByType(["h1", [], []], "variable"); + +// $ExpectType Node[] +removeNodesByName(ast, "h1"); + +// $ExpectType Node +setProperty(ast[0], "prop", 9); + +// $ExpectType Node +setProperties(ast[1], { prop1: ["expression", "x"], prop2: 3 }); + +// $ExpectType Node +removeProperty(ast[0], "prop1"); diff --git a/types/idyll-ast/index.d.ts b/types/idyll-ast/index.d.ts new file mode 100644 index 0000000000..4a46320b82 --- /dev/null +++ b/types/idyll-ast/index.d.ts @@ -0,0 +1,137 @@ +// Type definitions for idyll-ast 1.3 +// Project: https://github.com/idyll-lang/idyll/tree/master/packages/idyll-ast +// Definitions by: Thanh Ngo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { + AST, + Node, + TreeNode, + PropValue, + Property, + PropType +} from "idyll-compiler"; + +/** + * appends a single node to the AST + */ +export function appendNode(ast: AST, node: Node): AST; +/** + * appends multiple nodes to the AST + */ +export function appendNodes(ast: AST, nodes: AST): AST; +/** + * creates a node + */ +export function createNode( + name: string, + props: Record, + children: Node[] +): TreeNode; +/** + * gets all children of the node if there is any + * returns an empty array if there is no child + */ +export function getChildren(node: Node): Node[]; +/** + * executes func against every node + */ +export function walkNodes(ast: AST | null, func: (n: Node) => void): void; +/** + * deeply walks the AST tree and returns all the nodes that satisfies the + * given filter + */ +export function findNodes(ast: AST, filter: (n: Node) => boolean): Node[]; +/** + * visits each child of the node and modifies them using the modifier + */ +export function modifyChildren(node: Node, modifier: (n: Node) => void): Node; +/** + * get all nodes by name + */ +export function getNodesByName(ast: AST, name: string): Node[]; +/** + * filters and returns the same node where all children + * satisfy the given filter + */ +export function filterChildren( + node: Node, + filter: (child: Node) => boolean +): Node; + +/** + * filters every node in the AST and returns a new AST whose nodes + * satisfy the given filter + */ +export function filterNodes(ast: AST, filter: (node: Node) => boolean): AST; + +/** + * applies the modifier against node whose name is the given name + * Returns a new ast with the modified nodes + * + * Names are case-insensitive + */ +export function modifyNodesByName( + ast: AST, + name: string, + modifier: (node: Node) => void +): AST; + +/** + * gets the node's property value + * + * returns null if node is a string node + */ +export function getProperty(node: Node, key: string): PropValue | null; + +/** + * returns all node's properties + * + * returns empty array if node is a string node + */ +export function getProperties(node: Node): Property[]; + +/** + * returns all properties having the given property's type + */ +export function getPropertiesByType(node: Node, type: PropType): Property[]; + +export function prependNode(ast: AST, node: Node): AST; +export function prependNodes(ast: AST, nodes: Node[]): AST; + +/** + * returns a new AST with nodes having the given name + * + * Names are case-insensitive + */ +export function removeNodesByName(ast: AST, name: string): AST; + +/** + * sets the property of the node + * + * if value is an array, the property's type is assumed to be included in it + * otherwise, "value" will be the property's type, and parameter value + * is the property's value + * + */ +export function setProperty( + node: Node, + key: string, + value: PropValue | PropValue[1] +): Node; + +/** + * sets the properties of the node + * + * also see setProperty() + */ +export function setProperties( + node: Node, + properties: Record +): Node; + +/** + * removes the node's property which has the given key + */ +export function removeProperty(node: Node, key: string): Node; diff --git a/types/idyll-ast/tsconfig.json b/types/idyll-ast/tsconfig.json new file mode 100644 index 0000000000..1e026c3377 --- /dev/null +++ b/types/idyll-ast/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": ["index.d.ts", "idyll-ast-tests.ts"] +} diff --git a/types/idyll-ast/tslint.json b/types/idyll-ast/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/idyll-ast/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/idyll-compiler/idyll-compiler-tests.ts b/types/idyll-compiler/idyll-compiler-tests.ts new file mode 100644 index 0000000000..c131a8600d --- /dev/null +++ b/types/idyll-compiler/idyll-compiler-tests.ts @@ -0,0 +1,13 @@ +import compile from "idyll-compiler"; + +// Dummy log +const log = (msg: string) => {}; + +// $ExpectType Node[] | Promise +compile("*italics*", { async: false }, () => log("window")); + +// $ExpectType Node[] | Promise +compile("Simple **idyll**", { async: false }); + +// $ExpectType Node[] | Promise +compile(`# Test`); diff --git a/types/idyll-compiler/index.d.ts b/types/idyll-compiler/index.d.ts new file mode 100644 index 0000000000..577dae2070 --- /dev/null +++ b/types/idyll-compiler/index.d.ts @@ -0,0 +1,55 @@ +// Type definitions for idyll-compiler 3.1 +// Project: https://github.com/idyll-lang/idyll/tree/master/packages/idyll-compiler +// Definitions by: Thanh Ngo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +export type PropType = "variable" | "value" | "expression"; +export type PropData = string | number | boolean; +export type PropKey = string; +export type PropValue = [PropType, PropData]; +export type Property = [PropKey, PropValue]; +type __RecursiveNode = [string, Property[], T[]]; +export interface TreeNode extends __RecursiveNode {} +export type Node = TreeNode | string; +export type AST = Node[]; + +export type PostProcessor = + | ((ast: AST) => AST) + | ((ast: AST, callback: (err: any, value: AST) => void) => void); + +export interface Options { + spellcheck?: boolean; + + smartquotes?: boolean; + + /** + * If false and there is no postprocessors, compiler returns the AST synchronously + * Otherwise, a promise is returned + * + */ + async?: boolean; + + /** + * compiler plugins + * If provided, compiler always compiles asynchronously + */ + postProcessors?: PostProcessor[]; +} + +/** + * Compiles the given idyllMarkup and returns an AST either synchronously + * or asynchronously. + * + * If postProcessors are provided or options.async is set to true: + * compiler returns a promise + * Otherwise, compile returns the AST synchronously + * + */ +declare function compiler( + input: string, + options?: Options, + callback?: () => void +): Promise | AST; + +export default compiler; diff --git a/types/idyll-compiler/tsconfig.json b/types/idyll-compiler/tsconfig.json new file mode 100644 index 0000000000..bb08224d15 --- /dev/null +++ b/types/idyll-compiler/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": ["index.d.ts", "idyll-compiler-tests.ts"] +} diff --git a/types/idyll-compiler/tslint.json b/types/idyll-compiler/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/idyll-compiler/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/idyll-document/idyll-document-tests.ts b/types/idyll-document/idyll-document-tests.ts new file mode 100644 index 0000000000..880e017013 --- /dev/null +++ b/types/idyll-document/idyll-document-tests.ts @@ -0,0 +1,5 @@ +import IdyllDocument, { IdyllDocumentProps } from "idyll-document"; +import { createElement } from "react"; + +// $ExpectType ReactElement +createElement(IdyllDocument); diff --git a/types/idyll-document/index.d.ts b/types/idyll-document/index.d.ts new file mode 100644 index 0000000000..47ba1f7845 --- /dev/null +++ b/types/idyll-document/index.d.ts @@ -0,0 +1,62 @@ +// Type definitions for idyll-document 2.9 +// Project: https://github.com/idyll-lang/idyll/tree/master/packages/idyll-document +// Definitions by: Thanh Ngo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { PureComponent, ReactType } from "react"; +import { Options as CompilerOptions, AST } from "idyll-compiler"; + +export interface IdyllDocumentProps { + /** + * Components to be rendered with + */ + components: any; + /** + * the AST to be rendered on the page + * If provided, this will be used insteaed of + * the markup + */ + ast?: AST; + /** + * The Idyll markup to be compiled into AST + */ + markup?: string; + /** + * Initial data set + */ + datasets?: object; + + /** + * The theme for idyll document + * Will correspond to one theme in idyll-theme package + */ + theme?: string; + /** + * The layout for idyll document + * Will correspond to one one layout in idyll-layouts package + */ + layout?: string; + /** + * Callback function if error happens during compilation + */ + onError?: (err: Error) => void; + /** + * The React component rendered when an error occurs + */ + errorComponent?: ReactType<{ + className?: string; + children: Error["message"] | null; + }>; + /** + * Compiler option for Idyll compiler when compiling markup + */ + compilerOptions?: CompilerOptions; + + context?: (context: any) => void; + initialState?: any; +} + +declare class IdyllDocument extends PureComponent {} + +export default IdyllDocument; diff --git a/types/idyll-document/tsconfig.json b/types/idyll-document/tsconfig.json new file mode 100644 index 0000000000..6e3da4c990 --- /dev/null +++ b/types/idyll-document/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": ["index.d.ts", "idyll-document-tests.ts"] +} diff --git a/types/idyll-document/tslint.json b/types/idyll-document/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/idyll-document/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/idyll/idyll-tests.ts b/types/idyll/idyll-tests.ts new file mode 100644 index 0000000000..3f4b90c18c --- /dev/null +++ b/types/idyll/idyll-tests.ts @@ -0,0 +1,7 @@ +import idyll = require("idyll"); + +// $ExpectType IdyllInstance +idyll({ + watch: true, + datasets: "." +}); diff --git a/types/idyll/index.d.ts b/types/idyll/index.d.ts new file mode 100644 index 0000000000..a2f1846a7a --- /dev/null +++ b/types/idyll/index.d.ts @@ -0,0 +1,130 @@ +// Type definitions for idyll 2.10 +// Project: https://github.com/idyll-lang/idyll/tree/master/packages/idyll-cli +// Definitions by: Thanh Ngo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { EventEmitter } from "events"; +import { Options as CompilerOptions } from "idyll-compiler"; + +interface Options { + /** + * Monitor input files and rebuild on changes + */ + watch?: boolean; + /** + * The datasets directory + */ + datasets?: string; + /** + * Whether to minify output build + */ + minify?: boolean; + /** + * + * Pre-render HTML as part of the build + */ + ssr?: boolean; + /** + * The components directory + */ + components?: boolean; + /** + * The default component directory + * This corresponds to where the idyll-components package stays + */ + defaultComponents?: boolean; + /** + * The layout defined in idyll-layouts package + */ + layout?: string; + /** + * The theme defined in idyll-theme package + */ + theme?: string; + /** + * The output directory for compiled documents + */ + output?: string; + /** + * Custom port to bind the local server to. + */ + port?: number; + /** + * Temporary directory used by idyll + */ + temp?: string; + /** + * path to HTML template + * + */ + template?: string; + + /** + * Custom CSS file to include in output + */ + css?: string; + /** + * Custom browserify transforms to apply. + */ + transform?: string[]; + /** + * Compiler options + */ + compiler?: CompilerOptions; + /** + * the idyll file to be compiled into + */ + inputFile?: string; + + /** + * used internally by IdyllInstance + */ + inputConfig?: { + components: any; + transform: any[]; + compiler: CompilerOptions; + }; +} + +type PredefinedFile = + | "APP_PATH" + | "CSS_INPUT_FILE" + | "DATA_DIR" + | "HTML_TEMPLATE_FILE" + | "IDYLL_INPUT_FILE" + | "INPUT_DIR" + | "PACKAGE_FILE" + | "OUTPUT_DIR" + | "TMP_DIR" + | "CSS_OUTPUT_FILE" + | "HTML_OUTPUT_FILE" + | "JS_OUTPUT_FILE"; + +type ComponentFiles = "COMPONENT_DIRS" | "DEFAULT_COMPONENT_DIRS"; + +type Paths = Record & Record; + +declare class IdyllInstance extends EventEmitter { + /** + * Returns internal paths used by idyll-cli + */ + getPaths(): Paths; + /** + * Returns idyll compiling's options + */ + getOptions(): Options; + /** + * + * if indexIdyllMarkup is provided, compiles it + * + * Otherwise, compiles and optionally watches + * the idyll file at IOptions.inputFile + * + */ + build(indexIdyllMarkup?: string | null): this; +} + +declare function idyll(options: Options, callback?: () => void): IdyllInstance; + +export = idyll; diff --git a/types/idyll/tsconfig.json b/types/idyll/tsconfig.json new file mode 100644 index 0000000000..6e24200367 --- /dev/null +++ b/types/idyll/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": ["index.d.ts", "idyll-tests.ts"] +} diff --git a/types/idyll/tslint.json b/types/idyll/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/idyll/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/in-app-purchase/in-app-purchase-tests.ts b/types/in-app-purchase/in-app-purchase-tests.ts new file mode 100644 index 0000000000..4e142e53e2 --- /dev/null +++ b/types/in-app-purchase/in-app-purchase-tests.ts @@ -0,0 +1,38 @@ +import * as iap from 'in-app-purchase'; + +iap.config({ + /* Configurations for Amazon Store */ + amazonAPIVersion: 2, // tells the module to use API version 2 + secret: 'abcdefghijklmnoporstuvwxyz', // this comes from Amazon + + /* Configurations for Apple */ + applePassword: 'abcdefg...', // this comes from iTunes Connect (You need this to valiate subscriptions) + + /* Configurations for Google Play */ + googlePublicKeyPath: 'path/to/public/key/directory/', // this is the path to the directory containing iap-sanbox/iap-live files + googleAccToken: 'abcdef...', // optional, for Google Play subscriptions + googleRefToken: 'dddd...', // optional, for Google Play subscritions + clientId: 'aaaa', // optional, for Google Play subscriptions + clientSecret: 'bbbb', // optional, for Google Play subscriptions + refreshToken: 'cccc', // optional, for Google Play subscriptions + + /* Configurations for Roku */ + rokuApiKey: 'aaaa...', // this comes from Roku Developer Dashboard + + /* Configurations all platforms */ + test: true, // For Apple and Googl Play to force Sandbox validation only + verbose: true // Output debug logs to stdout stream +}); +iap.setup() + .then(() => iap.validate('abcdef')) + .then((validatedData) => { + const options = { + ignoreCanceled: true, // Apple ONLY (for now...): purchaseData will NOT contain cancceled items + ignoreExpired: true // purchaseData will NOT contain exipired subscription items + }; + + const purchaseData = iap.getPurchaseData(validatedData, options); + }) + .catch((error) => { + // error... + }); diff --git a/types/in-app-purchase/index.d.ts b/types/in-app-purchase/index.d.ts new file mode 100644 index 0000000000..b27daf2c20 --- /dev/null +++ b/types/in-app-purchase/index.d.ts @@ -0,0 +1,107 @@ +// Type definitions for in-app-purchase 1.9 +// Project: https://github.com/voltrue2/in-app-purchase#readme +// Definitions by: Jonas Lochmann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export const UNITY = 'unity'; +export const APPLE = 'apple'; +export const GOOGLE = 'google'; +export const WINDOWS = 'windows'; +export const AMAZON = 'amazon'; +export const ROKU = 'roku'; + +export function config(params: Config): void; +export function setup(): Promise; +export function setup(callback: (err: any) => void): void; +export function getService(receipt: Receipt): Service; + +export function validate(receipt: Receipt): Promise; +export function validate(receipt: Receipt, callback: (err: any, res: ValidationResponse) => void): void; +export function validate(service: Service, receipt: Receipt, callback: (err: any, res: ValidationResponse) => void): void; + +export function validateOnce(receipt: Receipt, secretOrPubKey: any): Promise; +export function validateOnce(receipt: Receipt, secretOrPubKey: any, callback: (err: any, res: ValidationResponse) => void): void; +export function validateOnce(service: Service, secretOrPubKey: any, receipt: Receipt, callback: (err: any, res: ValidationResponse) => void): void; + +export function isValidated(response: ValidationResponse): boolean; +export function isExpired(item: PurchasedItem): boolean; +export function getPurchaseData(purchaseData?: ValidationResponse, options?: { + ignoreCanceled: boolean; + ignoreExpired: boolean; +}): PurchasedItem[] | null; + +export function refreshGoogleToken(): Promise; +export function refreshGoogleToken(callback: (err: any) => void): void; + +// for test use only, resets the google setup +export function reset(): void; + +export interface Config { + /* Configurations for Amazon Store */ + amazonAPIVersion?: number; + secret?: string; + + /* Configurations for Apple */ + + // this comes from iTunes Connect (You need this to valiate subscriptions) + applePassword?: string; + + /* Configurations for Google Play */ + // this is the path to the directory containing iap-sanbox/iap-live files + googlePublicKeyPath?: string; + // optional, for Google Play subscriptions + googleAccToken?: string; + // optional, for Google Play subscritions + googleRefToken?: string; + // optional, for Google Play subscriptions + clientId?: string; + // optional, for Google Play subscriptions + clientSecret?: string; + // optional, for Google Play subscriptions + refreshToken?: string; + + /* Configurations for Roku */ + // this comes from Roku Developer Dashboard + rokuApiKey?: string; + + /* Configurations all platforms */ + // For Apple and Googl Play to force Sandbox validation only + test?: boolean; + // Output debug logs to stdout stream + verbose?: boolean; +} + +export type Service = typeof UNITY | typeof APPLE | typeof GOOGLE | typeof WINDOWS | typeof AMAZON | typeof ROKU; + +export type UnityReceipt = object | string; +export type AppleReceipt = string; +export type GoogleReceipt = { + date: string; + signature: string; +} | string; +export type WindowsReceipt = string; +export type AmazonReceipt = object | string; +export type RokuReceipt = string; + +export type Receipt = UnityReceipt | AppleReceipt | GoogleReceipt | WindowsReceipt | AmazonReceipt | RokuReceipt; + +export interface ValidationResponse { + service: Service; + status: number; + // there are more fields depending on the used service +} + +export interface PurchasedItem { + bundleId?: string; // only Apple + orderId?: string; // only Google + transactionId: string; + productId: string; + purchaseDate: number; + // iTunes, windows and amazon subscription only + // Google subscriptions only with google play store api info + expirationDate?: number; + quantity: number; + // this was created based on the source code of in-app-purchase + // eventually there are more fields +} diff --git a/types/in-app-purchase/tsconfig.json b/types/in-app-purchase/tsconfig.json new file mode 100644 index 0000000000..7752182f8a --- /dev/null +++ b/types/in-app-purchase/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "in-app-purchase-tests.ts" + ] +} diff --git a/types/in-app-purchase/tslint.json b/types/in-app-purchase/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/in-app-purchase/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/intercom-client/index.d.ts b/types/intercom-client/index.d.ts new file mode 100644 index 0000000000..b68dc87e71 --- /dev/null +++ b/types/intercom-client/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for intercom-client 2.9 +// Project: https://github.com/intercom/intercom-node +// Definitions by: Jinesh Shah +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface IdentityVerificationOptions { + secretKey: string; + identifier: string; +} + +export const IdentityVerification: { + userHash(opts: IdentityVerificationOptions): string; +}; diff --git a/types/intercom-client/intercom-client-tests.ts b/types/intercom-client/intercom-client-tests.ts new file mode 100644 index 0000000000..e74dab4f53 --- /dev/null +++ b/types/intercom-client/intercom-client-tests.ts @@ -0,0 +1,3 @@ +import * as intercom from "intercom-client"; + +intercom.IdentityVerification.userHash({ secretKey: "", identifier: "" }); // $ExpectType string diff --git a/types/intercom-client/tsconfig.json b/types/intercom-client/tsconfig.json new file mode 100644 index 0000000000..a74d113775 --- /dev/null +++ b/types/intercom-client/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": ["index.d.ts", "intercom-client-tests.ts"] +} diff --git a/types/intercom-client/tslint.json b/types/intercom-client/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/intercom-client/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/intercom-web/index.d.ts b/types/intercom-web/index.d.ts index a0b4e71015..563d241c31 100755 --- a/types/intercom-web/index.d.ts +++ b/types/intercom-web/index.d.ts @@ -4,6 +4,7 @@ // customize-the-intercom-messenger/the-intercom-javascript-api // Definitions by: Andrew Fong // Samer Albahra +// Onat Yigit Mercan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Intercom_ { @@ -27,6 +28,8 @@ declare namespace Intercom_ { monthly_spend?: number, [index: string]: any; }; + vertical_padding?: number; + horizontal_padding?: number; } type IntercomCommand = 'boot' diff --git a/types/intercom-web/intercom-web-tests.ts b/types/intercom-web/intercom-web-tests.ts index 22eeddc8fa..b07013322d 100755 --- a/types/intercom-web/intercom-web-tests.ts +++ b/types/intercom-web/intercom-web-tests.ts @@ -60,3 +60,15 @@ intercomSettings = { user_id: "12345", user_hash: "775c502lcc1087d12398571837c" }; + +/* + From https://docs.intercom.com/configure-intercom-for-your-product-or-site/ + customize-the-intercom-messenger/ + customize-the-intercom-messenger-technical +*/ +intercomSettings = { + app_id: "pi3243fa", + alignment: "left", + horizontal_padding: 20, + vertical_padding: 20 +}; diff --git a/types/intl-tel-input/index.d.ts b/types/intl-tel-input/index.d.ts index b0a6bf5721..34493a8b75 100644 --- a/types/intl-tel-input/index.d.ts +++ b/types/intl-tel-input/index.d.ts @@ -171,16 +171,27 @@ declare namespace IntlTelInput { * that way as it provides a better experience for the user. */ nationalMode?: boolean; - /** - * Specify one of the keys from the global enum intlTelInputUtils.numberType - * e.g. "FIXED_LINE" to tell the plugin you're expecting that type of number. - * Currently this is only used to set the placeholder to the right type of number. - */ - numberType?: string; /** * Display only the countries you specify. */ onlyCountries?: Array; + /** + * Specify one of the keys from the global enum intlTelInputUtils.numberType + * e.g. "FIXED_LINE" to set the number type to use for the placeholder. + */ + placeholderNumberType?: + | "FIXED_LINE_OR_MOBILE" + | "FIXED_LINE" + | "MOBILE" + | "PAGER" + | "PERSONAL_NUMBER" + | "PREMIUM_RATE" + | "SHARED_COST" + | "TOLL_FREE" + | "UAN" + | "UNKNOWN" + | "VOICEMAIL" + | "VOIP"; /** * Specify the countries to appear at the top of the list. */ diff --git a/types/intl-tel-input/intl-tel-input-tests.ts b/types/intl-tel-input/intl-tel-input-tests.ts index 0d23c40d75..e91a5deef1 100644 --- a/types/intl-tel-input/intl-tel-input-tests.ts +++ b/types/intl-tel-input/intl-tel-input-tests.ts @@ -6,6 +6,10 @@ $('#phone').intlTelInput({ } }); +$('#phone').intlTelInput({ + placeholderNumberType: "MOBILE", +}); + $('#phone').intlTelInput({ geoIpLookup: function(callback) { $.get('http://ipinfo.io', function() {}, 'jsonp').always(function(resp) { diff --git a/types/ioredis/index.d.ts b/types/ioredis/index.d.ts index bc3d656985..84ca51982a 100644 --- a/types/ioredis/index.d.ts +++ b/types/ioredis/index.d.ts @@ -798,7 +798,11 @@ declare namespace IORedis { * Fixed in: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/15858 */ retryStrategy?(times: number): number | false; - reconnectOnError?(error: Error): boolean; + /** + * 1/true means reconnect, 2 means reconnect and resend failed command. Returning false will ignore + * the error and do nothing. + */ + reconnectOnError?(error: Error): boolean | 1 | 2; /** * By default, if there is no active connection to the Redis server, commands are added to a queue * and are executed once the connection is "ready" (when enableReadyCheck is true, "ready" means diff --git a/types/ip/index.d.ts b/types/ip/index.d.ts index 602a71eed9..c51a8d37f5 100644 --- a/types/ip/index.d.ts +++ b/types/ip/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Peter Harris // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface NodeBuffer { } +/// interface SubnetInfo { networkAddress: string; @@ -26,16 +26,16 @@ declare module "ip" { /** * Convert an IP string into a buffer. **/ - export function toBuffer(ip: string, buffer?: number, offset?: number): NodeBuffer; + export function toBuffer(ip: string, buffer?: number, offset?: number): Buffer; /** * Convert an IP buffer into a string. **/ - export function toString(ip: NodeBuffer, offset?: number, length?: number): string; + export function toString(ip: Buffer, offset?: number, length?: number): string; /** * Get the subnet mask from a CIDR prefix length. - * + * * @param family The IP family is infered from the prefixLength, but can be explicity specified as either "ipv4" or "ipv6". **/ export function fromPrefixLen(prefixLength: number, family?:string): string; @@ -79,15 +79,15 @@ declare module "ip" { * Check whether an IP is a IPv4 address. **/ export function isV4Format(ip: string): boolean; - + /** * Check whether an IP is a IPv6 address. **/ export function isV6Format(ip: string): boolean; - + /** * Get the loopback address for an IP family. - * + * * @param family The family can be either "ipv4" or "ipv6". Default: "ipv4". **/ export function loopback(family?: string): string; @@ -95,7 +95,7 @@ declare module "ip" { /** * Get the address for the network interface on the current system with the specified 'name'. * If no interface name is specified, the first IPv4 address or loopback address is returned. - * + * * @param name The name can be any named interface, or 'public' or 'private'. * @param family The family can be either "ipv4" or "ipv6". Default: "ipv4". **/ diff --git a/types/is/index.d.ts b/types/is/index.d.ts index 3b70472d65..37b485e0a0 100644 --- a/types/is/index.d.ts +++ b/types/is/index.d.ts @@ -87,6 +87,11 @@ interface IsStatic { */ undefined(value: any): boolean; + /** + * Checks if the given value type is defined. + */ + defined(value: any): boolean; + /** * Checks if the given value types are same type. */ @@ -748,6 +753,16 @@ interface IsStaticApi { */ undefined(value: any[]): boolean; + /** + * Checks if the given value type is defined. + */ + defined(...value: any[]): boolean; + + /** + * Checks if the given value type is defined. + */ + defined(value: any[]): boolean; + //#endregion //#region Presence checks diff --git a/types/is/is-tests.ts b/types/is/is-tests.ts index 0084de8990..77a88a81b3 100644 --- a/types/is/is-tests.ts +++ b/types/is/is-tests.ts @@ -104,6 +104,12 @@ is.all.undefined(undefined, 1); is.any.undefined(undefined, 2); is.all.undefined([{}, undefined]); +is.defined(undefined); +is.not.defined(null); +is.all.defined(undefined, 1); +is.any.defined(undefined, 2); +is.all.defined([{}, undefined]); + is.sameType(42, 7); is.sameType(42, '7'); is.not.sameType(42, 7); diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index f3e0407bab..cd1d5de31e 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -130,6 +130,7 @@ declare function waits(timeout?: number): void; declare namespace jasmine { type Expected = T | ObjectContaining | Any | Spy; + type SpyObjMethodNames = string[] | {[methodName: string]: any}; var clock: () => Clock; @@ -144,12 +145,11 @@ declare namespace jasmine { function objectContaining(sample: Partial): ObjectContaining; function createSpy(name?: string, originalFn?: Function): Spy; - function createSpyObj(baseName: string, methodNames: any[] | {[methodName: string]: any}): any; - function createSpyObj(baseName: string, methodNames: any[] | {[methodName: string]: any}): SpyObj; + function createSpyObj(baseName: string, methodNames: SpyObjMethodNames): any; + function createSpyObj(baseName: string, methodNames: SpyObjMethodNames): SpyObj; - function createSpyObj(baseName: string, methodNames: any): any; - function createSpyObj(methodNames: any[]): any; - function createSpyObj(methodNames: any): any; + function createSpyObj(methodNames: SpyObjMethodNames): any; + function createSpyObj(methodNames: SpyObjMethodNames): SpyObj; function pp(value: any): string; diff --git a/types/jasmine/jasmine-tests.ts b/types/jasmine/jasmine-tests.ts index b54269aa61..54e97ed73e 100644 --- a/types/jasmine/jasmine-tests.ts +++ b/types/jasmine/jasmine-tests.ts @@ -1109,7 +1109,17 @@ describe("createSpyObj", function () { expect(spyObj.method2.and.identity()).toEqual('BaseName.method2'); }); - it("should allow you to omit the baseName", function () { + it("should allow you to omit the baseName and takes only an object", function () { + var spyObj = jasmine.createSpyObj({ 'method1': 42, 'method2': 'special sauce' }); + + expect(spyObj.method1()).toEqual(42); + expect(spyObj.method1.and.identity()).toEqual('unknown.method1'); + + expect(spyObj.method2()).toEqual('special sauce'); + expect(spyObj.method2.and.identity()).toEqual('unknown.method2'); + }); + + it("should allow you to omit the baseName and takes only a list of methods", function () { var spyObj = jasmine.createSpyObj(['method1', 'method2']); expect(spyObj).toEqual({ method1: jasmine.any(Function), method2: jasmine.any(Function) }); @@ -1117,12 +1127,6 @@ describe("createSpyObj", function () { expect(spyObj.method2.and.identity()).toEqual('unknown.method2'); }); - it("should throw if you do not pass an array or object argument", function () { - expect(function () { - jasmine.createSpyObj('BaseName'); - }).toThrow("createSpyObj requires a non-empty array or object of method names to create spies for"); - }); - it("should throw if you pass an empty array argument", function () { expect(function () { jasmine.createSpyObj('BaseName', []); diff --git a/types/jest-axe/index.d.ts b/types/jest-axe/index.d.ts new file mode 100644 index 0000000000..f16f4e7651 --- /dev/null +++ b/types/jest-axe/index.d.ts @@ -0,0 +1,85 @@ +// Type definitions for jest-axe 2.2 +// Project: https://github.com/nickcolley/jest-axe +// Definitions by: Josh Goldberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import { AxeResults, Result, RunOnly } from "axe-core"; + +/** + * Version of the aXe verifier with defaults set. + * + * @remarks You can still pass additional options to this new instance; + * they will be merged with the defaults. + */ +export const axe: JestAxe; + +/** + * Core options to run aXe. + */ +export interface AxeOptions { + elementRef?: boolean; + iframes?: boolean; + rules?: object; + runOnly?: RunOnly; + selectors?: boolean; +} + +/** + * Runs aXe on HTML. + * + * @param html Raw HTML string to verify with aXe. + * @param options Options to run aXe. + * @returns Promise for the results of running aXe. + */ +export type JestAxe = (html: string, options?: AxeOptions) => Promise; + +/** + * Creates a new aXe verifier function. + * + * @param options Options to run aXe. + * @returns New aXe verifier function. + */ +export function configureAxe(options?: AxeOptions): JestAxe; + +/** + * Results from asserting whether aXe verification passed. + */ +export interface AssertionsResult { + /** + * Actual checked aXe verification results. + */ + actual: Result[]; + + /** + * @returns Message from the Jest assertion. + */ + message(): string; + + /** + * Whether the assertion passed. + */ + pass: boolean; +} + +/** + * Asserts an aXe-verified result has no violations. + * + * @param results aXe verification result, if not running via expect(). + * @returns Jest expectations for the aXe result. + */ +export type IToHaveNoViolations = (results?: Partial) => AssertionsResult; + +export const toHaveNoViolations: { + toHaveNoViolations: IToHaveNoViolations; +}; + +declare global { + namespace jest { + interface Matchers { + toHaveNoViolations: IToHaveNoViolations; + } + } +} diff --git a/types/jest-axe/jest-axe-tests.ts b/types/jest-axe/jest-axe-tests.ts new file mode 100644 index 0000000000..38caeb88eb --- /dev/null +++ b/types/jest-axe/jest-axe-tests.ts @@ -0,0 +1,19 @@ +import { configureAxe, axe, toHaveNoViolations, JestAxe } from "jest-axe"; + +expect.extend(toHaveNoViolations); + +const newJestWithDefaults: JestAxe = configureAxe(); + +const newJestWithOptions: JestAxe = configureAxe({ + elementRef: false, + iframes: false, + rules: {}, + runOnly: { + type: "rules", + }, + selectors: false, +}); + +const sameJest: JestAxe = axe; + +expect("").toHaveNoViolations(); diff --git a/types/activex-iwshruntimelibrary/package.json b/types/jest-axe/package.json similarity index 61% rename from types/activex-iwshruntimelibrary/package.json rename to types/jest-axe/package.json index d9b1031263..d9427293a7 100644 --- a/types/activex-iwshruntimelibrary/package.json +++ b/types/jest-axe/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "activex-helpers": "*" + "axe-core": "^2.6.1" } -} \ No newline at end of file +} diff --git a/types/jest-axe/tsconfig.json b/types/jest-axe/tsconfig.json new file mode 100644 index 0000000000..887813c869 --- /dev/null +++ b/types/jest-axe/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jest-axe-tests.ts" + ] +} diff --git a/types/jest-axe/tslint.json b/types/jest-axe/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jest-axe/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jest-each/index.d.ts b/types/jest-each/index.d.ts new file mode 100644 index 0000000000..01d13db0e4 --- /dev/null +++ b/types/jest-each/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for jest-each 0.3 +// Project: https://github.com/mattphillips/jest-each +// Definitions by: Michael Utz +// Definitions: +// TypeScript Version: 2.1 + +export = JestEach; + +declare function JestEach(parameters: any[][]): JestEach.ReturnType; + +declare namespace JestEach { + type SyncCallback = (...args: string[]) => void; + type AsyncCallback = () => void; + + type TestCallback = SyncCallback | AsyncCallback; + + type TestFn = (name: string, fn: TestCallback) => void; + type DescribeFn = (name: string, fn: SyncCallback) => void; + + interface TestObj { + (name: string, fn: TestCallback): void; + only: TestFn; + skip: TestFn; + } + + interface DescribeObj { + (name: string, fn: DescribeFn): void; + only: DescribeFn; + skip: DescribeFn; + } + + interface ReturnType { + test: TestObj; + it: TestObj; + fit: TestFn; + xit: TestFn; + xtest: TestFn; + describe: DescribeObj; + fdescribe: DescribeFn; + xdescribe: DescribeFn; + } +} diff --git a/types/jest-each/jest-each-tests.ts b/types/jest-each/jest-each-tests.ts new file mode 100644 index 0000000000..bbfbcabe05 --- /dev/null +++ b/types/jest-each/jest-each-tests.ts @@ -0,0 +1,19 @@ +import * as each from 'jest-each'; + +const params = [[1, 0, 1], [1, 1, 0], ['1', 'two', 'three']]; + +each(params).test('', () => {}); +each(params).it('', () => {}); +each(params).test.only('', () => {}); +each(params).it.only('', () => {}); +each(params).fit('', () => {}); +each(params).test.skip('', () => {}); +each(params).it.skip('', () => {}); +each(params).xit('', () => {}); +each(params).xtest('', () => {}); + +each(params).describe('', () => {}); +each(params).describe.only('', () => {}); +each(params).fdescribe('', () => {}); +each(params).describe.skip('', () => {}); +each(params).xdescribe('', () => {}); diff --git a/types/jest-each/tsconfig.json b/types/jest-each/tsconfig.json new file mode 100644 index 0000000000..62a3193837 --- /dev/null +++ b/types/jest-each/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jest-each-tests.ts" + ] +} diff --git a/types/jest-each/tslint.json b/types/jest-each/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jest-each/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/joi/index.d.ts b/types/joi/index.d.ts index 2b6d264b3e..48e2a0327c 100644 --- a/types/joi/index.d.ts +++ b/types/joi/index.d.ts @@ -11,6 +11,7 @@ // Dan Kraus // Anjun Wang // Rafael Kallis +// Conan Lai // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -152,6 +153,17 @@ export interface WhenOptions { otherwise?: SchemaLike; } +export interface WhenSchemaOptions { + /** + * the alternative schema type if the condition is true. Required if otherwise is missing. + */ + then?: SchemaLike; + /** + * the alternative schema type if the condition is false. Required if then is missing + */ + otherwise?: SchemaLike; +} + export interface ReferenceOptions { separator?: string; contextPrefix?: string; @@ -347,6 +359,7 @@ export interface AnySchema extends JoiObject { */ when(ref: string, options: WhenOptions): AlternativesSchema; when(ref: Reference, options: WhenOptions): AlternativesSchema; + when(ref: Schema, options: WhenSchemaOptions): AlternativesSchema; /** * Overrides the key name in error messages. @@ -922,6 +935,7 @@ export interface AlternativesSchema extends AnySchema { try(...types: SchemaLike[]): this; when(ref: string, options: WhenOptions): this; when(ref: Reference, options: WhenOptions): this; + when(ref: Schema, options: WhenSchemaOptions): this; } export interface LazySchema extends AnySchema { @@ -1218,6 +1232,7 @@ export function concat(schema: T): T; */ export function when(ref: string, options: WhenOptions): AlternativesSchema; export function when(ref: Reference, options: WhenOptions): AlternativesSchema; +export function when(ref: Schema, options: WhenSchemaOptions): AlternativesSchema; /** * Overrides the key name in error messages. diff --git a/types/joi/joi-tests.ts b/types/joi/joi-tests.ts index 1ab3316eb8..5ea9088a74 100644 --- a/types/joi/joi-tests.ts +++ b/types/joi/joi-tests.ts @@ -128,6 +128,14 @@ whenOpts = { is: schemaLike, then: schemaLike, otherwise: schemaLike }; // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- +let whenSchemaOpts: Joi.WhenSchemaOptions = null; + +whenSchemaOpts = { then: schema }; +whenSchemaOpts = { otherwise: schema }; +whenSchemaOpts = { then: schemaLike, otherwise: schemaLike }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + let refOpts: Joi.ReferenceOptions = null; refOpts = { separator: str }; @@ -276,6 +284,7 @@ namespace common { altSchema = anySchema.when(str, whenOpts); altSchema = anySchema.when(ref, whenOpts); + altSchema = anySchema.when(schema, whenSchemaOpts); anySchema = anySchema.label(str); anySchema = anySchema.raw(); @@ -363,6 +372,7 @@ namespace common_copy_paste { altSchema = arrSchema.when(str, whenOpts); altSchema = arrSchema.when(ref, whenOpts); + altSchema = arrSchema.when(schema, whenSchemaOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -433,6 +443,7 @@ namespace common_copy_paste { altSchema = boolSchema.when(str, whenOpts); altSchema = boolSchema.when(ref, whenOpts); + altSchema = boolSchema.when(schema, whenSchemaOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -489,6 +500,7 @@ namespace common { altSchema = binSchema.when(str, whenOpts); altSchema = binSchema.when(ref, whenOpts); + altSchema = binSchema.when(schema, whenSchemaOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -561,6 +573,7 @@ namespace common { altSchema = dateSchema.when(str, whenOpts); altSchema = dateSchema.when(ref, whenOpts); + altSchema = dateSchema.when(schema, whenSchemaOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -635,6 +648,7 @@ namespace common { altSchema = numSchema.when(str, whenOpts); altSchema = numSchema.when(ref, whenOpts); + altSchema = numSchema.when(schema, whenSchemaOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -749,6 +763,7 @@ namespace common { altSchema = objSchema.when(str, whenOpts); altSchema = objSchema.when(ref, whenOpts); + altSchema = objSchema.when(schema, whenSchemaOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -843,6 +858,7 @@ namespace common { altSchema = strSchema.when(str, whenOpts); altSchema = strSchema.when(ref, whenOpts); + altSchema = strSchema.when(schema, whenSchemaOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -1049,6 +1065,7 @@ schema = Joi.concat(x); schema = Joi.when(str, whenOpts); schema = Joi.when(ref, whenOpts); +schema = Joi.when(schema, whenSchemaOpts); schema = Joi.label(str); schema = Joi.raw(); @@ -1102,6 +1119,7 @@ schema = Joi.concat(x); schema = Joi.when(str, whenOpts); schema = Joi.when(ref, whenOpts); +schema = Joi.when(schema, whenSchemaOpts); schema = Joi.label(str); schema = Joi.raw(); diff --git a/types/jpegtran-bin/index.d.ts b/types/jpegtran-bin/index.d.ts new file mode 100644 index 0000000000..b946d056b7 --- /dev/null +++ b/types/jpegtran-bin/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for jpegtran-bin 3.2 +// Project: https://github.com/imagemin/jpegtran-bin#readme +// Definitions by: Hirotaka Ikoma +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare const jpegtran: string; +export = jpegtran; diff --git a/types/jpegtran-bin/jpegtran-bin-tests.ts b/types/jpegtran-bin/jpegtran-bin-tests.ts new file mode 100644 index 0000000000..9f3e8318fd --- /dev/null +++ b/types/jpegtran-bin/jpegtran-bin-tests.ts @@ -0,0 +1,6 @@ +import { execFile } from "child_process"; +import * as jpegtran from "jpegtran-bin"; + +execFile(jpegtran, ["-outfile", "output.jpg", "input.jpg"], { encoding: "utf-8" }, (err: Error | null) => { + console.log("Image minified!"); +}); diff --git a/types/jpegtran-bin/tsconfig.json b/types/jpegtran-bin/tsconfig.json new file mode 100644 index 0000000000..5f260cfaed --- /dev/null +++ b/types/jpegtran-bin/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jpegtran-bin-tests.ts" + ] +} diff --git a/types/jpegtran-bin/tslint.json b/types/jpegtran-bin/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jpegtran-bin/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jquery-focus-exit/index.d.ts b/types/jquery-focus-exit/index.d.ts new file mode 100644 index 0000000000..8787136a4e --- /dev/null +++ b/types/jquery-focus-exit/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for JQuery Focus Exit 1.0 +// Project: https://github.com/makeup-jquery/jquery-focus-exit +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +export interface FocusElements { + lostFocus?: HTMLElement; + gainedFocus: HTMLElement; +} + +declare global { + interface JQuery { + focusExit(options?: { debug: boolean }): JQuery; + on(event: 'focusExit', handler: ((event: JQuery.Event, data: FocusElements) => void)): JQuery; + one(event: 'focusin', handler: ((event: JQuery.Event) => void)): JQuery; + } +} diff --git a/types/jquery-focus-exit/jquery-focus-exit-tests.ts b/types/jquery-focus-exit/jquery-focus-exit-tests.ts new file mode 100644 index 0000000000..497e44dd97 --- /dev/null +++ b/types/jquery-focus-exit/jquery-focus-exit-tests.ts @@ -0,0 +1,8 @@ +$('.test').one('focusin', e => { + $(e.currentTarget).addClass('focusin'); +}); + +$('.test').focusExit({debug: true}).on('focusExit', (e, data) => { + console.log(e, data); + $(e.currentTarget).removeClass('focusin'); +}); diff --git a/types/react-native-linear-gradient/tsconfig.json b/types/jquery-focus-exit/tsconfig.json similarity index 85% rename from types/react-native-linear-gradient/tsconfig.json rename to types/jquery-focus-exit/tsconfig.json index 60d93ae024..b9448645b8 100644 --- a/types/react-native-linear-gradient/tsconfig.json +++ b/types/jquery-focus-exit/tsconfig.json @@ -16,10 +16,10 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "jsx": "react-native" + "esModuleInterop": true }, "files": [ "index.d.ts", - "react-native-linear-gradient-tests.tsx" + "jquery-focus-exit-tests.ts" ] } \ No newline at end of file diff --git a/types/jquery-focus-exit/tslint.json b/types/jquery-focus-exit/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/jquery-focus-exit/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/jquery-loading-overlay/index.d.ts b/types/jquery-loading-overlay/index.d.ts new file mode 100644 index 0000000000..ff5fa59976 --- /dev/null +++ b/types/jquery-loading-overlay/index.d.ts @@ -0,0 +1,46 @@ +// Type definitions for JQuery Loading Overlay 1.0 +// Project: https://github.com/jgerigmeyer/jquery-loading-overlay +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +export type Options = Partial<{ + /** + * Class added to target while loading + */ + loadingClass: string; + + /** + * Class added to overlay (style with CSS) + */ + overlayClass: string; + + /** + * Class added to loading overlay spinner + */ + spinnerClass: string; + + /** + * Class added to loading overlay spinner + */ + iconClass: string; + + /** + * Class added to loading overlay spinner + */ + textClass: string; + + /** + * Text within loading overlay + */ + loadingText: string; +}>; + +declare global { + interface JQuery { + loadingOverlay(options?: Options): JQuery; + loadingOverlay(method: 'remove', options?: Options): JQuery; + } +} diff --git a/types/jquery-loading-overlay/jquery-loading-overlay-tests.ts b/types/jquery-loading-overlay/jquery-loading-overlay-tests.ts new file mode 100644 index 0000000000..a4d2afec9a --- /dev/null +++ b/types/jquery-loading-overlay/jquery-loading-overlay-tests.ts @@ -0,0 +1,23 @@ +import { Options } from "jquery-loading-overlay"; + +// Basic usage +$('#target').loadingOverlay(); + +$('#target').loadingOverlay('remove'); + +// With options +const options: Options = { + loadingClass: 'loading', + overlayClass: 'loading-overlay', + spinnerClass: 'loading-spinner', + iconClass: 'loading-icon', + textClass: 'loading-text', + loadingText: 'loading' +}; + +$('#target').loadingOverlay(options); + +$('#target').loadingOverlay('remove', { + loadingClass: 'loading', + overlayClass: 'loading-overlay' +}); diff --git a/types/jquery-loading-overlay/tsconfig.json b/types/jquery-loading-overlay/tsconfig.json new file mode 100644 index 0000000000..cb40c55c09 --- /dev/null +++ b/types/jquery-loading-overlay/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "jquery-loading-overlay-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery-loading-overlay/tslint.json b/types/jquery-loading-overlay/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/jquery-loading-overlay/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/jquery-next-id/index.d.ts b/types/jquery-next-id/index.d.ts new file mode 100644 index 0000000000..bdb573dfa1 --- /dev/null +++ b/types/jquery-next-id/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for jquery-next-id 1.0 +// Project: https://github.com/makeup-jquery/jquery-next-id +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +export interface JQueryNextId { + (prefix?: string): JQuery; + + defaults: { + prefix: string; + separator: string; + }; +} + +declare global { + interface JQuery { + nextId: JQueryNextId; + } +} diff --git a/types/jquery-next-id/jquery-next-id-tests.ts b/types/jquery-next-id/jquery-next-id-tests.ts new file mode 100644 index 0000000000..663dfbabe3 --- /dev/null +++ b/types/jquery-next-id/jquery-next-id-tests.ts @@ -0,0 +1,6 @@ +$('div').nextId('my-prefix'); + +$.fn.nextId.defaults = { + prefix: 'id', + separator: '-' +}; diff --git a/types/jquery-next-id/tsconfig.json b/types/jquery-next-id/tsconfig.json new file mode 100644 index 0000000000..a8bd98da54 --- /dev/null +++ b/types/jquery-next-id/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "jquery-next-id-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery-next-id/tslint.json b/types/jquery-next-id/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/jquery-next-id/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index 8422f3ec5c..b0838f9a8d 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -4517,6 +4517,21 @@ interface JQuery extends Iterable selector: JQuery.Selector | null, data: TData, handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: string, + selector: JQuery.Selector | null, + data: TData, + handler: ((event: JQueryEventObject) => void)): this; // tslint:disable-line:unified-signatures /** * Attach an event handler function for one or more events to the selected elements. * @@ -4531,6 +4546,19 @@ interface JQuery extends Iterable on(events: string, selector: JQuery.Selector, handler: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the + * selector is null or omitted, the event is always triggered when it reaches the selected element. + * @param handler A function to execute when the event is triggered. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: string, + selector: JQuery.Selector, + handler: ((event: JQueryEventObject) => void)): this; // tslint:disable-line:unified-signatures /** * Attach an event handler function for one or more events to the selected elements. * @@ -4543,6 +4571,18 @@ interface JQuery extends Iterable on(events: string, data: TData, handler: JQuery.EventHandler | JQuery.EventHandlerBase>): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param data Data to be passed to the handler in event.data when an event is triggered. + * @param handler A function to execute when the event is triggered. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: string, + data: TData, + handler: ((event: JQueryEventObject) => void)): this; // tslint:disable-line:unified-signatures /** * Attach an event handler function for one or more events to the selected elements. * @@ -4554,6 +4594,16 @@ interface JQuery extends Iterable */ on(events: string, handler: JQuery.EventHandler | JQuery.EventHandlerBase> | false): this; + /** + * Attach an event handler function for one or more events to the selected elements. + * + * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". + * @param handler A function to execute when the event is triggered. + * @see {@link https://api.jquery.com/on/} + * @since 1.7 + */ + on(events: string, + handler: ((event: JQueryEventObject) => void)): this; // tslint:disable-line:unified-signatures /** * Attach an event handler function for one or more events to the selected elements. * @@ -5565,7 +5615,7 @@ interface Iterable { } declare namespace JQuery { type TypeOrArray = T | T[]; - type Node = Element | Text | Comment; + type Node = Element | Text | Comment | DocumentFragment; /** * A string is designated htmlString in jQuery documentation when it is used to represent one or more diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index 6773f923ef..47a85b80d2 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -655,9 +655,9 @@ function JQueryStatic() { } function isNumeric() { - function type_guard(obj: boolean) { + function type_guard(obj: boolean | number) { if ($.isNumeric(obj)) { - // $ExpectType (true & number) | (false & number) + // $ExpectType number obj; } else { // $ExpectType boolean @@ -3634,6 +3634,14 @@ function JQuery() { event; }); + // $ExpectType JQuery + $('table').on('myEvent', 'td', 'myData', function(event: JQueryEventObject) { + // $ExpectType HTMLElement + this; + // $ExpectType JQueryEventObject + event; + }); + // $ExpectType JQuery $('table').on('myEvent', 'td', 'myData', function(this: I1, event) { // $ExpectType I1 @@ -3650,6 +3658,14 @@ function JQuery() { event; }); + // $ExpectType JQuery + $('table').on('myEvent', null, 'myData', function(event: JQueryEventObject) { + // $ExpectType HTMLElement + this; + // $ExpectType JQueryEventObject + event; + }); + // $ExpectType JQuery $('table').on('myEvent', null, 'myData', function(this: I1, event) { // $ExpectType I1 @@ -3666,6 +3682,14 @@ function JQuery() { event; }); + // $ExpectType JQuery + $('table').on('myEvent', 'td', function(event: JQueryEventObject) { + // $ExpectType HTMLElement + this; + // $ExpectType JQueryEventObject + event; + }); + // $ExpectType JQuery $('table').on('myEvent', 'td', function(this: I1, event) { // $ExpectType I1 @@ -3685,6 +3709,14 @@ function JQuery() { event; }); + // $ExpectType JQuery + $('table').on('myEvent', 3, function(event: JQueryEventObject) { + // $ExpectType HTMLElement + this; + // $ExpectType JQueryEventObject + event; + }); + // $ExpectType JQuery $('table').on('myEvent', 3, function(this: I1, event) { // $ExpectType I1 @@ -3701,6 +3733,38 @@ function JQuery() { event; }); + // $ExpectType JQuery + $('table').on('myEvent', function(event: JQueryEventObject) { + // $ExpectType HTMLElement + this; + // $ExpectType JQueryEventObject + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', function(event: JQueryInputEventObject) { + // $ExpectType HTMLElement + this; + // $ExpectType JQueryInputEventObject + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', function(event: JQueryMouseEventObject) { + // $ExpectType HTMLElement + this; + // $ExpectType JQueryMouseEventObject + event; + }); + + // $ExpectType JQuery + $('table').on('myEvent', function(event: JQueryKeyEventObject) { + // $ExpectType HTMLElement + this; + // $ExpectType JQueryKeyEventObject + event; + }); + // $ExpectType JQuery $('table').on('myEvent', function(this: I1, event) { // $ExpectType I1 @@ -5153,7 +5217,7 @@ function JQuery() { function manipulation() { function after() { // $ExpectType JQuery - $('p').after('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()]); + $('p').after('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()], document.createDocumentFragment()); // $ExpectType JQuery $('p').after(function(index, html) { @@ -5218,7 +5282,7 @@ function JQuery() { function append() { // $ExpectType JQuery - $('p').append('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()]); + $('p').append('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()], document.createDocumentFragment()); // $ExpectType JQuery $('p').append(function(index, html) { @@ -5286,7 +5350,7 @@ function JQuery() { function before() { // $ExpectType JQuery - $('p').before('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()]); + $('p').before('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text(), $('p').contents()], document.createDocumentFragment()); // $ExpectType JQuery $('p').before(function(index, html) { @@ -5351,7 +5415,7 @@ function JQuery() { function prepend() { // $ExpectType JQuery - $('p').prepend('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text()], [new Element(), $('p').contents()]); + $('p').prepend('

', new Element(), new Text(), $('p').contents(), [new Element(), new Text()], [new Element(), $('p').contents()], document.createDocumentFragment()); // $ExpectType JQuery $('p').prepend(function(index, html) { diff --git a/types/jquery/test/longdesc-tests.ts b/types/jquery/test/longdesc-tests.ts index 23ff500d24..3405bb83b5 100644 --- a/types/jquery/test/longdesc-tests.ts +++ b/types/jquery/test/longdesc-tests.ts @@ -1437,7 +1437,7 @@ function longdesc() { $.getJSON('ajax/test.json', function(data) { var items: string[] = []; $.each(data, function(key, val) { - items.push('
  • ' + val + '
  • '); + items.push('
  • ' + val + '
  • '); }); $('